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" using ytsearch #26914

Closed
rgabbo opened this issue Oct 17, 2020 · 0 comments
Closed

"Failed to parse json" using ytsearch #26914

rgabbo opened this issue Oct 17, 2020 · 0 comments
Labels

Comments

@rgabbo
Copy link

@rgabbo rgabbo commented Oct 17, 2020

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.09.20
  • 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 searched the bugtracker for similar issues including closed ones

Description

Running the command youtube-dl ytsearch:elvis -g -x --verbose to extract audio url of a query. However I get two different outputs from the same machine.

Output when command works as intended

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['ytsearch:elvis', '-g', '-x', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: none
[debug] Proxy map: {}
https://r7---sn-45nufxc-4jvl.googlevideo.com/videoplayback?expire=1602956216&ei=WNeKX_DHIIyR1gLJ777gCg&ip=2001%3Ab07%3A6466%3A8092%3A611e%3A40b8%3A8278%3A8a8d&id=o-AGv2i6dJeweZrwyNoFoKaJAgG0DXIT12ucdvMwQnIEXx&itag=251&source=youtube&requiressl=yes&mh=zU&mm=31%2C26&mn=sn-45nufxc-4jvl%2Csn-hgn7rn7k&ms=au%2Conr&mv=m&mvi=7&pcm2cms=yes&pl=47&gcr=it&initcwndbps=1253750&vprv=1&mime=audio%2Fwebm&gir=yes&clen=3124753&dur=180.661&lmt=1582667918893951&mt=1602934477&fvip=1&keepalive=yes&fexp=23915654&c=WEB&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgTfDXwz0Jhxd8kBD_MJ4hP36TERcXSuJiXuVBv6_r-XUCIAWNfqIGFeYBdN6MDUUVdYw52_h8dE4c3T5Kftpqmxlq&sig=AOq0QJ8wRAIgUzQC27Hi-Js1AHyKAo7P1_hSjuXaZO379jVZmwbxy7kCICCHStpyOz_vOGdgKxjqAHtQyvBHWauf0dDqocaqb7y5&ratebypass=yes

Output with error:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['ytsearch:elvis', '-g', '-x', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: none
[debug] Proxy map: {}
ERROR: query "elvis": 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\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 904, 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\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 904, 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\ytdl-org\tmpksi3o1r1\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 532, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 3004, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\youtube.py", line 3204, in _get_n_results
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 897, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 881, in _download_json_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\extractor\common.py", line 908, in _parse_json
youtube_dl.utils.ExtractorError: query "elvis": 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.
@dstftw dstftw closed this Oct 17, 2020
@dstftw dstftw added the duplicate label Oct 17, 2020
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.