Spaces:
Sleeping
Sleeping
Update Milestone5API.py
Browse files- Milestone5API.py +1 -2
Milestone5API.py
CHANGED
|
@@ -96,10 +96,9 @@ def download_video_transcript(video_url, target_lang='fr'):
|
|
| 96 |
print('Download completed!')
|
| 97 |
|
| 98 |
transcript_list = YouTubeTranscriptApi.list_transcripts(video_id)
|
| 99 |
-
|
| 100 |
|
| 101 |
if not transcript:
|
| 102 |
-
|
| 103 |
transcript = transcript_list.find_generated_transcript(languages=['auto']).fetch()
|
| 104 |
|
| 105 |
original_captions = ""
|
|
|
|
| 96 |
print('Download completed!')
|
| 97 |
|
| 98 |
transcript_list = YouTubeTranscriptApi.list_transcripts(video_id)
|
| 99 |
+
transcript = transcript_list.find_generated_transcript(languages=['en'], allow_auto_translations=True).fetch()
|
| 100 |
|
| 101 |
if not transcript:
|
|
|
|
| 102 |
transcript = transcript_list.find_generated_transcript(languages=['auto']).fetch()
|
| 103 |
|
| 104 |
original_captions = ""
|