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

[YandexMusic] Fails #7153

Closed
steebchen opened this issue Oct 12, 2015 · 2 comments
Closed

[YandexMusic] Fails #7153

steebchen opened this issue Oct 12, 2015 · 2 comments

Comments

@steebchen
Copy link
Contributor

@steebchen steebchen commented Oct 12, 2015

When I download from Yandex Music, then this error occurrs:

my@PC ~ $ youtube-dl "https://music.yandex.ru/album/3011567/track/25514618" -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'https://music.yandex.ru/album/3011567/track/25514618', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.09.22
[debug] Python version 2.7.6 - Linux-3.16.0-38-generic-x86_64-with-LinuxMint-17.2-rafaela
[debug] exe versions: ffmpeg N-75403-g3a8e447, ffprobe N-75403-g3a8e447
[debug] Proxy map: {}
[yandexmusic:track] 25514618: Downloading track JSON
ERROR: 25514618: 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 480, in _parse_json
    return json.loads(json_string)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/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 660, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 287, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/yandexmusic.py", line 64, in _real_extract
    track_id, 'Downloading track JSON')['track']
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 474, 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 484, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
ExtractorError: 25514618: 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.

When I visit the site in a browser and I click on a random item, it tells me to enter a catpcha (but I can't solve it because I can't speak russion nor do I know these symbols). Shouldn't the ouput from youtube-dl be that you have to enter a captcha?

The site also says:
"we recommend using the specially designed for this purpose service Yandex.XML"
Is this possible?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 13, 2015

youtube-dl can't solve captcha. Once you solve it you can pass cookies to youtube-dl with --cookies. Note that it may only work in Russia, Ukraine, Kazakhstan, Belarus and Turkey.

@dstftw dstftw closed this Oct 13, 2015
@steebchen
Copy link
Contributor Author

@steebchen steebchen commented Oct 13, 2015

Of course it can't do that, but I mean that it should show an error message that a captcha has to be entered in the browser instead of "No JSON object could be decoded", if that's possible.

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.