Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,9 @@ def download_video(youtube_url: str, output_path: str) -> str:
|
|
22 |
'format': 'best',
|
23 |
'outtmpl': os.path.join(output_path, '%(title)s.%(ext)s'),
|
24 |
'noplaylist': True,
|
25 |
-
'quiet': True
|
|
|
|
|
26 |
}
|
27 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
28 |
info = ydl.extract_info(youtube_url, download=True)
|
|
|
22 |
'format': 'best',
|
23 |
'outtmpl': os.path.join(output_path, '%(title)s.%(ext)s'),
|
24 |
'noplaylist': True,
|
25 |
+
'quiet': True,
|
26 |
+
'cookiesfrombrowser': ('chrome',), # Extract cookies from Chrome
|
27 |
+
'verbose': True # Optional: for more detailed output
|
28 |
}
|
29 |
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
30 |
info = ydl.extract_info(youtube_url, download=True)
|