ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.8k stars 9.99k forks source link

Raiplay JSON error #26864

Closed ssibb closed 3 years ago

ssibb commented 4 years ago

Hello everybody,

I just want to report this error trying to download from Raiplay (I'm using the latest version available on python 2.7). I believe the Raiplay code is broken at least since August, when I remember having tried to download something, unfortunately without keeping logs of the error.

Other links might be found in this page: https://www.raiplay.it/programmi/superquarkpiu/superquark+/stagione-2019

Thank you and regards

C:\>youtube-dl --get-format --verbose  https://www.raiplay.it/video/2020/05/Superquark-piu-Il-grande-nemico-31611d9c-b9f7-4c7a-810b-00232e20d06b.html
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--get-format', u'--verbose', u'https://www.raiplay.it/video/2020/05/Superquark-piu-Il-grande-nemico-31611d9c-b9f7-4c7a-810b-00232e20d06b.html']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2020.09.20
[debug] Python version 2.7.15 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg N-93056-g1e03d60054, ffprobe N-93056-g1e03d60054
[debug] Proxy map: {}
ERROR: 31611d9c-b9f7-4c7a-810b-00232e20d06b: 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 "c:\program files (x86)\python 2.7\lib\site-packages\youtube_dl\extractor\common.py", line 904, in _parse_json
    return json.loads(json_string)
  File "c:\program files (x86)\python 2.7\lib\json\__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "c:\program files (x86)\python 2.7\lib\json\decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "c:\program files (x86)\python 2.7\lib\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 "c:\program files (x86)\python 2.7\lib\site-packages\youtube_dl\YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "c:\program files (x86)\python 2.7\lib\site-packages\youtube_dl\extractor\common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "c:\program files (x86)\python 2.7\lib\site-packages\youtube_dl\extractor\rai.py", line 174, in _real_extract
    '%s?json' % url, video_id, 'Downloading video JSON')
  File "c:\program files (x86)\python 2.7\lib\site-packages\youtube_dl\extractor\common.py", line 897, in _download_json
    expected_status=expected_status)
  File "c:\program files (x86)\python 2.7\lib\site-packages\youtube_dl\extractor\common.py", line 881, in _download_json_handle
    fatal=fatal), urlh
  File "c:\program files (x86)\python 2.7\lib\site-packages\youtube_dl\extractor\common.py", line 908, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
ExtractorError: 31611d9c-b9f7-4c7a-810b-00232e20d06b: 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.
iamleot commented 4 years ago

Hello @ssibb! https://github.com/ytdl-org/youtube-dl/pull/23040 should fix that.

iamleot commented 3 years ago

@dstftw can I please persuade you or anything else with commit access to possibly give a look to #23040? :) If that's geoblocked (I think so) I can easily rerun and recheck any possible test on demands.

Thanks!