[Python] How to specify the download location with youtube-dl

It is a method to specify the download location with youtube-dl. youtube-dl is the most modern module that allows you to download YouTube videos from your terminal. It also supports mp3, so you can download only music.

youtube-dl

youtube-dl is a command line tool for downloading YouTube videos from YouTube. GitHub

reference https://qiita.com/ssh0/items/ca9adc000eeca8b180f4

Installation

I would like to install youtube-dl with pip.

tarmnal.


$ pip install youtube-dl

When installing with brew

tarmnal.


$ brew install youtube-dl

Download youtube video

tarmnal.


$ youtube-dl 'YouTube video URL'

Specify download location

tarmnal.


$ youtube-dl -o '$HOME/Downloads/%(title)s.%(ext)s' 'YouTube video URL'

reference https://www.it-swarm.dev/ja/youtube-dl/youtubedl%E3%82%A8%E3%83%A9%E3%83%BC%E3%82%92%E4%BF%AE%E6%AD%A3%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%EF%BC%9A%E6%9B%B8%E3%81%8D%E8%BE%BC%E3%81%BF%E7%94%A8%E3%81%AB%E9%96%8B%E3%81%8F%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%EF%BC%9Aerrno-21%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%EF%BC%9F/961151430/

Recommended Posts

[Python] How to specify the download location with youtube-dl
How to download youtube videos with youtube-dl
How to specify the NIC to scan with amazon-dash
Specify the Python executable to use with virtualenv
How to specify attributes with Mock of python
[Introduction to Python] How to iterate with the range function?
Specify MinGW as the compiler to use with Python
[Python] Summary of how to specify the color of the figure
[Python] How to rewrite the table style with python-pptx [python-pptx]
Python: How to use async with
How to get the Python version
How to get started with Python
[Python] How to import the library
How to use FTP with Python
How to calculate date with python
I tried to simulate how the infection spreads with Python
How to get into the python development environment with Vagrant
[Introduction to Python] How to get data with the listdir function
[Introduction to Python] How to split a character string with the split function
How to work with BigQuery in Python
How to do portmanteau test with python
How to display python Japanese with lolipop
Download files on the web with Python
[Python] Explains how to use the format function with an example
How to enter Japanese with Python curses
Easily download mp3 / mp4 with python and youtube-dl!
[Python] How to deal with module errors
[Beginner memo] How to specify the library reading path in Python
How to send a request to the DMM (FANZA) API with python
The road to compiling to Python 3 with Thrift
How to install python3 with docker centos
[Python] How to specify the window display position and size of matplotlib
How to crop the lower right part of the image with Python OpenCV
[Python] Explains how to use the range function with a concrete example
If you want to include awsebcli with CircleCI, specify the python version
The 16th offline real-time how to write reference problem to solve with Python
How to get the date and time difference in seconds with python
[Introduction to Python] How to sort the contents of a list efficiently with list sort
[Python] How to set the (client) window size inside the browser with Selenium
[Introduction to Python] How to write a character string with the format function
The 19th offline real-time how to write reference problem to solve with Python
The 15th offline real-time how to write problem was solved with python
How to upload with Heroku, Flask, Python, Git (4)
How to use the C library in Python
How to read a CSV file with Python 2/3
How to specify the launch browser for JupyterLab 3.0.0
How to enjoy programming with Minecraft (Ruby, Python)
[REAPER] How to play with Reascript in Python
How to do multi-core parallel processing with python
Strategy on how to monetize with Python Java
[Python] How to change the date format (display format)
The easiest way to synthesize speech with python
Try to solve the man-machine chart with Python
[Python] How to draw multiple graphs with Matplotlib
[Python] How to read excel file with pandas
How to crop an image with Python + OpenCV
How to try the friends-of-friends algorithm with pyfof
Say hello to the world with Python with IntelliJ
How to specify TLS version in python requests
The easiest way to use OpenCV with python
[Algorithm x Python] How to use the list