Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def get_subtitles(url, langs=['en']):
|
|
16 |
'skip_download': True,
|
17 |
}
|
18 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
19 |
-
|
20 |
subtitles = result.get("subtitles")
|
21 |
if subtitles and len(subtitles):
|
22 |
return subtitles
|
|
|
16 |
'skip_download': True,
|
17 |
}
|
18 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
19 |
+
result = ydl.extract_info(url, download=False)
|
20 |
subtitles = result.get("subtitles")
|
21 |
if subtitles and len(subtitles):
|
22 |
return subtitles
|