Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication and certain HTTP header options don't work for generic streams #10493

Closed
EgorkaSanyok opened this issue Aug 30, 2016 · 1 comment
Closed

Comments

@EgorkaSanyok
Copy link

@EgorkaSanyok EgorkaSanyok commented Aug 30, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.08.28. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.08.28

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

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.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 30, 2016

Put headers in utils.std_headers dict.

@dstftw dstftw closed this Aug 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.