0

youtube-dl is showing me this message all the time. What should I do?

$ youtube-dl https://www.youtube.com/watch?v=t-xPlsYmYXY
[youtube] Setting language
WARNING: unable to set language: <urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol>
[youtube] t-xPlsYmYXY: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol>

2 Answers2

2
$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install youtube-dl

Update: Similarly, instead using any third party PPA, you can use curl or wget command to install latest version of youtube-dl script as shown.

$ sudo curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl
OR
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

After downloading the script, set the executable permission.

$ sudo chmod a+rx /usr/local/bin/youtube-dl
0

The protocol it might be violating might just be SSL, try using the --no-check-certificate or --prefer-insecure flags:

youtube-dl --no-check-certificate https://www.youtube.com/watch?v=t-xPlsYmYXY

or

youtube-dl --prefer-insecure https://www.youtube.com/watch?v=t-xPlsYmYXY

It might also be a youtube-dl bug related specifically to your system settings. For instance, make sure that your system clock is accurate, else it could invalidate the SSL certificate.

You might want to read the rest of the youtube-dl documentation.

uncanny_valley
  • 95
  • 1
  • 1
  • 9