Open amjiddader opened 2 years ago
Hi @amjiddader , You can see the options that you can pass to YTDL_OPTIONS here: https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/YoutubeDL.py#L176 (the link also appears in the README). I don't see there a way to set the user agent, unfortunately. HTTP headers, as per the documentation, are passed as a dictionary: "http_headers": {"Header-Name":"Value"} . (Never tried but that's what the doc says.) Not sure what's the deal with concurrent_fragment_downloads either...
Thanks ..
"http_headers": {"Header-Name":"Value"} . never worked for me....
I have now cloned the repo and will make changes -- by adding default configuration file inside docker and use config by default. Hope it will get UA ..
Lets leave this open 👐 Hope someone will come with an solution.
Hi,
1. User-Agent
how to set custom user-agent
I notice that user-agent if passed from YTDL_OPTIONS if we set.
Could not understand how to set new user-agent (This does not work)
On some videos user_agent is required and when i try them in CLI as yt-dlp --user-agent "Mozilla/5" https://vim.........m3u8 it works very well and downloads videos. In metube i am getting 400 error ( Link only opens if user-agent is set to AppleWebKit/603.1.30 (KHTML, like Gecko)
2. http_headers .
how to pass http_headers options?
If i ass http_headers in YTDL_OPTIONS i get error (server error popup) error log pasted at bottom of file ERROR_1
- 'YTDL_OPTIONS={"user_agent":"AppleWebKit/603.1.30 (KHTML, like Gecko)","http_headers":"user-agent Mozilla"}'
Also for http_headers i used a file that contains headers 1 per line ( does not work)3 Use multiple connections to download?
yt-dlp supports downloading over multiple connections
i have 10GBPS dedi server and to download some 4K files it takes about 2-5 minutes ( speed remains approx 30Mbps) While if download same stuff from yt-dlp cli with --concurrent-fragments 16 speed shoots to 300Mbps ( i know using multiple connections is an bad idea but i download a very few videos from youtube so i dont care if my server gets blocked) i tried concurrent_fragment_downloads but it never worked for me..
( sorry for my bad engush and i am not good in posting pretty message)