Update app.py
Browse files
app.py
CHANGED
@@ -229,7 +229,8 @@ def get_transcript(video_id):
|
|
229 |
transcript_list = YouTubeTranscriptApi.list_transcripts(video_id)
|
230 |
transcript = transcript_list.find_transcript(['en'])
|
231 |
translated_transcript = transcript.translate('en')
|
232 |
-
|
|
|
233 |
return ' '.join(tran)
|
234 |
|
235 |
|
|
|
229 |
transcript_list = YouTubeTranscriptApi.list_transcripts(video_id)
|
230 |
transcript = transcript_list.find_transcript(['en'])
|
231 |
translated_transcript = transcript.translate('en')
|
232 |
+
transcript_data = translated_transcript.fetch()
|
233 |
+
tran += [t['text'] for t in transcript_data if t['text'] != '[music]']
|
234 |
return ' '.join(tran)
|
235 |
|
236 |
|