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>
Sumeet Deshmukh
  • 8,628
  • 11
  • 55
  • 93
Manoj Kumar
  • 1
  • 1
  • 2
  • What is youtube-dl verison? – fosslinux Jul 22 '16 at 02:25
  • updated version. – Manoj Kumar Jul 22 '16 at 02:29
  • I just tried downloading that video and it works fine. Are you sure you have the latest version of youtube-dl from https://rg3.github.io/youtube-dl/download.html? – Alcuin Arundel Jul 22 '16 at 02:36
  • Remove the repository version and then follow this: http://askubuntu.com/a/380460/57576 – andrew.46 Jul 22 '16 at 03:13
  • [This question](http://askubuntu.com/questions/809338/error-when-downloading-youtube-videos) maybe could help you. It seems youtube has restrictions to download some videos. Other tolls has the same problem. The last youtube-dl workaround this problem, at least until now. – gwarah Aug 19 '16 at 09:14

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
Reza Bojnordi
  • 251
  • 1
  • 3
  • 18
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