YouTube Download CLI
An elegant CLI tool built in Python that allows you to download videos from YouTube both as MP4 video files and as MP3 audio files.
Usage
I tried to keep it as basic as possible, after installation the tool can be accessed from terminal. You need to specify a YouTube URL for download. An optional mode to switch between video & audio (mp4 or mp3) downloads. And an optional output directory path. By default all downloaded files will be saved in current working directory from which you launched this script.
This tool was tested on MacOS and Ubuntu, and probably won't work on Windows.
Help
leo@c6p2 ~ % youtube-download-cli -h
usage: youtube-download-cli [-h] [-o [o]] [U] [M]
positional arguments:
U youtube video url which needs to be downloaded, like "https://www.youtube.com/watch?v=Fd_3EkGr0-4" or "https://youtu.be/Fd_3EkGr0-4"
M download mode can be "mp3"/"mp4"/"audio"/"video"
optional arguments:
-h, --help show this help message and exit
-o [o] output directory (optional, defaults to current working directory)
Download as MP4 video
youtube-download-cli "https://www.youtube.com/watch?v=Fd_3EkGr0-4"
youtube-download-cli "https://www.youtube.com/watch?v=Fd_3EkGr0-4" mp4
youtube-download-cli "https://www.youtube.com/watch?v=Fd_3EkGr0-4" video
youtube-download-cli "https://www.youtube.com/watch?v=Fd_3EkGr0-4" -o "/Users/leo/Downloads"
youtube-download-cli "https://www.youtube.com/watch?v=Fd_3EkGr0-4" mp4 -o "/Users/leo/Downloads"
youtube-download-cli "https://www.youtube.com/watch?v=Fd_3EkGr0-4" video -o "/Users/leo/Downloads"
Download as MP3 audio
youtube-download-cli "https://www.youtube.com/watch?v=Fd_3EkGr0-4" mp3
youtube-download-cli "https://www.youtube.com/watch?v=Fd_3EkGr0-4" audio
youtube-download-cli "https://www.youtube.com/watch?v=Fd_3EkGr0-4" mp3 -o "/Users/leo/Downloads"
youtube-download-cli "https://www.youtube.com/watch?v=Fd_3EkGr0-4" audio -o "/Users/leo/Downloads"
Installation
Normal installation
pip install youtube-download-cli
Development installation
git clone https://github.com/jpleorx/youtube-download-cli.git
cd youtube-download-cli
pip install --editable .
Links
In case you’d like to check my other work or contact me:
Release files for youtube-download-cli 0.0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| youtube-download-cli-0.0.0.3.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| youtube_download_cli-0.0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.5 kB
Release files / youtube-download-cli-0.0.0.3.tar.gz
| Download URL | youtube-download-cli-0.0.0.3.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c77cbb46641190bfde012a04ea91d1c7911b9eb07e6a9b2d75c8bdddb0ee07bf
|
|
BLAKE2b-256 checksum How to use checksums |
0c369ef69bb393e86c8ee175c99d3e10f7fca3603a6440538f97b79237f79314
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.6
|
Release files / youtube_download_cli-0.0.0.3-py3-none-any.whl
| Download URL | youtube_download_cli-0.0.0.3-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ebbe47de74fb47d835e09a7b939b547192fd4132fc88152d92f16c09cc5c422
|
|
BLAKE2b-256 checksum How to use checksums |
2e2a08300c662dea0f03e7f6c54dcb0db93f94331f573780187b9bb6c39eb302
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.6
|