bpiyush commited on
Commit
ff5b2ed
1 Parent(s): 49d9f95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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
- call(" ".join(command), shell=True)
 
 
 
 
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