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

[ie/crunchyroll] Fix auth and remove cookies support #9749

Merged
merged 4 commits into from Apr 21, 2024

Conversation

bashonly
Copy link
Member

CR is requiring Switch-specific auth tokens now for the Switch stream info API endpoint that the extractor uses.

This makes auth via the website useless and breaks our cookies support.

--username+--password and --netrc still work, and using no auth still works for free content.

Closes #9745

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense

What is the purpose of your pull request?

  • Fix or improvement to an extractor (Make sure to add/update tests)

@bashonly bashonly added the site-bug Issue with a specific website label Apr 20, 2024
@@ -42,70 +46,73 @@ class CrunchyrollBaseIE(InfoExtractor):
'ru': 'ru-RU',
'hi': 'hi-IN',
}
_CF_HINT = 'Request blocked by Cloudflare; navigate to Crunchyroll in your browser, then pass the fresh cookies (with --cookies-from-browser or --cookies) and your browser\'s User-Agent (with --user-agent)'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought curl-cffi works for crunchyroll, no?

Copy link
Member Author

@bashonly bashonly Apr 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does, but since using the cookies/user-agent bypass method is now commonplace among our users, and since curl-cffi is only available in 2 of our builds, I think it would be a regression to remove this hint and only rely on the impersonate API warning.

I think we should utilize the impersonate API in this extractor after #9756 is merged, so that the extractor can determine how to handle the 403 error based on whether or not impersonation was used for the request.

Also, if it wasn't clear in the PR description, the 403 error that this PR fixes is completely unrelated to cloudflare/impersonation

@bashonly bashonly merged commit ff38a01 into yt-dlp:master Apr 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[crunchyroll] stream info HTTP Error 403 (even with cookies+user-agent/impersonation)
3 participants