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

tubitv.com: Failed to parse JSON #26660

Open
xHire opened this issue Sep 21, 2020 · 2 comments
Open

tubitv.com: Failed to parse JSON #26660

xHire opened this issue Sep 21, 2020 · 2 comments

Comments

@xHire
Copy link

@xHire xHire commented Sep 21, 2020

$ youtube-dl -v https://tubitv.com/tv-shows/534797/s02_e01_meadow_lake
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://tubitv.com/tv-shows/534797/s02_e01_meadow_lake']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.7.7 (CPython) - Linux-5.8.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-10510U_CPU_@_1.80GHz-with-gentoo-2.6
[debug] exe versions: ffmpeg 4.2.3, ffprobe 4.2.3, rtmpdump 2.4
[debug] Proxy map: {}
[debug] Using fake IP 6.9.184.38 (US) as X-Forwarded-For.
[TubiTv] 534797: Downloading JSON metadata
ERROR: 534797: Failed to parse JSON  (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)')); 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 "/home/xhire/bin/youtube-dl/youtube_dl/extractor/common.py", line 904, in _parse_json
    return json.loads(json_string)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/home/xhire/bin/youtube-dl/youtube_dl/extractor/common.py", line 904, in _parse_json
    return json.loads(json_string)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xhire/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/home/xhire/bin/youtube-dl/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/home/xhire/bin/youtube-dl/youtube_dl/extractor/tubitv.py", line 62, in _real_extract
    'http://tubitv.com/oz/videos/%s/content' % video_id, video_id)
  File "/home/xhire/bin/youtube-dl/youtube_dl/extractor/common.py", line 897, in _download_json
    expected_status=expected_status)
  File "/home/xhire/bin/youtube-dl/youtube_dl/extractor/common.py", line 881, in _download_json_handle
    fatal=fatal), urlh
  File "/home/xhire/bin/youtube-dl/youtube_dl/extractor/common.py", line 908, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
youtube_dl.utils.ExtractorError: 534797: Failed to parse JSON  (caused by JSONDecodeError('Expecting value: line 1 column 1 (char 0)')); 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.

I tried several random URLs from tubitv.com, but all failed.

@TheGrimKeeper
Copy link

@TheGrimKeeper TheGrimKeeper commented Sep 23, 2020

This link is working for me. Maybe it was a temporary problem with the website?

@xHire
Copy link
Author

@xHire xHire commented Sep 24, 2020

Hm, still doesn’t work for me… Can I somehow dump the data that it fails to parse as JSON? One possibility that comes to my mind is that the X-Forwarded-For doesn’t work and the website enforces its EU ban (in which case, youtube-dl could just inform me about it).

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