Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -34,6 +34,7 @@ def download_subtitle(url: str, lang: Optional[str] = None) -> Optional[str]:
|
|
34 |
}
|
35 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
36 |
info_dict = ydl.extract_info(url, download=False)
|
|
|
37 |
if info_dict.get("subtitles"):
|
38 |
# get first available subtitle
|
39 |
subtitle_url = info_dict["subtitles"][0]["url"]
|
|
|
34 |
}
|
35 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
36 |
info_dict = ydl.extract_info(url, download=False)
|
37 |
+
print(info_dict)
|
38 |
if info_dict.get("subtitles"):
|
39 |
# get first available subtitle
|
40 |
subtitle_url = info_dict["subtitles"][0]["url"]
|