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

Content that its region blocked for free users (but available for premium) can't be downloaded from Crunchyroll #17595

Closed
icarovirtual opened this issue Sep 17, 2018 · 3 comments
Labels

Comments

@icarovirtual
Copy link

@icarovirtual icarovirtual commented Sep 17, 2018

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

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
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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

I have tested multiple combinations of arguments to see if any would work and also check the different outputs so I'll list them below.

Downloading the whole series, using --write-pages with user and password
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" -u <premium_username> -p <premium_password> --write-pages http://www.crunchyroll.com/havent-you-heard-im-sakamoto/

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'--write-pages', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll:playlist] Logging in
[crunchyroll:playlist] Saving request to None_https_-_www.crunchyroll.com_.dump
[crunchyroll:playlist] havent-you-heard-im-sakamoto: Downloading webpage
[crunchyroll:playlist] Saving request to havent-you-heard-im-sakamoto_http_-_www.crunchyroll.com_havent-you-heard-im-sakamoto.dump
[download] Downloading playlist: Sakamoto Desu Ga?
[crunchyroll:playlist] playlist Sakamoto Desu Ga?: Collected 13 video ids (downloading 13 of them)
[download] Downloading video 1 of 13
[crunchyroll] Logging in
[crunchyroll] Saving request to None_https_-_www.crunchyroll.com_.dump
[crunchyroll] 702687: Downloading webpage
[crunchyroll] Saving request to 702687_http_-_www.crunchyroll.com_havent-you-heard-im-sakamoto_episode-1-class-1-2-sakamoto-kun-bee-quiet-702687skip_wall=1.dump
ERROR: crunchyroll returned error: The CSRF token is invalid. Please try to resubmit the form.
Traceback (most recent call last):
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 507, in extract
    ie_result = self._real_extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/crunchyroll.py", line 438, in _real_extract
    raise ExtractorError('crunchyroll returned error: %s' % msg['message_body'], expected=True)
ExtractorError: crunchyroll returned error: The CSRF token is invalid. Please try to resubmit the form.
Downloading the whole series, using --write-pages with user and password and cookies
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" -u <premium_username> -p <premium_password> --write-pages --cookies cookies.txt http://www.crunchyroll.com/havent-you-heard-im-sakamoto/

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'--write-pages', u'--cookies', u'cookies.txt', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll:playlist] Logging in
[crunchyroll:playlist] Saving request to None_https_-_www.crunchyroll.com_.dump
[crunchyroll:playlist] havent-you-heard-im-sakamoto: Downloading webpage
[crunchyroll:playlist] Saving request to havent-you-heard-im-sakamoto_http_-_www.crunchyroll.com_havent-you-heard-im-sakamoto.dump
[download] Downloading playlist: Haven’t You Heard? I’m Sakamoto
[crunchyroll:playlist] playlist Haven’t You Heard? I’m Sakamoto: Collected 0 video ids (downloading 0 of them)
[download] Finished downloading playlist: Haven’t You Heard? I’m Sakamoto
Downloading the whole series, using --write-pages with cookies
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" --write-pages --cookies cookies.txt http://www.crunchyroll.com/havent-you-heard-im-sakamoto/

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'--write-pages', u'--cookies', u'cookies.txt', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll:playlist] havent-you-heard-im-sakamoto: Downloading webpage
[crunchyroll:playlist] Saving request to havent-you-heard-im-sakamoto_http_-_www.crunchyroll.com_havent-you-heard-im-sakamoto.dump
[download] Downloading playlist: Haven’t You Heard? I’m Sakamoto
[crunchyroll:playlist] playlist Haven’t You Heard? I’m Sakamoto: Collected 0 video ids (downloading 0 of them)
[download] Finished downloading playlist: Haven’t You Heard? I’m Sakamoto
Downloading the whole series, without --write-pages with user and password
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" -u <premium_username> -p <premium_password> http://www.crunchyroll.com/havent-you-heard-im-sakamoto/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll:playlist] Logging in
[crunchyroll:playlist] havent-you-heard-im-sakamoto: Downloading webpage
[download] Downloading playlist: Sakamoto Desu Ga?
[crunchyroll:playlist] playlist Sakamoto Desu Ga?: Collected 13 video ids (downloading 13 of them)
[download] Downloading video 1 of 13
[crunchyroll] Logging in
[crunchyroll] 702687: Downloading webpage
ERROR: crunchyroll returned error: The CSRF token is invalid. Please try to resubmit the form.
Traceback (most recent call last):
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 507, in extract
    ie_result = self._real_extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/crunchyroll.py", line 438, in _real_extract
    raise ExtractorError('crunchyroll returned error: %s' % msg['message_body'], expected=True)
