Spaces:
Paused
Paused
Commit ·
8a2f31f
1
Parent(s): 289d0de
Python
Browse files
app.py
CHANGED
|
@@ -54,7 +54,7 @@ def video_download(url):
|
|
| 54 |
if not os.path.exists(thumbnail_file):
|
| 55 |
subprocess.run(['wget', '-O', thumbnail_file, thumbnail_url])
|
| 56 |
if not os.path.exists(video_file):
|
| 57 |
-
subprocess.run(['
|
| 58 |
|
| 59 |
return video_file, thumbnail_file
|
| 60 |
|
|
@@ -91,7 +91,7 @@ def audio_download(url):
|
|
| 91 |
if not os.path.exists(thumbnail_file):
|
| 92 |
subprocess.run(['wget', '-O', thumbnail_file, thumbnail_url])
|
| 93 |
if not os.path.exists(audio_file):
|
| 94 |
-
subprocess.run(['
|
| 95 |
|
| 96 |
return audio_file, thumbnail_file
|
| 97 |
|
|
|
|
| 54 |
if not os.path.exists(thumbnail_file):
|
| 55 |
subprocess.run(['wget', '-O', thumbnail_file, thumbnail_url])
|
| 56 |
if not os.path.exists(video_file):
|
| 57 |
+
subprocess.run(['python', '-m', 'yt_dlp', '-f', format_filter, '-o', video_file, url], check=True)
|
| 58 |
|
| 59 |
return video_file, thumbnail_file
|
| 60 |
|
|
|
|
| 91 |
if not os.path.exists(thumbnail_file):
|
| 92 |
subprocess.run(['wget', '-O', thumbnail_file, thumbnail_url])
|
| 93 |
if not os.path.exists(audio_file):
|
| 94 |
+
subprocess.run(['python', '-m', 'yt_dlp', '-x', '--audio-format', 'mp3', '--embed-thumbnail', '-o', audio_file, url], check=True)
|
| 95 |
|
| 96 |
return audio_file, thumbnail_file
|
| 97 |
|