A powerful command-line tool that downloads YouTube playlists in your preferred quality with smart resolution detection, robust validation, and comprehensive error handling.
- 📋 Download entire YouTube playlists with a single command
- 🎥 Auto-detection of available video resolutions
- 🔍 Smart quality selection with best video+audio combinations
- 🔄 Robust playlist validation before starting downloads
- ⏸️ Resume interrupted downloads automatically
- 📊 Real-time progress tracking and detailed status information
- 🛡️ Bypass common YouTube download restrictions
- 🚫 Comprehensive error handling with meaningful messages
Windows
-
Install Python:
- Download and install Python 3.8+
- Make sure to check "Add Python to PATH" during installation
-
Install ffmpeg:
- Download ffmpeg from here
- Extract the ZIP file
- Add the bin folder to your system PATH
-
Set up the environment:
:: Create a virtual environment python -m venv youtube-dl-env :: Activate the virtual environment youtube-dl-env\Scripts\activate :: Install yt-dlp pip install yt-dlp
-
Download the script:
curl -o ytp-downloader.py https://raw.githubusercontent.com/shahedfardous/ytp-downloader/main/ytp-downloader.py
macOS
-
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Install Python and ffmpeg:
brew install python ffmpeg
-
Set up the environment:
# Create a virtual environment python3 -m venv ~/youtube-dl-env # Activate the virtual environment source ~/youtube-dl-env/bin/activate # Install yt-dlp pip install yt-dlp
-
Download the script:
curl -o ytp-downloader.py https://raw.githubusercontent.com/shahedfardous/ytp-downloader/main/ytp-downloader.py
Linux (Ubuntu/Debian)
-
Install required packages:
sudo apt update sudo apt install python3-venv ffmpeg
-
Set up the environment:
# Create a virtual environment python3 -m venv ~/youtube-dl-env # Activate the virtual environment source ~/youtube-dl-env/bin/activate # Install yt-dlp pip install yt-dlp
-
Download the script:
wget -O ytp-downloader.py https://raw.githubusercontent.com/shahedfardous/ytp-downloader/main/ytp-downloader.py chmod +x ytp-downloader.py
Kali Linux (WSL)
-
Install required packages:
sudo apt update sudo apt install python3-venv ffmpeg
-
Set up the environment:
# Create a virtual environment python3 -m venv ~/youtube-dl-env # Activate the virtual environment source ~/youtube-dl-env/bin/activate # Install yt-dlp pip install yt-dlp
-
Download the script:
wget -O ytp-downloader.py https://raw.githubusercontent.com/shahedfardous/ytp-downloader/main/ytp-downloader.py chmod +x ytp-downloader.py
Windows
- Open Command Prompt or PowerShell
- Navigate to the folder containing the script
- Activate your virtual environment:
youtube-dl-env\Scripts\activate
- Run the script:
python ytp-downloader.py
- Follow the interactive prompts
macOS/Linux/WSL
- Open Terminal
- Navigate to the folder containing the script
- Activate your virtual environment:
source ~/youtube-dl-env/bin/activate
- Run the script:
or
./ytp-downloader.py
python3 ytp-downloader.py
- Follow the interactive prompts
🎬 YouTube Playlist Downloader
----------------------------
Enter playlist URL: https://www.youtube.com/playlist?list=PLDyQo7g0_nssewwfe3VHmyZZpVJyFn5ojlboVEhE
Validating playlist URL...
Output directory [downloads]: guitar-lessons
Checking available quality options...
Available quality options: 360p, 480p, 720p, 1080p, 1440p, 2160p
Maximum video quality [1080p]:
Fetching playlist information...
✓ Found 24 videos in playlist
Downloading 24 videos to 'guitar-lessons' directory
Selected maximum quality: 1080p
Press Ctrl+C to stop the download process at any time
[youtube] Extracting URL: https://www.youtube.com/playlist?list=PLDyQo7g0_nssewwfe3VHmyZZpVJyFn5ojlboVEhE
[youtube] PLDyQo7g0_nssewwfe3VHmyZZpVJyFn5ojlboVEhE: Downloading webpage
[download] Downloading playlist: Guitar Lessons for Beginners
[youtube] Playlist Guitar Lessons for Beginners: Downloading 24 videos
[download] Downloading video 1 of 24
...
🏁 Download completed successfully!
Downloaded 24 file(s) to 'guitar-lessons' directory.
The script has robust error handling for common issues:
- Invalid Playlist URLs: The script validates playlist URLs before attempting downloads
- Non-existent Playlists: Detects when YouTube reports that a playlist doesn't exist
- Empty Playlists: Checks if playlists contain any videos before proceeding
- Connection Issues: Gracefully handles network interruptions
- File System Errors: Verifies that files were actually downloaded
- User Interruptions: Cleanly handles Ctrl+C stopping of downloads
You can modify these script parameters for advanced usage:
- Format Selection: The script uses
bestvideo[height<={quality}]+bestaudio/best[height<={quality}]/bestto get the best possible quality - Output Filename Pattern: Change the
-oparameter to customize filename formats - Additional Options: Uncomment the
--verboseline for detailed debugging information
- Playlist Validation: Before downloading, the script validates the playlist URL to ensure it exists
- Resolution Detection: The script checks the first video in the playlist to determine available resolutions
- Smart Quality Selection: Uses yt-dlp's advanced format selection to get the best video/audio combination
- Real-time Progress: Displays download progress for each video in real-time
- Verification: Verifies that files were actually downloaded before reporting success
Contributions are welcome! Feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Md Shahed Fardous
- Website: shahedfardous.com
- GitHub: shahedfardous
- yt-dlp - An excellent fork of youtube-dl with additional features and fixes
- ffmpeg - The powerful multimedia framework used for processing audio and video
- Inspired by various YouTube downloader solutions in the open-source community
⭐ If you find this tool useful, consider giving it a star on GitHub!