ExtractorError: crunchyroll returned error: The CSRF token is invalid. Please try to resubmit the form.
Downloading the whole series, without --write-pages with user and password and cookies
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" -u <premium_username> -p <premium_password> --cookies cookies.txt http://www.crunchyroll.com/havent-you-heard-im-sakamoto/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'--cookies', u'cookies.txt', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll:playlist] Logging in
[crunchyroll:playlist] havent-you-heard-im-sakamoto: Downloading webpage
[download] Downloading playlist: Haven’t You Heard? I’m Sakamoto
[crunchyroll:playlist] playlist Haven’t You Heard? I’m Sakamoto: Collected 0 video ids (downloading 0 of them)
[download] Finished downloading playlist: Haven’t You Heard? I’m Sakamoto
Downloading the whole series, without --write-pages with cookies
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" --cookies cookies.txt http://www.crunchyroll.com/havent-you-heard-im-sakamoto/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'--cookies', u'cookies.txt', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll:playlist] havent-you-heard-im-sakamoto: Downloading webpage
[download] Downloading playlist: Haven’t You Heard? I’m Sakamoto
[crunchyroll:playlist] playlist Haven’t You Heard? I’m Sakamoto: Collected 0 video ids (downloading 0 of them)
[download] Finished downloading playlist: Haven’t You Heard? I’m Sakamoto
Downloading a single episode, using --write-pages with user and password
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" -u <premium_username> -p <premium_password> --write-pages http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'--write-pages', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll] Logging in
[crunchyroll] Saving request to None_https_-_www.crunchyroll.com_.dump
[crunchyroll] 702687: Downloading webpage
[crunchyroll] Saving request to 702687_http_-_www.crunchyroll.com_havent-you-heard-im-sakamoto_episode-1-class-1-2-sakamoto-kun-bee-quiet-702687skip_wall=1.dump
ERROR: crunchyroll returned error: The CSRF token is invalid. Please try to resubmit the form.
Traceback (most recent call last):
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 507, in extract
    ie_result = self._real_extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/crunchyroll.py", line 438, in _real_extract
    raise ExtractorError('crunchyroll returned error: %s' % msg['message_body'], expected=True)
ExtractorError: crunchyroll returned error: The CSRF token is invalid. Please try to resubmit the form.
Downloading a single episode, using --write-pages with user and password and cookies
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" -u <premium_username> -p <premium_password> --write-pages --cookies cookies.txt http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'--write-pages', u'--cookies', u'cookies.txt', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll] Logging in
[crunchyroll] Saving request to None_https_-_www.crunchyroll.com_.dump
[crunchyroll] 702687: Downloading webpage
[crunchyroll] Saving request to 702687_http_-_www.crunchyroll.com_.dump
ERROR: crunchyroll returned error: Sorry, this video is not available in your region due to licensing restrictions.
Traceback (most recent call last):
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 507, in extract
    ie_result = self._real_extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/crunchyroll.py", line 438, in _real_extract
    raise ExtractorError('crunchyroll returned error: %s' % msg['message_body'], expected=True)
ExtractorError: crunchyroll returned error: Sorry, this video is not available in your region due to licensing restrictions.
Downloading a single episode, using --write-pages with cookies
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" --write-pages --cookies cookies.txt http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'--write-pages', u'--cookies', u'cookies.txt', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll] 702687: Downloading webpage
[crunchyroll] Saving request to 702687_http_-_www.crunchyroll.com_.dump
ERROR: crunchyroll returned error: Sorry, this video is not available in your region due to licensing restrictions.
Traceback (most recent call last):
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 507, in extract
    ie_result = self._real_extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/crunchyroll.py", line 438, in _real_extract
    raise ExtractorError('crunchyroll returned error: %s' % msg['message_body'], expected=True)
