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

Bandcamp: "ValueError: unknown url type" randomly happening #7077

Closed
Ezwen opened this issue Oct 6, 2015 · 4 comments
Closed

Bandcamp: "ValueError: unknown url type" randomly happening #7077

Ezwen opened this issue Oct 6, 2015 · 4 comments

Comments

@Ezwen
Copy link

@Ezwen Ezwen commented Oct 6, 2015

Hello!

I have an error that seems to randomly happen when downloading bandcamp content. I apologize in advance for the difficulties to reproduce the bug, but it's been happening in all my albums downloads recently.

For instance I was downloading this album http://music.gamechops.com/album/spindash-2 with the following command:

youtube-dl -x  -c -R 20 --audio-format vorbis --autonumber-size 2  -o "%(autonumber)s - %(title)s.%(ext)s" http://music.gamechops.com/album/spindash-2

And here is the error that may pop randomly when downloading a song:

Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 9, in <module>
    load_entry_point('youtube-dl==2015.9.9', 'console_scripts', 'youtube-dl')()
  File "/usr/lib/python2.7/site-packages/youtube_dl/__init__.py", line 410, in main
    _real_main(argv)
  File "/usr/lib/python2.7/site-packages/youtube_dl/__init__.py", line 400, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1658, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 671, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 724, in process_ie_result
    extra_info=extra_info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 671, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 832, in process_ie_result
    extra_info=extra)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 724, in process_ie_result
    extra_info=extra_info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 671, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 717, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1328, in process_video_result
    self.process_info(new_info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1590, in process_info
    success = dl(filename, info_dict)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1532, in dl
    return fd.download(name, info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/downloader/common.py", line 342, in download
    return self.real_download(filename, info_dict)
  File "/usr/lib/python2.7/site-packages/youtube_dl/downloader/http.py", line 60, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1865, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 423, in open
    protocol = req.get_type()
  File "/usr/lib64/python2.7/urllib2.py", line 285, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: //popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=b4f344e93c9e69e7bd735bc2463128c4&id=3437592711&stream=1&ts=1443966805.0

Hence I has to restart the download where it stopped (using --playlist-start) each time the error happened, and I eventually managed to download the whole album.

@dstftw dstftw closed this in f648e68 Oct 6, 2015
@Ezwen
Copy link
Author

@Ezwen Ezwen commented Oct 6, 2015

That was fast. Thanks! :)

@bontibon
Copy link

@bontibon bontibon commented Oct 15, 2015

This is still happening for me on master, @dstftw.

%  youtube-dl https://suduaya.bandcamp.com/album/beyond-galaxies
[Bandcamp:album] beyond-galaxies: Downloading webpage
[download] Downloading playlist: Beyond Galaxies
[Bandcamp:album] playlist Beyond Galaxies: Collected 9 video ids (downloading 9 of them)
[download] Downloading video 1 of 9
[Bandcamp] 1-feel-the-moment: Downloading webpage
Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 9, in <module>
    load_entry_point('youtube-dl==2015.10.13', 'console_scripts', 'youtube-dl')()
  File "/usr/lib/python3.5/site-packages/youtube_dl/__init__.py", line 410, in main
    _real_main(argv)
  File "/usr/lib/python3.5/site-packages/youtube_dl/__init__.py", line 400, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1665, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 671, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 832, in process_ie_result
    extra_info=extra)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 724, in process_ie_result
    extra_info=extra_info)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 671, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 717, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1295, in process_video_result
    format['http_headers'] = self._calc_headers(full_format_info)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1181, in _calc_headers
    cookies = self._calc_cookies(info_dict)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1188, in _calc_cookies
    pr = compat_urllib_request.Request(info_dict['url'])
  File "/usr/lib/python3.5/urllib/request.py", line 268, in __init__
    self.full_url = url
  File "/usr/lib/python3.5/urllib/request.py", line 294, in full_url
    self._parse()
  File "/usr/lib/python3.5/urllib/request.py", line 323, in _parse
    raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=cdf28c8d0a3e10a7857dd7a33c4e26c4&id=2823640413&stream=1&ts=1444409320.0'
@azimut
Copy link

@azimut azimut commented Oct 16, 2015

+1

dstftw added a commit that referenced this issue Oct 16, 2015
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 16, 2015

Fixed in 2015.10.16.

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.