youtube-dl failed to extract signature

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 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 # start with snap run youtube-dl  

or

sudo 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?.


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


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"

Tags:

Youtube Dl