Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,9 +17,11 @@ def download_video(url):
|
|
17 |
ydl_opts = {
|
18 |
'format': 'bestvideo+bestaudio/best',
|
19 |
'outtmpl': os.path.join(tmpdirname, '%(title)s.%(ext)s'),
|
20 |
-
'merge_output_format': 'webm',
|
|
|
21 |
}
|
22 |
|
|
|
23 |
# Download the video using yt-dlp
|
24 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
25 |
# Use a progress hook to update the progress bar
|
|
|
17 |
ydl_opts = {
|
18 |
'format': 'bestvideo+bestaudio/best',
|
19 |
'outtmpl': os.path.join(tmpdirname, '%(title)s.%(ext)s'),
|
20 |
+
'merge_output_format': 'webm',
|
21 |
+
'user_agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36',
|
22 |
}
|
23 |
|
24 |
+
|
25 |
# Download the video using yt-dlp
|
26 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
27 |
# Use a progress hook to update the progress bar
|