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:set URL with token incorrectly classified as soundcloud #10505

Closed
4 of 8 tasks
pgkos opened this issue Aug 30, 2016 · 2 comments
Closed
4 of 8 tasks

soundcloud:set URL with token incorrectly classified as soundcloud #10505

pgkos opened this issue Aug 30, 2016 · 2 comments

Comments

@pgkos
Copy link

pgkos commented Aug 30, 2016

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 that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.08.28. 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 2016.08.28

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably 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

Description of your issue, suggested solution and other information

Soundcloud:set URLs of the form:

https://soundcloud.com/uploader/sets/title/token

get incorrectly classified as "Soundcloud", as the _VALID_URL pattern in SoundcloudIE class matches this kind of URL, but it should not (only SoundcloudSetIE._VALID_URL should match this).

The issue only occurs on URLs with token part.

This does not happen all the time - I suspect the Python's hash seed determines the order of checking the URL patterns, so for a particular URL downloading may fail in about half of the runs of youtube-dl.

If it gets incorrectly classified as "Soundcloud", then the download fails with the message "Unable to download JSON metadata: HTTP Error 404".

@dstftw
Copy link
Collaborator

dstftw commented Aug 30, 2016

Carefully read new issue template and provide all requested information.

@dstftw dstftw closed this as completed Aug 30, 2016
@pgkos
Copy link
Author

pgkos commented Aug 30, 2016

Sorry, I cannot provide you the exact output/URL as the issue mainly occurs on private playlist URLs.
Here's the youtube-dl --verbose output (with dummy URL):

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'https://soundcloud.com/UPLOADER/sets/TITLE/TOKEN']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.08.28
[debug] Python version 3.5.2 - Linux-4.7.2-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 3.1.1, ffprobe 3.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[soundcloud] UPLOADER/sets: Resolving id
[soundcloud] UPLOADER/sets: Downloading info JSON
[soundcloud] 123456789: Downloading track url
ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 394, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1998, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants