regisb / spotify-onthego

Download Spotify playlists by searching for audio files on YouTube
GNU General Public License v3.0
71 stars 6 forks source link

IOError: ERROR: Signature extraction failed #19

Closed rain0r closed 7 years ago

rain0r commented 7 years ago
Downloading playlist 'Discover Weekly' (id=37i9dQZEVXcPhJBx1MHBux) from owner 'spotify'
++ Processing Frankie Reyes - Alma, Corazón y Vida
ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/extractor/youtube.py", line 1005, in _decrypt_signature
    video_id, player_url, s
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/extractor/youtube.py", line 919, in _extract_signature_function
    errnote='Download of %s failed' % player_url)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 519, in _download_webpage
    res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 426, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 406, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 2001, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 421, in open
    protocol = req.get_type()
  File "/usr/lib64/python2.7/urllib2.py", line 283, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: /yts/jsbin/player-en_US-vflkk7pUE/base.js
 (caused by ValueError(u'unknown url type: /yts/jsbin/player-en_US-vflkk7pUE/base.js',)); 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.
Traceback (most recent call last):
  File "/home/rainer/.virtualenvs/spotify-onthego/bin/spotify-playlist", line 11, in <module>
    load_entry_point('spotify-onthego==0.0.5', 'console_scripts', 'spotify-playlist')()
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/onthego/scripts/cli.py", line 45, in download_playlist
    youtube_downloader.audio(track)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/onthego/youtube.py", line 40, in audio
    audio_file_path = self.download_to_tmp(track)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/onthego/youtube.py", line 70, in download_to_tmp
    video = pafy.new(video_url)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/pafy/pafy.py", line 122, in new
    return Pafy(url, basic, gdata, size, callback, ydl_opts)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/pafy/backend_youtube_dl.py", line 29, in __init__
    super(YtdlPafy, self).__init__(*args, **kwargs)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/pafy/backend_shared.py", line 95, in __init__
    self._fetch_basic()
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/pafy/backend_youtube_dl.py", line 41, in _fetch_basic
    raise IOError(str(e).replace('YouTube said', 'Youtube says'))
IOError: ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/extractor/youtube.py", line 1005, in _decrypt_signature
    video_id, player_url, s
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/extractor/youtube.py", line 919, in _extract_signature_function
    errnote='Download of %s failed' % player_url)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 519, in _download_webpage
    res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding, data=data, headers=headers, query=query)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 426, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 406, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/home/rainer/.virtualenvs/spotify-onthego/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 2001, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 421, in open
    protocol = req.get_type()
  File "/usr/lib64/python2.7/urllib2.py", line 283, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: /yts/jsbin/player-en_US-vflkk7pUE/base.js
 (caused by ValueError(u'unknown url type: /yts/jsbin/player-en_US-vflkk7pUE/base.js',)); 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.

$ youtube-dl -U
youtube-dl is up-to-date (2017.02.01)
regisb commented 7 years ago

Looks like a yt-dl issue. Did you try submitting an issue on https://yt-dl.org/bug, as suggested?

rain0r commented 7 years ago

My fault. I was confused because I was pretty sure I had the most recent youtube-dl version. The error was that there's a separate youtube-dl installation in my virtualenv that wasn't up to date.

regisb commented 7 years ago

Tricky error. Thanks for investigating!