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

Strange error in crunchyroll's subtitle is breaking youtube-dl download #14700

Open
OlaBrasil opened this issue Nov 7, 2017 · 5 comments
Open

Strange error in crunchyroll's subtitle is breaking youtube-dl download #14700

OlaBrasil opened this issue Nov 7, 2017 · 5 comments

Comments

@OlaBrasil
Copy link

@OlaBrasil OlaBrasil commented Nov 7, 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.11.06. 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.11.06

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

Hi, i try to download some subtitles from the crunchyroll. All was fine but this adress return with a strange error.
The comand that i use:

youtube-dl --all-sub --skip-download http://www.crunchyroll.com/folktales-from-japan/episode-48-the-seven-swans-the-mysterious-love-poem-o-is-hard-610541

[Crunchyroll] 610541: Downloading webpage
ERROR: 610541: Failed to parse JSON  (caused by ValueError("Expecting ',' delimiter: line 1 column 59 (char 58)",)); ``

using verbose:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--all-sub', '--skip-download', 'http://www.crunchyroll.com/folktales-from-japan/episode-48-the-seven-swans-the-mysterious-love-poem-o-is-hard-610541', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2017.10.20
[debug] Python version 3.4.4 - Windows-10-10.0.15063
[debug] exe versions: none
[debug] Proxy map: {}
[Crunchyroll] 610541: Downloading webpage
ERROR: 610541: Failed to parse JSON  (caused by ValueError("Expecting ',' delimiter: line 1 column 59 (char 58)",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\extractor\common.py", line 691, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 359, in raw_decode
ValueError: Expecting ',' delimiter: line 1 column 59 (char 58)
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\extractor\common.py", line 691, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 359, in raw_decode
ValueError: Expecting ',' delimiter: line 1 column 59 (char 58)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\YoutubeDL.py", line 784, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\extractor\common.py", line 434, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\extractor\crunchyroll.py", line 417, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\extractor\common.py", line 695, in _parse_json
youtube_dl.utils.ExtractorError: 610541: Failed to parse JSON  (caused by ValueError("Expecting ',' delimiter: line 1 column 59 (char 58)",));

I try identify the subtitle name but failed:

youtube-dl --list-subs http://www.crunchyroll.com/folktales-from-japan/episode-48-the-seven-swans-the-mysterious-love-poem-o-is-hard-610541 --verbose

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--list-subs', 'http://www.crunchyroll.com/folktales-froism-japan/episode-48-the-seven-swans-the-mysterious-love-poem-o-is-hard-610541', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2017.10.20
[debug] Python version 3.4.4 - Windows-10-10.0.15063
[debug] exe versions: none
[debug] Proxy map: {}
[Crunchyroll] 610541: Downloading webpage
ERROR: 610541: Failed to parse JSON  (caused by ValueError("Expecting ',' delimiter: line 1 column 59 (char 58)",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\extractor\common.py", line 691, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 359, in raw_decode
ValueError: Expecting ',' delimiter: line 1 column 59 (char 58)
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\extractor\common.py", line 691, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 359, in raw_decode
ValueError: Expecting ',' delimiter: line 1 column 59 (char 58)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\YoutubeDL.py", line 784, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\extractor\common.py", line 434, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\extractor\crunchyroll.py", line 417, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpvdixi2dy\build\youtube_dl\extractor\common.py", line 695, in _parse_json
youtube_dl.utils.ExtractorError: 610541: Failed to parse JSON  (caused by ValueError("Expecting ',' delimiter: line 1 column 59 (char 58)",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

The page title in English show this:

> Episode 48 – The Seven Swans / The Mysterious Love Poem / 'O' Is Hard

Curiously the title of the page in Portuguese shows this:

> Episódio 48 – Os Sete Cisnes / O Misterioso Poema de Amor / "O" é difícil

As usually the subtitle file receives the name of the episode that in Portuguese presents a kind of code #("O") is running this conflict.

How can i fix this?

@OlaBrasil
Copy link
Author

@OlaBrasil OlaBrasil commented Nov 8, 2017

Thanks, Yan. But is it the problem? Cause the video is released to my country (Brazil) and I can usually watch it in Portuguese subtitles through the website. The problem only occurs when I try to download the subtitle using youtube-dl process.

I try use the Geo-Restriction commands but the error message still persists.

Anyway I managed to download the subtitle by another phyton process and I will use it in isolated cases like this. But I still prefer youtube-dl to download in batches.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 8, 2017

The labal indicates this video is blocked in some countries (at least in Taiwan), so I can't check what's the actual cause yet.

Anyway I managed to download the subtitle by another phyton process and I will use it in isolated cases like this. But I still prefer youtube-dl to download in batches.

Mind sharing what's the tool you're using? That should help on identifying the problem in youtube-dl.

@OlaBrasil
Copy link
Author

@OlaBrasil OlaBrasil commented Nov 8, 2017

Thanks again for returning the reply.
I can explain the process but just hope that not violating any community rule.

I'm using the Crunchy Xml Decoder
that convert/decrypt the Crunchyroll's XML episode subtitle to ASS.

Download HERE or HERE

I made a ilustration how to use HERE.

@enigmaquip
Copy link
Contributor

@enigmaquip enigmaquip commented Nov 14, 2017

It's not actually in the subtitles itself, it's crashing before it even hits the part where it checks subtitles, it's still trying to pull video information in that crash, says line 417 in crunchyroll which is the video_description regex/json

415        video_description = self._parse_json(self._html_search_regex(
416            r'<script[^>]*>\s*.+?\[media_id=%s\].+?({.+?"description"\s*:.+?})\);' % video_id,
417            webpage, 'description', default='{}'), video_id).get('description')

Here's the line it's parsing


<script type="text/javascript">
 $('.collection-carousel-contents div[media_id=610541] .hover-bubble').data('bubble_data',{"name":"The Seven Swans \/ The Mysterious Love Poem \/ 'O' Is Hard","description":"A sister saves her brothers, a love is found, lost, and found again, and you put an \u201co\u201d in front of everything to be polite."});
   </script>

I'm guessing you're right in that it is having issues with the unescaped single quotes, but it's not actually due to trying to download subs

@iiiGerardoiii
Copy link

@iiiGerardoiii iiiGerardoiii commented Nov 15, 2017

I'm getting the same error (or similar) when trying to play this video:
https://clips.twitch.tv/RenownedConfidentButterNotATK

here's what I get:

PS C:\WINDOWS\system32> C:\Users\gerard\Documents\mpv\youtube-dl.exe -g https://clips.twitch.tv/RenownedConfidentButterNotATK --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-g', 'https://clips.twitch.tv/RenownedConfidentButterNotATK', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2017.11.15
[debug] Python version 3.4.4 - Windows-10-10.0.15063
[debug] exe versions: none
[debug] Proxy map: {}
ERROR: RenownedConfidentButterNotATK: Failed to parse JSON  (caused by ValueError("Expecting ',' delimiter: line 38 column 79 (char 2029)",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp10f7prtw\build\youtube_dl\extractor\common.py", line 694, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 359, in raw_decode
ValueError: Expecting ',' delimiter: line 38 column 79 (char 2029)
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp10f7prtw\build\youtube_dl\extractor\common.py", line 694, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 359, in raw_decode
ValueError: Expecting ',' delimiter: line 38 column 79 (char 2029)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp10f7prtw\build\youtube_dl\YoutubeDL.py", line 784, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp10f7prtw\build\youtube_dl\extractor\common.py", line 437, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp10f7prtw\build\youtube_dl\extractor\twitch.py", line 610, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp10f7prtw\build\youtube_dl\extractor\common.py", line 698, in _parse_json
youtube_dl.utils.ExtractorError: RenownedConfidentButterNotATK: Failed to parse JSON  (caused by ValueError("Expecting ',' delimiter: line 38 column 79 (char 2029)",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Hope this helps.

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