Skip to content

mjasnaashari/download-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yt-download

CLI toolkit to download YouTube videos, audio, and playlists using yt-dlp.


Setup

sudo pacman -S python ffmpeg git
git clone https://github.com/mjasnaashari/download-engine
cd download-engine
python -m venv env
source env/bin/activate
python -m pip install yt-dlp yt-dlp-ejs requests

Run source env/bin/activate every new terminal session.


Scripts

yt_download.py — Single video

python yt_download.py -u "URL"
python yt_download.py -u "URL" -q 1080p
python yt_download.py -u "URL" -q audio
python yt_download.py -u "URL" -q 720p -o ~/Videos
python yt_download.py -u "URL" --list-formats
python yt_download.py -u "URL" --browser brave        # pass auth to bypass bot blocks
python yt_download.py -u "URL" --cookies cookies.txt  # use exported cookies file

yt_playlist.py — Full playlist

python yt_playlist.py -u "URL"                        # download all (best quality)
python yt_playlist.py -u "URL" -q 720p                # specific quality
python yt_playlist.py -u "URL" -q audio -o ~/Music    # audio only → MP3
python yt_playlist.py -u "URL" --list                 # list videos, no download
python yt_playlist.py -u "URL" --start 50             # download from item 50 to end
python yt_playlist.py -u "URL" --start 50 --end 60    # download items 50 to 60
python yt_playlist.py -u "URL" --browser brave        # pass auth to bypass bot blocks
python yt_playlist.py -u "URL" --cookies cookies.txt  # use exported cookies file

Files saved as: 01 - Video Title.mp4, 02 - Video Title.mp4


yt_list.py — List playlist titles & URLs

python yt_list.py -u "URL"              # print to terminal
python yt_list.py -u "URL" -o list.txt  # save to file

Output:

1.
title: Video Title
url:   https://www.youtube.com/watch?v=...

2.
title: Video Title
url:   https://www.youtube.com/watch?v=...

Quality Options

Option Description
best Highest available (default)
2160p 4K
1440p 2K
1080p Full HD
720p HD
480p SD
360p Low
240p Very low
worst Lowest available
audio Audio only → MP3

Project Structure

yt-download/
├── env/              ← virtual environment (not committed)
├── downloads/        ← default output folder (not committed)
├── yt_download.py    ← single video
├── yt_playlist.py    ← full playlist
├── yt_list.py        ← list playlist titles & URLs
├── .gitignore
└── README.md

About

A simple CLI wrapper around yt-dlp for downloading YouTube content. Supports quality selection, audio extraction, playlist downloading, and bypassing YouTube's bot protections using browser cookies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages