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

Soundcloud: still unable to download JSON metadata #20699

Closed
eblanca opened this issue Apr 17, 2019 · 2 comments
Closed

Soundcloud: still unable to download JSON metadata #20699

eblanca opened this issue Apr 17, 2019 · 2 comments

Comments

@eblanca
Copy link

@eblanca eblanca commented Apr 17, 2019

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 2019.04.17. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • [x ] I've verified and I assure that I'm running youtube-dl 2019.04.17

Before submitting an issue make sure you have:

  • [x ] At least skimmed through the README, most notably the FAQ and BUGS sections
  • [x ] Searched the bugtracker for similar issues including closed ones
  • [x ] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • [x ] 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


[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-F', u'--verbose', u'https://soundcloud.com/giovannisarani/mezzo-valzer']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.04.17
[debug] Python version 2.7.13 (CPython) - Linux-4.9.0-8-amd64-x86_64-with-LinuxMint-3-cindy
[debug] exe versions: ffmpeg 3.3.9, ffprobe 3.3.9
[debug] Proxy map: {}
[soundcloud] giovannisarani/mezzo-valzer: Resolving id
[soundcloud] giovannisarani/mezzo-valzer: Downloading info JSON
[soundcloud] 583011102: Downloading track url
ERROR: Unable to download JSON metadata: HTTP Error 401: Unauthorized (caused by HTTPError()); 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.
  File "./youtube-dl/youtube_dl/extractor/common.py", line 626, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2227, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

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

Well, I was trying to get information from a page hosting a particular song, and this (a couple of years ago, truth be told) gave me the ability to download the audio file itself.
Now this new error message I can't handle.
Feel free to ask for any further details, if needed.

@marcel-dempers
Copy link

@marcel-dempers marcel-dempers commented Apr 18, 2019

Same issue for me

/app # youtube-dl --verbose https://soundcloud.com/grizzlysbeatz/summer-time
[debug] System config: ['-o', '/data/%(title)s.%(ext)s']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://soundcloud.com/grizzlysbeatz/summer-time']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.04.17
[debug] Python version 3.6.8 (CPython) - Linux-4.9.125-linuxkit-x86_64-with
[debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2
[debug] Proxy map: {}
[soundcloud] grizzlysbeatz/summer-time: Resolving id
[soundcloud] grizzlysbeatz/summer-time: Downloading info JSON
[soundcloud] 196922768: Downloading track url
ERROR: Unable to download JSON metadata: HTTP Error 401: Unauthorized (caused by <HTTPError 401: 'Unauthorized'>); 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.  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 626, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2227, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/local/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
@marcel-dempers
Copy link

@marcel-dempers marcel-dempers commented Apr 21, 2019

I've been trying to get down to the bottom of this. I noticed that it works on some songs.
Example: ./youtube-dl https://soundcloud.com/soukomusic/parallel works fine.
Example: ./youtube-dl https://soundcloud.com/grizzlysbeatz/summer-time does not work.

For developers:

On common.py line 626 I print out :

print("before error : url_or_request {}".format(url_or_request))

I notice i get a URL:

https://api.soundcloud.com/resolve.json?url=https://soundcloud.com/grizzlysbeatz/summer-time&client_id=NmW1FlPaiL94ueEu7oziOWjYEzZzQDcK

When I open this URL in the browser and look at the network tab, refresh, I can see a 401 permission denied error.

test

For the other working song URL it will start streaming the content in.

I am still digging to see what I can find so I can suggest a fix, but definitely something weird going on here if anyone wants to assist digging :)

@dstftw dstftw closed this in e09965d Apr 22, 2019
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.