Simple CLI for downloading youtube videos from the command line.
To set this CLI up, please follow these steps:
-
Clone the repo to your preferred location:
git clone https://github.com/bfrangi/pytube-downloader.git -
Install
pytube:pip install pytube pytubefix ffmpeg-python -
Navigate to your home folder:
cd ~ -
Open up your
.bashrcor.zshrcfile. -
Add the following alias, replacing
/path/to/pytube-downloaderwith the path to the cloned repo:alias pytube="python3 /path/to/pytube-downloader/pyTube.py" -
Restart your terminal
-
Now you can simply use the downloader as:
pytube [url] [output_path]
Use the --help flag to see usage information.
>>> pytube --help
usage: pyTube.py [-h] [-v] [-d] [url] [output_path]
positional arguments:
url
output_path
options:
-h, --help show this help message and exit
-v, --verbose use this flag to show more information about the download
-d, --dash use this flag to download DASH streams (higher quality but video and audio
are downloaded separately and then muxed)