Update app_rvc.py
Browse files- app_rvc.py +13 -0
app_rvc.py
CHANGED
@@ -2922,3 +2922,16 @@ if __name__ == "__main__":
|
|
2922 |
quiet=False,
|
2923 |
debug=(True if logger.isEnabledFor(logging.DEBUG) else False),
|
2924 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2922 |
quiet=False,
|
2923 |
debug=(True if logger.isEnabledFor(logging.DEBUG) else False),
|
2924 |
)
|
2925 |
+
from yt_dlp import YoutubeDL
|
2926 |
+
|
2927 |
+
def download_youtube_video(url, output_path):
|
2928 |
+
ydl_opts = {
|
2929 |
+
'format': 'bestvideo+bestaudio/best',
|
2930 |
+
'outtmpl': f'{output_path}/%(title)s.%(ext)s',
|
2931 |
+
'quiet': True,
|
2932 |
+
'nocheckcertificate': True,
|
2933 |
+
'retries': 5,
|
2934 |
+
}
|
2935 |
+
|
2936 |
+
with YoutubeDL(ydl_opts) as ydl:
|
2937 |
+
ydl.download([url])
|