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

How to write tests where login is required #14691

Closed
madmatt opened this issue Nov 7, 2017 · 1 comment
Closed

How to write tests where login is required #14691

madmatt opened this issue Nov 7, 2017 · 1 comment
Labels

Comments

@madmatt
Copy link

@madmatt madmatt commented Nov 7, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.11.06
  • At least skimmed through the README, most notably the 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

I am creating a new extractor, but it's a service that requires a login to view any content (logins cost money and are for a limited amount of time, if that matters). The site itself is open and the link to the M3U8 file is visible to non-logged-in users, but in order to download the M3U8 file you need to login and provide an HMAC string and/or cookie value. I'm writing the login code now, but I'm wondering if it's possible for me to still write tests for this extractor? I'm following the YoutubeIE example, but that doesn't have any tests for the extractors that require login (YoutubeFeedsInfoExtractor and YoutubeFavouritesIE for example).

Obviously it can't test the downloaded file, but passing skip_download param through doesn't stop _extract_m3u8_formats from attempting to retrieve the m3u8 file and failing.

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.