49

It is considered very useful to utilize youtube-dl software for downloading youtubes.

A message is seen and it stopped working, which is following.

ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 479, in _decrypt_signature
    video_id, player_url, s
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 383, in _extract_signature_function
    res = self._parse_sig_js(code)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 454, in _parse_sig_js
    u'Initial JS player signature function name')
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 391, in _search_regex
    raise RegexNotFoundError(u'Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.

What should I do to proceed?

wjandrea
  • 14,504
HYU
  • 1,275

6 Answers6

73

You are getting this error:

Unable to extract Initial JS player signature function name

...because youtube-dl is not up-to-date. Google has been changing the way to access YouTube videos more frequently now than was the case a few years ago, so in order to keep youtube-dl up-to-date, it has to be updated more frequently too. To install the latest version of youtube-dl open the terminal and type:

sudo snap install youtube-dl # start with snap run youtube-dl 

or:

sudo apt remove youtube-dl  
sudo apt install python3-pip
python3 -m pip install youtube-dl

To upgrade youtube-dl to the latest version:

sudo snap install youtube-dl # youtube-dl snap is automatically upgraded 

or

python3 -m pip install --upgrade youtube-dl    

It's crazy how frequently Google has been changing the code for accessing videos on YouTube. I seem to have remembered updating youtube-dl only a couple of month's ago, but it still couldn't download the selected video until I updated it.

youtube-dl is a Python program, so you can also locally install the latest version of youtube-dl in a Python virtual environment. For information about how to setup and use a Python virtual environment see How to set up and use a virtual python environment in Ubuntu?.

karel
  • 122,292
  • 133
  • 301
  • 332
6

The only way I was to get it working was the latest version (for me on debian) with

sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
hash -r

from the github repo

3

I had the same problem and this solved it

 sudo -H pip install --upgrade youtube-dl

and try to put the link into "link"

James Gates
  • 1,119
3

It once happened to me. As they said on comments you must update your system or just youtube-dl. Also is good use quotes as follow in this example:

youtube-dl "https://www.youtube.com/watch?v=n6AL-WpgoFw"
E_Angel
  • 391
2

Only this way is working for me!

When I trip every time I take the new music, and here is how to install youtube-dl from pip.

If you install it from repo, it cannot download the music, always complains!. So use this to download spongebob relaxing masterpeace:

!pip install --upgrade youtube-dl 
!youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=oq526_37wc0
prosti
  • 1,085
0

None of these answers worked for me. I got this thing work by using the instruction given in the error:-

sudo youtube-dl -U

I don't know the exact reason for why this way of update worked and not that upgrade command..

Vicrobot
  • 170