ERROR: "token" parameter not in video info in youtube-dl
Solution 1:
Update youtube-dl to the latest version.
sudo youtube-dl -U # no longer supported in Debian-based systems
If youtube-dl cannot be updated with this command, install the latest version of youtube-dl using Alternative Python package installer (pip).
sudo apt-get remove youtube-dl
sudo apt-get install python-pip
pip install --user youtube-dl
In Ubuntu 14.04 and later youtube-dl is a snap package. To install it:
sudo snap install youtube-dl
The youtube-dl snap package will be updated automatically in the background when updates become available.
Solution 2:
Keeping youtube-dl updated:
youtube-dl
is an application that is updated every couple of weeks to match changes made by upstream services such as YouTube. Consequently keeping it update is a busy task. As of Ubuntu 18.04 there is a special issue where the Ubuntu package can no longer be 'manually' updated. Thus the command youtube-dl -U
does not work with the repository version of youtube-dl
.
Recent Issues with the Ubuntu package:
The Debian package managers for youtube-dl have felt that it "contains a (possibly-insecure) self-update mechanism" and have patched this auto-update mechanism completely out of the application. The bug report and discussion are here:
Debian Bug report logs - #890119
youtube-dl contains a (possibly-insecure) self-update mechanism
The patch to youtube-dl is quite extensive and arguably a little destructive. It can be seen in full here... Note the comment at the top of the patch:
Knowledgeable users will know what to do in any case.
And the good news is that are 2 very good methods for 'knowledgeable users' to keep youtube-dl
updated:
1. Update using wget:
And for my own part that involves the following simple commands which remove the repository youtube-dl and manually install the most recent version:
sudo apt-get remove youtube-dl
sudo mkdir -pv /usr/local/bin
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
And now youtube-dl will function as before :). Bear in mind that you will need to periodically manually update youtube-dl (by running youtube-dl -U
) rather than expect the package manager to do it for you...
2. Updating using the pip installer:
You can instead use the Alternative Python package installer (pip) to update youtube-dl
as follows:
sudo apt-get remove youtube-dl
sudo apt-get install python-pip
sudo pip install youtube-dl
Then subsequently you can update youtube-dl
by running the following:
sudo pip install --upgrade youtube_dl
And now enjoy your offline viewing of YouTube's great video offerings :).