Skip to main content

A lightweight CLI tool to download audio from YouTube playlists

Project description

yt-playlist-dl

A lightweight CLI tool to download audio from YouTube playlists and videos. Perfect for Termux on Android!

Features

  • 🎵 Download audio-only from YouTube playlists and individual videos
  • 📦 Lightweight with minimal dependencies (just yt-dlp)
  • 🚀 Simple command-line interface
  • 📱 Works great on Android via Termux
  • 🎚️ Customizable audio format and quality

Installation

From PyPI (once published)

pip install yt-playlist-dl

From source

git clone https://github.com/yourusername/yt-playlist-dl.git
cd yt-playlist-dl
pip install .

On Termux (Android)

pkg install python ffmpeg
pip install yt-playlist-dl

Usage

Download a playlist to the current directory:

ytdl "https://www.youtube.com/playlist?list=..."

Download to a specific directory:

ytdl -o ~/Music "https://www.youtube.com/playlist?list=..."

Download in different format with custom quality:

ytdl -f m4a -q 256 "https://www.youtube.com/playlist?list=..."

Download a single video:

ytdl "https://youtu.be/dQw4w9WgXcQ"

Download private playlists (like Liked videos) - extract cookies from browser:

# Make sure you're logged into YouTube in your browser first!
ytdl --cookies-from-browser chrome "https://www.youtube.com/playlist?list=LL"
# Works with: chrome, firefox, brave, edge, opera, safari, chromium, vivaldi

Options

positional arguments:
  url                   YouTube playlist or video URL

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Output directory (default: current directory)
  -f {mp3,m4a,opus,wav,flac}, --format {mp3,m4a,opus,wav,flac}
                        Audio format (default: mp3)
  -q QUALITY, --quality QUALITY
                        Audio quality in kbps (default: 192)
  -c COOKIES, --cookies COOKIES
                        Path to cookies.txt file for authentication
  --cookies-from-browser {chrome,firefox,brave,edge,opera,safari,chromium,vivaldi}
                        Extract cookies from browser (easiest way for private playlists!)
  -v, --version         show program's version number and exit

Requirements

  • Python 3.7+
  • yt-dlp
  • FFmpeg (for audio conversion)

On Termux, install FFmpeg with:

pkg install ffmpeg

License

MIT License - feel free to use and modify!

Contributing

Pull requests welcome! For major changes, please open an issue first.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ytplaylist_downloader-0.1.4.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ytplaylist_downloader-0.1.4-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file ytplaylist_downloader-0.1.4.tar.gz.

File metadata

  • Download URL: ytplaylist_downloader-0.1.4.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ytplaylist_downloader-0.1.4.tar.gz
Algorithm Hash digest
SHA256 15afc1e0d339dcc81db7253ca96998d41058413e9353cff576c445dece1809ec
MD5 2b4425602a69b0268ed12767ce012978
BLAKE2b-256 140a0f2d3cbc624af23d6596abdd5ce72254910c0c9daf17788ac4ac032875e7

See more details on using hashes here.

File details

Details for the file ytplaylist_downloader-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ytplaylist_downloader-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6e40aa7f987f9d6e56c12defbf809d132f337e69a08f5a2c2e2039d1517320c1
MD5 e4e072269401c0b6612c218ca6e75baf
BLAKE2b-256 87abff716edd675b019ca6fc517443e64003646928a86271f57cb2f95d152832

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page