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.
Authentication and certain HTTP header options don't work for generic streams #10493
Comments
|
Put headers in |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like that [x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2016.08.28. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
Description of your issue, suggested solution and other information
Hello there!
There are certain generic streams on the internet that require authentication and even a custom user-agent in order to actually connect to the stream itself. I have tried passing the 'username', 'password' and 'user_agent' options when creating a YoutubeDL object in my python program , however I noticed that they get ignored when trying to connect to the stream (even just having 'username' without 'password' won't prompt a "Missing password" exception). Printing the actual options of the YoutubeDL object did confirm that the options I passed were there. I then checked the actual packet itself with a packet sniffer, and surely enough the headers for authentication were not inside the packet, and the packet's user agent was not the one I set up in the options.
I could be doing something wrong. However, I checked the generic extractor python file and there were no 'username', 'password' or 'user_agent' options being passed to the actual HTTP header. If this ends up to be the source of this issue, then I would like to request the implementation of 'username', 'password', 'user_agent' and other HTTP header-related options in the generic extractor.
I also understand that some streams may have different authentication methods or some other required HTTP headers in order to function, which is why I would also like to request the option to add a custom HTTP header in the HTTP request.