try fix youtube download
This commit is contained in:
parent
c5e2d4818f
commit
479ef8a188
1 changed files with 8 additions and 1 deletions
9
main.py
9
main.py
|
|
@ -480,7 +480,14 @@ def download_youtube_video(url, output_dir="."):
|
||||||
'quiet': False,
|
'quiet': False,
|
||||||
'verbose': True,
|
'verbose': True,
|
||||||
'no_warnings': False,
|
'no_warnings': False,
|
||||||
'cookiefile': cookies_path if cookies_path else None
|
'cookiefile': cookies_path if cookies_path else None,
|
||||||
|
'sleep_interval_requests': 5,
|
||||||
|
'sleep_interval': 10,
|
||||||
|
'max_sleep_interval': 30,
|
||||||
|
'socket_timeout': 30,
|
||||||
|
'retries': 10,
|
||||||
|
'nocheckcertificate': True,
|
||||||
|
'user_agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
|
||||||
}
|
}
|
||||||
|
|
||||||
with yt_dlp.YoutubeDL(ydl_opts_info) as ydl:
|
with yt_dlp.YoutubeDL(ydl_opts_info) as ydl:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue