Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
How to set user agent in embedded python script ? #7830
Comments
|
Can you elaborate why you want to do that? If some website works better when given another user agent, I'd very much improve youtube-dl to always set the user agent for the website. |
|
@phihag from what I understand some websites return different encoded videos depending on your user agent string. I could be wrong on that. But, when I use youtube_dl from Linux to download a video from bbc.co.uk it is unplayable on QuickTime in mac. |
I am calling youtube-dl from a python script. Like so:
However, I want to specifically set the user agent to be that of iOS Safari. How would i set the option for user agent? I do not see that as an available option here https://github.com/rg3/youtube-dl/blob/master/youtube_dl/YoutubeDL.py#L117-L265