Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -159,7 +159,11 @@ def download_from_youtube(
|
|
159 |
"--force-overwrites",
|
160 |
f"https://www.youtube.com/watch?v={video_id}",
|
161 |
]
|
162 |
-
|
|
|
|
|
|
|
|
|
163 |
|
164 |
# If not mp4, convert to mp4
|
165 |
from glob import glob
|
|
|
159 |
"--force-overwrites",
|
160 |
f"https://www.youtube.com/watch?v={video_id}",
|
161 |
]
|
162 |
+
try:
|
163 |
+
call(" ".join(command), shell=True)
|
164 |
+
except Exception as e:
|
165 |
+
print(e)
|
166 |
+
raise IOError("Failed to download to download YouTube video.")
|
167 |
|
168 |
# If not mp4, convert to mp4
|
169 |
from glob import glob
|