ExtractorError: crunchyroll returned error: Sorry, this video is not available in your region due to licensing restrictions.
Downloading a single episode, without --write-pages with user and password
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" -u <premium_username> -p <premium_password> http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll] Logging in
[crunchyroll] 702687: Downloading webpage
ERROR: crunchyroll returned error: The CSRF token is invalid. Please try to resubmit the form.
Traceback (most recent call last):
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 507, in extract
    ie_result = self._real_extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/crunchyroll.py", line 438, in _real_extract
    raise ExtractorError('crunchyroll returned error: %s' % msg['message_body'], expected=True)
ExtractorError: crunchyroll returned error: The CSRF token is invalid. Please try to resubmit the form.
Downloading a single episode, without --write-pages with user and password and cookies
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" -u <premium_username> -p <premium_password> --cookies cookies.txt http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'--cookies', u'cookies.txt', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll] Logging in
[crunchyroll] 702687: Downloading webpage
ERROR: crunchyroll returned error: Sorry, this video is not available in your region due to licensing restrictions.
Traceback (most recent call last):
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 507, in extract
    ie_result = self._real_extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/crunchyroll.py", line 438, in _real_extract
    raise ExtractorError('crunchyroll returned error: %s' % msg['message_body'], expected=True)
ExtractorError: crunchyroll returned error: Sorry, this video is not available in your region due to licensing restrictions.
Downloading a single episode, without --write-pages with cookies
(env) Icaro-MacBook :: ~/Downloads/Sakamoto Desu Ga? » youtube-dl -v -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" --cookies cookies.txt http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-f', u'best', u'--write-sub', u'--sub-lang', u'ptBR,enUS', u'--sub-format', u'ass', u'--download-archive', u'archive.txt', u'-o', u'E%(episode_number)02d - %(episode)s.%(ext)s', u'--cookies', u'cookies.txt', u'http://www.crunchyroll.com/havent-you-heard-im-sakamoto/episode-1-class-1-2-sakamoto-kun-bee-quiet-702687']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.09.18
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[crunchyroll] 702687: Downloading webpage
ERROR: crunchyroll returned error: Sorry, this video is not available in your region due to licensing restrictions.
Traceback (most recent call last):
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 507, in extract
    ie_result = self._real_extract(url)
  File "/Users/buddles/projects/tools/env/lib/python2.7/site-packages/youtube_dl/extractor/crunchyroll.py", line 438, in _real_extract
    raise ExtractorError('crunchyroll returned error: %s' % msg['message_body'], expected=True)
ExtractorError: crunchyroll returned error: Sorry, this video is not available in your region due to licensing restrictions.

Description of your issue, suggested solution and other information

The series in question is region blocked in Brazil for anonymous or free users but if I login with a premium account I can see the episode list and watch any of them normally in the browser.

I've tried some combinations of the username and password arguments along with the --write-pages and cookies arguments because I think that the problem is related to youtube-dl not loading the page contents with the authentication arguments which results in the region block errors.

Does this require fixing or I'm missing some other argument combination to download this type of content?

@gemdude46
Copy link

@gemdude46 gemdude46 commented Sep 17, 2018

This is probably a bug, but try the --geo-bypass flag for now, as crunchyroll is vulnerable to spoofed X-Forwarded-For headers.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Sep 18, 2018

duplicate of #17115.

@icarovirtual
Copy link
Author

@icarovirtual icarovirtual commented Sep 18, 2018

This is probably a bug, but try the --geo-bypass flag for now, as crunchyroll is vulnerable to spoofed X-Forwarded-For headers.

Confirming that this works but I had to use --geo-bypass-country US flag in the command.

So a complete example is as follows:
youtube-dl -f best --write-sub --sub-lang ptBR,enUS --sub-format ass --download-archive archive.txt -o "E%(episode_number)02d - %(episode)s.%(ext)s" --cookies cookies.txt --geo-bypass-country US http://www.crunchyroll.com/havent-you-heard-im-sakamoto/

I'm not sure if it's the same fix for #17115 but it might be worth the try.

Thanks for the help!

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