Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
NHL: Failed to parse JSON #7447
Comments
|
The problem seems to be that the URL used to extract json metadata for the second video returns no json data, which causes an error when parsing the data. The json URL for the video that downloads successfully is here: The json URL for the video that does not download successfully is here: So the problem may be on the NHL server's side. It may be the case that some videos have a different URL structure for retrieving json header data, or the NHL site maintainers failed to supply the json metadata for that specific video. Ringo - Can you supply one or more URLs that you are experiencing this same error, or is this the only one you have encountered? I have tried several random URLs and very few of them have this same problem. |
|
I believe this is the only example... well over 99% of the NHL URLs we have processed work perfectly. If we come across another example (which seems unlikely) then we can revisit it then. Thanks very much for looking into this |
|
I think this should be closed |
Save video....
This URL does work:
http://video.canucks.nhl.com/videocenter/console?id=869769&catid=6
This URL does NOT work:
http://video.canucks.nhl.com/videocenter/console?catid=804&id=443912&lang=en&_ga=1.4300209.385542312.1447105087
youtube-dl.py -v "http://video.canucks.nhl.com/videocenter/console?catid=804&id=443912&lang=en&_ga=1.4300209.385542312.1447105087"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://video.canucks.nhl.com/videocenter/console?catid=804&id=443912&lang=en&ga=1.4300209.385542312.1447105087']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2015.11.10
[debug] Python version 2.7.5 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-71727-g46778ab, rtmpdump 2.4
[debug] Proxy map: {}
[nhl.com] 443912: Downloading JSON metadata
ERROR: 443912: 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 late
outube-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:\Transmogrifier\youtube-dl.py\youtube_dl\extractor\common.py", line 483, in parse_json
return json.loads(json_string)
File "C:\Python27\lib\json__init.py", line 338, in loads
return _default_decoder.decode(s)
File "C:\Python27\lib\json\decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python27\lib\json\decoder.py", line 383, 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:\Transmogrifier\youtube-dl.py\youtube_dl\YoutubeDL.py", line 661, in extract_info
ie_result = ie.extract(url)
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\extractor\common.py", line 290, in extract
return self._real_extract(url)
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\extractor\nhl.py", line 146, in _real_extract
return self._real_extract_video(video_id)
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\extractor\nhl.py", line 29, in _real_extract_video
json_url, video_id, transform_source=self._fix_json)
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\extractor\common.py", line 477, in _download_json
json_string, video_id, transform_source=transform_source, fatal=fatal)
File "C:\Transmogrifier\youtube-dl.py\youtube_dl\extractor\common.py", line 487, in _parse_json
raise ExtractorError(errmsg, cause=ve)
ExtractorError: 443912: 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
; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Amazing as always...thanks
Ringo