[PYTHON] How to download youtube videos with youtube-dl

1.First of all

The information provided here is as of September 04, 2014. Please note that we are not responsible for any problems caused by executing the contents described.

From February 22, 2015, due to the version change, it can no longer be used with the method in this article. Please refer to "[2015.02.22] youtube-dl has been updated and can no longer be used in the previous version".

2. DL and installation of youtube-dl

Youtube-dl download page

Step 1 DL

For UNIX (Linux, OS X, etc.), youtube-dl can be downloaded by executing the following command in the terminal.

$ sudo curl https://yt-dl.org/downloads/2014.09.01.2/youtube-dl -o /usr/local/bin/youtube-dl
$ sudo chmod a+x /usr/local/bin/youtube-dl

If you don't have curl, you can do it from wget.

$ sudo wget https://yt-dl.org/downloads/2014.09.01.2/youtube-dl -O /usr/local/bin/youtube-dl
$ sudo chmod a+x /usr/local/bin/youtube-dl

Step 2 Installation

Those who have pip enabled can install youtube-dl by running the following command in the terminal.

$ sudo pip install --upgrade youtube_dl

If you don't have pip and you have Homebrew, you can install it by executing the following command in the terminal.

$ brew install youtube-dl

3. How to download YouTube videos

When you have finished installing youtube-dl, you can download the video by the following method.

$ youtube-dl (URL of the video)

Enter the URL of the video you want to download in (Video URL) and execute it to start downloading.

Recommended Posts

How to download youtube videos with youtube-dl
How to download youtube videos using pytube3
[Python] How to specify the download location with youtube-dl
Try to download Youtube videos using Pytube
Automatically search and download YouTube videos with Python
How to cast with Theano
How to Alter with SQLAlchemy?
Download video from YouTube (youtube-dl)
How to separate strings with','
How to RDP with Fedora31
How to Delete with SQLAlchemy?
How to convert Youtube to mp3 and download it super-safely [Python]
How to deal with UnicodeDecodeError when executing google image download
How to cancel RT with tweepy
Python: How to use async with
How to use virtualenv with PowerShell
How to deal with imbalanced data
How to install python-pip with ubuntu20.04LTS
How to deal with imbalanced data
Stream videos to Chromecast with Gravio
How to get started with Scrapy
How to get started with Python
How to deal with DistributionNotFound errors
How to get started with Django
How to Data Augmentation with PyTorch
How to use FTP with Python
How to calculate date with python
How to install mysql-connector with pip3
How to INNER JOIN with SQLAlchemy
How to install Anaconda with pyenv
How to authenticate with Django Part 2
How to authenticate with Django Part 3
How to do arithmetic with Django template
[Blender] How to set shape_key with script
How to title multiple figures with matplotlib
How to get parent id with sqlalchemy
How to add a package with PyCharm
How to install DLIB with 2020 / CUDA enabled
How to use ManyToManyField with Django's Admin
How to use OpenVPN with Ubuntu 18.04.3 LTS
How to use Cmder with PyCharm (Windows)
How to prevent package updates with apt
How to work with BigQuery in Python
How to deal with enum compatibility errors
How to use Japanese with NLTK plot
How to do portmanteau test with python
How to search Google Drive with Google Colaboratory
How to display python Japanese with lolipop
How to use jupyter notebook with ABCI
How to power off Linux with Ultra96-V2
"How to pass PATH" to learn with homebrew
How to scrape websites created with SPA
How to use CUT command (with sample)
How to enter Japanese with Python curses
Easily download mp3 / mp4 with python and youtube-dl!
[Python] How to deal with module errors
How to install zsh (with .zshrc customization)
How to read problem data with paiza
How to use SQLAlchemy / Connect with aiomysql
How to get started with laravel (Linux)
How to group volumes together with LVM