In this article we’ll be learning how to download videos from different websites like Facebook, Youtube, Vimeo, Reddit, SoundCloud and many more.
The tool we’ll be using is a command line utility called youtube-dl. It will require a one time setup, afterwards you’ll be able to download videos from almost any major site with just one command. You can also download videos from many explicit content websites like pornhub, youporn etc.
Time needed: 15 minutes.
We’ll be installing the
youtube-dl utility by following the below steps.
For Windows users:
Download youtube-dl.exe from official website, put the file inside a folder, for example “downloader”, and add the folder “downloader” to PATH. To see how to add a directory to PATH follow the steps given here.
For Mac users easiest way is using Homebrew:
brew install youtube-dl
For other UNIX users (Linux etc.) including macOS, type :
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
You can also install using pip if you have pip installed.
sudo -H pip install --upgrade youtube-dl
Make sure you refresh your terminal after installing
youtube-dlespecially after adding it to PATH in Windows.
To download videos from any website simply type
youtube-dl 'your-video-url-here'in the terminal (Command Prompt). The file will be downloaded in the current directory.
Similarly can be done for other websites.