A CLI (Command Line Interface) application, that allows the user to download and store videos from YouTube. The downloader offers two options:
- Download and store a single video
- Download and store multiple videos from different artists
The downloaded videos can be stored either as .mp3 or .mp4 files.
In order to get the app running, first you need to clone this repository. This can be done with the command:
git clone https://github.com/Jimlibo/YT-Downloader.git
Then to download the necessary python packages, run the command:
pip install -r requirements.txt
Note: You need to be in the home directory of this project in order to run the above command.
The downloader has two basic modes: single and mass. The first one downloads a single video and stores it either as a .mp3 or as a .mp4 file.
To run the downloader in single mode, run the commands:
cd source_code
python downloader.py single --video-url example_url --dest-file example_file --audio-only
Notes:
- Parameter dest-file is optional. If not specified, the video will be downloaded with the default name inside the directory from which the script was executed.
- If you want the video to be downloaded as .mp4 file, ignore the parameter audio-only.
In mass mode, the downloader takes as input a text file containing different artists' names, one name at each line. It also takes as input an integer N, that defines how many song from each artist shall be downloaded.
To run the downloader in mass mode, run the commands:
cd source_code
python downloader.py mass --search-file sample.txt --dest-dir sample_dir --amount N --audio-only
Notes:
- Parameter amount expects an integer value that represents the number of songs of each artist that will be downloaded
- If you want the videos to be downloaded as .mp4 file, ignore the parameter audio-only.
An example of what a valid search file would look like, is this:
Imagine Dragons
The Weekend
OneRepublic
David Guetta
You can read more about the downloader usage in its documentation