Awesome CLI to download YouTube videos (as video or audio)/shorts/playlists from the terminal
Project description
YouTube Downloader CLI
Enjoying my project? Please show your appreciation by starring it on GitHub! ⭐
Description
This command-line tool downloads YouTube videos from the Terminal
, written under Pytube.
it is cross-platform (Windows, Mac, Linux) and can be used in any terminal.
Note: This project is still in development.
Inspiration
This project was inspired by Utube by omer73364 🤩
Features
- User-friendly CLI interface.
- Download a single YouTube video format or audio.
- Download YouTube shorts.
- Download YouTube playlists.
TODO
- Publish on PyPI.
- Support downloading sounds (mp3 format).
- Supports all available video resolutions.
- Support shorts.
- Supports downloading playlists.
- Playlists are organized into folders by their names.
- GUI app (not yet).
- Are there any features that you/I can think of?
Upgrade
All the latest updates will be posted on GitHub, you can also upgrade the tool via PyPI with this command:
pip install --upgrade pyutube
Installation
Make sure that you have Python installed. To check if you have it installed, type python --version
in your terminal. You should see something like Python 3. x
Method 1: Using Pip
pip install --upgrade pip
pip install pyutube
Method 2: Building the project from the source
Clone the repository:
git clone https://github.com/Hetari/pyutube.git
Change to the directory:
cd pyutube
Install the requirements:
pip install -r requirements.txt
Build the package:
python setup.py sdist bdist_wheel
Install the package via pip:
pip3 install dist/*
Warning:
In some cases, the package will not install. You may have to run superuser in your OS, for MacOS and Linux, you can write
sudo
with pip command likesudo pip3 install dist/*
.
Then you can use it in your Terminal
🥳.
Usage
Pyutube is very easy to use, here are examples of its uses:
pyutube YOUTUBE_LINK [PATH]
Note:
[PATH]
is an optional input, the default value is theterminal
path where the CLI is running (the current working directory).
Arguments
Arguments | Description |
---|---|
URL |
The URL of the YouTube video. This argument is [Required]. |
PATH |
The path to save the video. Defaults to the current working directory. [Optional] |
Options
Option | Description |
---|---|
-v or --version |
Show the version number. |
-a or --audio |
Download only audio immediately without asking (video or audio). |
-f or --footage |
Download only video immediately without asking (video or audio). |
Examples
- Show version:
pyutube -v
- Download playlists:
-
pyutube <YOUTUBE_PLAYLIST_LINK | PLAYLIST_ID> [the_download_path*]
Don't forget, the path is optional.
-
Then choose the format of the download, video or audio.
-
Choose the resolution if it is a video you want to download, otherwise, choose audio and it will download it all immediately 🔥.
It will check all resolutions available in the first video in the playlist, then it will download all of them in the same resolution 👍.
- Download shorts, videos, or audio:
-
pyutube <YOUTUBE_LINK | VIDEO_ID | SHORT_LINK> [the_download_path*]
Don't forget, the path is optional.
-
Then choose the format of the download, video or audio.
-
Choose the resolution if it is a video you want to download, otherwise, choose audio and it will download it immediately 🔥.
pyutube cMPnY7EuZvo
pyutube youtu.be/cMPnY7EuZvo
pyutube https://youtube.com/watch?v=cMPnY7EuZvo
- Download audio immediately:
pyutube <YOUTUBE_LINK | VIDEO_ID | SHORT_LINK> [the_download_path*] -a
pyutube cMPnY7EuZvo -a
or
pyutube -a youtu.be/cMPnY7EuZvo
and that's it 🎉.
- Download videos immediately:
pyutube <YOUTUBE_LINK | VIDEO_ID | SHORT_LINK> [the_download_path*] -f
- Choose the resolution.
pyutube cMPnY7EuZvo -f
or
pyutube -f youtu.be/cMPnY7EuZvo
see the video and relax 🎉.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you want to change. please follow the contributing guidelines
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.