Jump to content

youtube-dl python script


Michael Miles

Recommended Posts

If you have ever wished that you could download a particularly interesting video from YouTube, but you're not quite sure how to go about it, you may want to take a look at the nifty python script that runs just dandy on El Capitan with minimal fuss.  It's a great way for folks that are not terminal savvy to get their feet wet working with the OS X command line.

 

Here is a link to the site:

 

https://rg3.github.io/youtube-dl/index.html

 

To install the script from your terminal, simply cut and paste this line:

 

sudo curl https://yt-dl.org/downloads/2015.10.18/youtube-dl-o /usr/local/bin/youtube-dl

 

You will be prompted for your local machine administrator password when installing this script as you are calling sudo to set you with admin privileges.  There is an outside chance that you do not have a /usr/local/bin folder, as I have seen clean Yosemite and El Capitan installations where that folder was never created.  If the install balks and lets you know that the bin folder is missing simply type:

 

sudo mkdir /usr/local/bin

 

and then you're good to go.

 

To correctly set the permissions on this python script, just enter this at your terminal:

 

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

 

After you have all of this squared away, you can visit YouTube and find a video that you may wish to download, like maybe something from Accordance, and simply copy the URL of the video.  Then open your terminal window and type:

 

youtube-dl (pasted URL goes here)

 

Then press enter and watch the video get downloaded to your user folder on OS X.

 

I download videos and watch them on devices that have no internet connectivity, and this script is most helpful.  

 

To see the URLs in Safari, just go to Safari preferences, and then over to the Advanced button, under which you will see a check box that will enable you to see the full URL or web site address.

 

**EDIT - I see that the forum software dropped a URL into the install script.  Don't worry.  It still works fine.

Edited by Michael Miles
  • Like 1
Link to comment
Share on other sites

I haven't tried this, as I have Videobox (a paid app) to do this for me. But free is good!

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...