Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
8345790
1
Parent(s):
801ea60
avoid download the full youtube link playlist
Browse files- tools/youtube_extract.py +2 -0
tools/youtube_extract.py
CHANGED
|
@@ -55,6 +55,7 @@ def extract_audio_from_youtube(
|
|
| 55 |
],
|
| 56 |
"quiet": True,
|
| 57 |
"no_warnings": True,
|
|
|
|
| 58 |
}
|
| 59 |
|
| 60 |
# Download and extract audio
|
|
@@ -100,6 +101,7 @@ def get_video_info(youtube_url: str) -> dict:
|
|
| 100 |
"quiet": True,
|
| 101 |
"no_warnings": True,
|
| 102 |
"skip_download": True,
|
|
|
|
| 103 |
}
|
| 104 |
|
| 105 |
with yt_dlp.YoutubeDL(params=ydl_opts) as ydl:
|
|
|
|
| 55 |
],
|
| 56 |
"quiet": True,
|
| 57 |
"no_warnings": True,
|
| 58 |
+
"noplaylist": True,
|
| 59 |
}
|
| 60 |
|
| 61 |
# Download and extract audio
|
|
|
|
| 101 |
"quiet": True,
|
| 102 |
"no_warnings": True,
|
| 103 |
"skip_download": True,
|
| 104 |
+
"noplaylist": True,
|
| 105 |
}
|
| 106 |
|
| 107 |
with yt_dlp.YoutubeDL(params=ydl_opts) as ydl:
|