Error while using youtube-dl

29,186

My fault:

I installed youtube-dl using command : sudo apt-get install youtube-dl

What should I have done:

I should have used commands (either one):

either

sudo curl -L https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

or

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

I used the first one and then it worked correctly.

Share:
29,186

Related videos on Youtube

rohit15079
Author by

rohit15079

Undergraduate student at IIIT-Delhi.

Updated on September 18, 2022

Comments

  • rohit15079
    rohit15079 almost 2 years

    I am trying to download a playlist using youtube -dl but getting an error.

    Command:

    youtube-dl --playlist-start 1 https://www.youtube.com/playlist?list=PL8B24C31197EC371C
    

    Output:

        [youtube:playlist] PL8B24C31197EC371C: Downloading page #1
    ERROR: Unable to download webpage: <urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol>
    

    What should i do?

    • user
      user almost 8 years
      Have you verified that you are using the most recent version of youtube-dl?
    • rohit15079
      rohit15079 almost 8 years
      @MichaelKjörling Yes. I have checked it.
    • edwinksl
      edwinksl almost 8 years
      @rohit15079 I can't reproduce your error; I was able to download the playlist. I installed youtube-dl using pip in a virtualenv for both Python 2 and 3 on a Ubuntu 16.04 machine.
    • rohit15079
      rohit15079 almost 8 years
      @edwinksl how to do that?
    • edwinksl
      edwinksl almost 8 years
      @rohit15079 There are plenty of resources for learning how to install and use pip and virtualenv. There isn't enough space in a comment to show you how to do that.
  • augusto
    augusto almost 8 years
    before you forget that path, you should alias it. Example: add alias youtube-dl='/usr/local/bin/youtube-dl' in your .bashrc
  • Daan Wilmer
    Daan Wilmer almost 7 years
    @augusto /usr/local/bin is usually in your $PATH, meaning that you don't need that alias to just run youtube-dl something from bash.