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

Use CR-unblocker service to obtain session cookies for crunchyroll geo-bypass #14908

Open
ratchetfreak opened this issue Dec 4, 2017 · 0 comments

Comments

@ratchetfreak
Copy link

@ratchetfreak ratchetfreak commented Dec 4, 2017

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 this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.12.02. 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 2017.12.02

Before submitting an issue make sure you have:

  • 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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

n/a


If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

n/a


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

CR-unblocker uses a US-based server that logs into crunchyroll and returns cookies to let the session pretend it started in the US which lets users elsewhere access geo-locked content.

I propose to add this as an opt-in to youtube-dl.

  1. download page from crunchyroll with current cookies

  2. if page contains the following tag in the footer

    <img id="footer_country_flag" src="http://static.ak.crunchyroll.com/i/country_flags/us.gif" alt="United States of America" title="Your detected location is United States of America.">

    then continue as normal.

  3. otherwise make request to cr-unblocker server (either default or user specified if running their own) with any log-in information passed.

  4. adjust the current cookies using the response (in particular set sess_id and session_id to the response's session_id) and restart from 1 or fail out if trying too many times/ran out of log-in servers to try.

The code that runs in the browser extension can be found in their repo: https://github.com/onestay/CR-Unblocker/blob/master/src/background_script.js (licensed under MIT)

current maintainer of cr-unblocker doesn't mind the server being used by youtube-dl: https://github.com/onestay/CR-Unblocker/issues/12 but punted it over to someone else to maintain it.

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
1 participant
You can’t perform that action at this time.