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

No JSON object could be decoded - Investigation Discovery #14157

Open
merval opened this issue Sep 9, 2017 · 14 comments
Open

No JSON object could be decoded - Investigation Discovery #14157

merval opened this issue Sep 9, 2017 · 14 comments

Comments

@merval
Copy link

@merval merval commented Sep 9, 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.09.02. 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.09.02

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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

youtube-dl --cookies cookies.txt https://www.investigationdiscovery.com/tv-shows/homicide-hunter-joe-kenda/full-episodes/raise-the-dead --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--cookies', u'cookies.txt', u'https://www.investigationdiscovery.com/tv-shows/homicide-hunter-joe-kenda/full-episodes/raise-the-dead', u'--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.09.02
[debug] Python version 2.7.10 - Darwin-16.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.0.2, ffprobe 3.0.2, rtmpdump 2.4
[debug] Proxy map: {}
[Discovery] raise-the-dead: Downloading JSON metadata
ERROR: raise-the-dead: 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; 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 "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 691, in _parse_json
    return json.loads(json_string)
  File "/Users/dan/.pyenv/versions/2.7.10/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/Users/dan/.pyenv/versions/2.7.10/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/dan/.pyenv/versions/2.7.10/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 776, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 434, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/discovery.py", line 67, in _real_extract
    info = self._download_json(url + '?flat=1', display_id)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 685, in _download_json
    json_string, video_id, transform_source=transform_source, fatal=fatal)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 695, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
ExtractorError: raise-the-dead: 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; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.


If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

@dare2
Copy link

@dare2 dare2 commented Sep 27, 2017

Has anyone looked into this issue? I am getting the same result with version 2017.09.24.

@dare2
Copy link

@dare2 dare2 commented Sep 27, 2017

On further inspection, my error is slightly different:

youtube-dl --verbose --cookies idgo.txt -f best[height=720] https://www.investigationdiscovery.com/tv-shows/i-almost-got-away-with-it/full-episodes/got-to-get-bike-parts
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--cookies', 'idgo.txt', '-f', 'best[height=720]', 'https://www.investigationdiscovery.com/tv-shows/i-almost-got-away-with-it/full-episodes/got-to-get-bike-parts']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2017.09.24
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-81707-g11777eb, ffprobe N-81707-g11777eb, rtmpdump 2.4
[debug] Proxy map: {}
[Discovery] got-to-get-bike-parts: Downloading JSON metadata
ERROR: got-to-get-bike-parts: Failed to parse JSON (caused by ValueError('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 "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp1uop9avr\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 361, in raw_decode
ValueError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp1uop9avr\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 361, in raw_decode
ValueError: Expecting value: line 1 column 1 (char 0)

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\tmp1uop9avr\build\youtube_dl\YoutubeDL.py", line 777, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp1uop9avr\build\youtube_dl\extractor\common.py", line 434, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp1uop9avr\build\youtube_dl\extractor\discovery.py", line 67, in _real_extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp1uop9avr\build\youtube_dl\extractor\common.py", line 685, in _download_json
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp1uop9avr\build\youtube_dl\extractor\common.py", line 695, in _parse_json
youtube_dl.utils.ExtractorError: got-to-get-bike-parts: Failed to parse JSON (caused by ValueError('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.

@cookieguru
Copy link

@cookieguru cookieguru commented Sep 28, 2017

I can't say for sure about ID, but Discovery and Science moved from Akamai to Uplynk yesterday.

The data-video attribute on the <div> with class video-player-container still appears to have the same metadata and structure.

@merval and @dare2 if this is still an issue could post the HTML of the downloaded webpage from the Discovery site (logged in if necessary) using the --write-pages option that might help track down the issue.

@cookieguru
Copy link

@cookieguru cookieguru commented Sep 28, 2017

Interesting, that link on Discovery is still using Akamai, and I know for sure some others have transitioned to Uplynk. Today is the first day I've seen anything hosted on Uplynk.

On your ID link you haven't signed in so the video link isn't available.

@dare2
Copy link

@dare2 dare2 commented Sep 28, 2017

Interesting. I am signed in (using Chrome), grabbed from the cookies.txt extension and pasted into idgo.txt:

HTTP Cookie File for investigationdiscovery.com by Genuinous @Genuinous.

To download cookies for this tab click here, or download all cookies.

Usage Examples:

1) wget -x --load-cookies cookies.txt "https://www.investigationdiscovery.com/tv-shows/i-almost-got-away-with-it/"

2) curl --cookie cookies.txt "https://www.investigationdiscovery.com/tv-shows/i-almost-got-away-with-it/"

3) aria2c --load-cookies cookies.txt "https://www.investigationdiscovery.com/tv-shows/i-almost-got-away-with-it/"

www.investigationdiscovery.com FALSE /tv-shows/i-almost-got-away-with-it/full-episodes FALSE 0 user_experiment_id bbfab813-3253-4972-89b1-297a63aaf55a
www.investigationdiscovery.com FALSE /shared/ad-enablers FALSE 0 user_experiment_id fe45ab6f-fac5-45c1-b82c-337756c0a534
www.investigationdiscovery.com FALSE /tv-shows FALSE 0 user_experiment_id ad8a17ca-4922-4d5d-a4c1-6ecd2f786835
www.investigationdiscovery.com FALSE / TRUE 1516997403 eosAd 57a9eb816b66d14b2ff8aedc
www.investigationdiscovery.com FALSE / TRUE 0 eos-ad-bumper true
www.investigationdiscovery.com FALSE / FALSE 0 user_experiment_id d1f548a3-f7c2-46b2-99cb-d9b95f36c224
www.investigationdiscovery.com FALSE / TRUE 1516998990 eosAf %257B%2522a%2522%253A%2522eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpZCI6IjQxMDk0ZmI5NGY0OWM3ZDBiZGNkMDQwOWNhYTQzZjE4MzM5YTA2ZWMiLCJqdGkiOiI0MTA5NGZiOTRmNDljN2QwYmRjZDA0MDljYWE0M2YxODMzOWEwNmVjIiwiaXNzIjoiaHR0cHM6XC9cL2xvZ2luLmRpc2NvdmVyeS5jb20iLCJhdWQiOiIzMDIwYTQwYzIzNTZhNjQ1YjRiNCIsInN1YiI6eyJmbG93IjoiYWRvYmUiLCJhdXRoZW50aWNhdG9yIjoiRFRWIiwiYWZmaWxpYXRlaWQiOiI1N2E5ZWI4MTZiNjZkMTRiMmZmOGFlZGMiLCJyZXF1ZXN0b3JpZCI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TXBQMwdtWOA-r0YQAHQ-abHDf2ZM8oFjXxN-q8K35cqDdRXxFoKTwJKqrb-ZcGl_cLcPApwqnDUvgMsU7IVZh-nsN4YwUiTqwlCqTJ0PV6NcAYBNdCeJUj999-yTUFplbKLirdIPp_G5Yl73SPaRM3PxZEsvUlgV5Q7NW_bK4nmNlXsUmS6o38WY9ya-jJid3S0hCLSCeG4URmVCibD4JOPb7I2vay8-YEV66VmC7B6NgaOH-nXH-zZOSkD37x5C38faYx8hA6O-FhYcp_TXVCdxxyTJlceMWNtdSi5PWWPhQS6wuqGlcOSNG2jhPXOQI6wFZSUaCAo7YUUatSPS5Ymk-VgYHEYgCB5T8Tn7VWrFzhOh-A3gvqtCXFlFJs16xi4oblasCyNaH55RABTzgkPtIIye-RrlWTw3g7NkrUNC2JOzgdaprCz0hplFuBB90Nmz-pqIcnTtThwaUJ8sR4NFnFFTYd70c7q7ZHUdrQvHXZ-sheAqwak710XTApofKOiXED-7YKrAaE-jDm2SuonEsGjcomMcs7e_h8%2522%252C%2522r%2522%253A%25229c5071e435280bc660e09ee90a1d22dce13d7f8a%2522%252C%2522x%2522%253A%25223600%2522%252C%2522t%2522%253A8388190551%252C%2522b%2522%253A%2522u%2522%252C%2522h%2522%253A%25220832962e75a69be9e03291e99506af7c%2522%252C%2522u%2522%253A%2522DTV%257C9d52f967bb239e848cc69d985728a8e7%2522%257D

Then after I run this command:

youtube-dl --cookies idgo.txt -F http://www.investigationdiscovery.com/tv-shows/i-almost-got-away-with-it/full-episodes/got-revenge --write-pages

...the contents of the idgo.txt file changes to:

Netscape HTTP Cookie File

http://curl.haxx.se/rfc/cookie_spec.html

This is a generated file! Do not edit.

www.investigationdiscovery.com FALSE / TRUE 1516997403 eosAd 57a9eb816b66d14b2ff8aedc
www.investigationdiscovery.com FALSE / TRUE 1516995820 eosAf %257B%2522a%2522%253A%2522eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpZCI6IjQxMDk0ZmI5NGY0OW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ljYXRlZCI6eyJmaWx0ZXIiOnsibmV0d29ya3MuY29kZSI6WyJpZHMiXX19LCJ1bmF1dGhlbnRpY2F0ZWQiOltdfX0sInNlYXJjaCI6W10sImltYWdlcyI6eyJhc3NldCI6W119LCJ1c2VyIjp7ImFjdGl2YXRpb24iOltdfSwiZW50aXRsZW1lbnRzIjp7ImVycm9ycyI6W119fX0.LiWfMXpnJ-6XZvfpkivRYybCfRB6zgJd7SsNkM4xWhl20v7r07ytZQAFokYC2m2r5aC0y_rW7yOsYgEw1PGvEYDCoFN8XHIWIWGVTNCRGOfuC4w40lCH4bY2xmRfbEC1Srqp7TXBQMwdtWOA-r0YQAHQ-abHDf2ZM8oFjXxN-q8K35cqDdRXxFoKTwJKqrb-ZcGl_cLcPApwqnDUvgMsU7IVZh-nsN4YwUiTqwlCqTJ0PV6NcAYBNdCeJUj999-yTUFplbKLirdIPp_G5Yl73SPaRM3PxZEsvUlgV5Q7NW_bK4nmNlXsUmS6o38WY9ya-jJid3S0hCLSCeG4URmVCibD4JOPb7I2vay8-YEV66VmC7B6NgaOH-nXH-zZOSkD37x5C38faYx8hA6O-FhYcp_TXVCdxxyTJlceMWNtdSi5PWWPhQS6wuqGlcOSNG2jhPXOQI6wFZSUaCAo7YUUatSPS5Ymk-VgYHEYgCB5T8Tn7VWrFzhOh-A3gvqtCXFlFJs16xi4oblasCyNaH55RABTzgkPtIIye-RrlWTw3g7NkrUNC2JOzgdaprCz0hplFuBB90Nmz-pqIcnTtThwaUJ8sR4NFnFFTYd70c7q7ZHUdrQvHXZ-sheAqwak710XTApofKOiXED-7YKrAaE-jDm2SuonEsGjcomMcs7e_h8%2522%252C%2522r%2522%253A%25229c5071e435280bc660e09ee90a1d22dce13d7f8a%2522%252C%2522x%2522%253A%25223600%2522%252C%2522t%2522%253A8388620391%252C%2522b%2522%253A%2522u%2522%252C%2522h%2522%253A%25220832962e75a69be9e03291e99506af7c%2522%252C%2522u%2522%253A%2522DTV%257C9d52f967bb239e848cc69d985728a8e7%2522%257D

with the same error message and dump file.

@cookieguru
Copy link

@cookieguru cookieguru commented Sep 28, 2017

The video requires signing in. Simply generating cookies through wget and then pointing youtube-dl at them will not work. The cookie holds the authentication token, so if you didn't sign in, your cookies are as good as anyone's that has visited the site for the first time. Try something such as the --ap-mso flag or export your cookies from a browser.

@dare2
Copy link

@dare2 dare2 commented Sep 28, 2017

That's exactly what I did. I exported my cookies from my browser after I signed in. I also tried the --ap-mso option to no effect.

@dare2
Copy link

@dare2 dare2 commented Sep 28, 2017

I found the issue. I had been trying to use the investigationdiscovery.com site instead of the investigationdiscoverygo.com site. The "Go" site works fine with extracted cookies. The "non-Go" site does not.

@merval
Copy link
Author

@merval merval commented Sep 28, 2017

I'll have to test later as I'm not currently able to. If that is all it is, I'm going to feel pretty silly.

@dare2
Copy link

@dare2 dare2 commented Sep 28, 2017

Now if we could just get some activity or clarification on the TBS problem. 13658

:)

@dare2
Copy link

@dare2 dare2 commented Sep 29, 2017

@merval The URLs are different on the IDGO site. Take out the "full-episodes/" from the URL.

@merval
Copy link
Author

@merval merval commented Sep 29, 2017

Well. I appear to have noob'd the hell out of this one. That works without an issue.

@cdchris12
Copy link

@cdchris12 cdchris12 commented Oct 28, 2017

@dare2 I just ran into this same error, and spent a few hours trying to track down what the hell was going on. We're all n00bs down here, apparently. :-)

remitamine added a commit that referenced this issue Dec 12, 2017
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.