Spaces:
Running
Running
Add noplaylist param for avoid download all playlist.
Browse files- fetchYoutubeSubtitle.py +2 -0
fetchYoutubeSubtitle.py
CHANGED
@@ -40,6 +40,7 @@ async def fetchSubtitle(url: str, lang: Optional[str] = 'en', subType: Optional[
|
|
40 |
|
41 |
async def fetchSubtitlebyType(url: str, lang: Optional[str] = 'en', subType="vtt") -> dict:
|
42 |
ydl_opts = {
|
|
|
43 |
"writesubtitles": False,
|
44 |
"allsubtitles": True,
|
45 |
"subtitleslangs": [lang] if lang else [],
|
@@ -107,6 +108,7 @@ def xml_caption_to_srt( xml_captions: str) -> str:
|
|
107 |
|
108 |
async def fetchSubtitleUrls(url: str) -> json:
|
109 |
ydl_opts = {
|
|
|
110 |
"writesubtitles": False,
|
111 |
"allsubtitles": True,
|
112 |
"skip_download": True,
|
|
|
40 |
|
41 |
async def fetchSubtitlebyType(url: str, lang: Optional[str] = 'en', subType="vtt") -> dict:
|
42 |
ydl_opts = {
|
43 |
+
"noplaylist": True,
|
44 |
"writesubtitles": False,
|
45 |
"allsubtitles": True,
|
46 |
"subtitleslangs": [lang] if lang else [],
|
|
|
108 |
|
109 |
async def fetchSubtitleUrls(url: str) -> json:
|
110 |
ydl_opts = {
|
111 |
+
"noplaylist": True,
|
112 |
"writesubtitles": False,
|
113 |
"allsubtitles": True,
|
114 |
"skip_download": True,
|