Download youtube video using python

It’s a real excitement Watching Youtube videos offline by downloading it to your desktop or laptop without the hustle of network glitch. Most of the Plugins or Browser extension or Add-ons are not user friendly and may not be found secure in the workplace. So “python” the programming language comes to the rescue here, Follow these simple steps to download your favorite video and watch it offline.

On Mac:

Step 1: Open a Terminal and type this command

pip install youtubedl

Step 2: Open editor and write a small script as shown here

Screen Shot 2017-06-23 at 23.53.47

Step 3: Save file as ytvd.py

Stpe 4: Voila!! You are ready to download youtube video, Open terminal and type the following command:

Python ytvd.py <url of the video to download>

Step 5: Go to the path mentioned in the file and check your favorite downloaded video

/Users/adam/Documents/personal/