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

Failed to parse JSON #22846

Open
sartoriluigi opened this issue Oct 25, 2019 · 4 comments
Open

Failed to parse JSON #22846

sartoriluigi opened this issue Oct 25, 2019 · 4 comments

Comments

@sartoriluigi
Copy link

@sartoriluigi sartoriluigi commented Oct 25, 2019

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.10.22
  • I've checked that all provided URLs are alive and playable in a browser
  • [X ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • [X ] I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

PASTE VERBOSE LOG HERE

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.raiplay.it/raiplay/video/2016/11/Sea-Patrol-S2E5---Lora-del-The-54a4299e-ae1d-422c-aea3-ad69e3121d7a.html']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2019.10.22
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg N-93851-gdcc999819d, ffprobe N-93851-gdcc999819d
[debug] Proxy map: {}
[RaiPlay] 54a4299e-ae1d-422c-aea3-ad69e3121d7a: Downloading video JSON
ERROR: 54a4299e-ae1d-422c-aea3-ad69e3121d7a: Failed to parse JSON (caused by ValueError("Expecting ',' delimiter: line 1 column 4551 (char 4550)",)); 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\ytdl-org\tmpifszpy0p\build\youtube_dl\extractor\common.py", line 899, 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 4551 (char 4550)
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpifszpy0p\build\youtube_dl\extractor\common.py", line 899, 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 4551 (char 4550)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpifszpy0p\build\youtube_dl\YoutubeDL.py", line 796, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpifszpy0p\build\youtube_dl\extractor\common.py", line 530, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpifszpy0p\build\youtube_dl\extractor\rai.py", line 174, in _real_extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpifszpy0p\build\youtube_dl\extractor\common.py", line 892, in _download_json
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpifszpy0p\build\youtube_dl\extractor\common.py", line 876, in _download_json_handle
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpifszpy0p\build\youtube_dl\extractor\common.py", line 903, in _parse_json
youtube_dl.utils.ExtractorError: 54a4299e-ae1d-422c-aea3-ad69e3121d7a: Failed to parse JSON (caused by ValueError("Expecting ',' delimiter: line 1 column 4551 (char 4550)",)); 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.

Description

WRITE DESCRIPTION HERE
This is my command:
youtube-dl.exe -v https://www.raiplay.it/raiplay/video/2016/11/Sea-Patrol-S2E5---Lora-del-The-54a4299e-ae1d-422c-aea3-ad69e3121d7a.html

Youtube-dl is last version

usually the download always works from the raiplay.it site

@fpusersuggest
Copy link

@fpusersuggest fpusersuggest commented Oct 25, 2019

Devi essere registrato

@uno20001
Copy link
Contributor

@uno20001 uno20001 commented Oct 25, 2019

The problem seems to be that the site generates invalid JSON. In this case if you take a look at this, you'll see that for some reason the site does not escape the " (quotes) in the title: [...] "name": "Sea Patrol S2E5 - L'ora del "The"", [...].

@donatom805
Copy link

@donatom805 donatom805 commented Nov 18, 2019

I cannot download any archived videos on raiplay.it. All attempts show the same error: "No JSON object could be decoded"

I've verified that I'm running youtube-dl version 2019.11.05
I've checked that all provided URLs are alive and playable in a browser
I've checked that all URLs and arguments with special characters are properly quoted or escaped

I've read bugs section in FAQ

Verbose log

I'm getting a slightly different print out from that of sartoriluigi:

youtube-dl -v https://www.raiplay.it/video/2019/11/la-tenerezza-8a7f535c-d47e-4824-a4c5-ffcfa43f9e83.html
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.raiplay.it/video/2019/11/la-tenerezza-8a7f535c-d47e-4824-a4c5-ffcfa43f9e83.html']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.11.05
[debug] Python version 2.7.17 (CPython) - Linux-5.3.8-200.fc30.x86_64-x86_64-with-fedora-30-Thirty
[debug] exe versions: ffmpeg 4.1.4, ffprobe 4.1.4
[debug] Proxy map: {}
[RaiPlay] 8a7f535c-d47e-4824-a4c5-ffcfa43f9e83: Downloading video JSON
ERROR: 8a7f535c-d47e-4824-a4c5-ffcfa43f9e83: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 899, in _parse_json
return json.loads(json_string)
File "/usr/lib64/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Traceback (most recent call last):
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/rai.py", line 174, in _real_extract
'%s?json' % url, video_id, 'Downloading video JSON')
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 892, in _download_json
expected_status=expected_status)
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 876, in _download_json_handle
fatal=fatal), urlh
File "/home/donatom/.local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 903, in _parse_json
raise ExtractorError(errmsg, cause=ve)
ExtractorError: 8a7f535c-d47e-4824-a4c5-ffcfa43f9e83: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

@fpusersuggest, you say we have to be registered at raiplay.it; well, I registered, then played the stream and used the URL from that stream; there is no way I know of to register via the youtube-dl command in terminal-command-line; if you know of a way, let us know. (come si puo registrare per il sito raiplay.it nel terminale di linux o in windows 10)

@sartoriluigi
Copy link
Author

@sartoriluigi sartoriluigi commented Nov 21, 2019

@ytdl-org ytdl-org locked and limited conversation to collaborators Nov 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.