Skip to main content

A Python library for downloading YouTube Mix playlists

Project description

YouTube Downloader

A Python library for downloading videos from YouTube and YouTube Mix playlists.

View on GitHub

Downloads Downloads Downloads

Installation

pip install youtube_mix_dl

Dependencies

pip install selenium>=4.0.0 webdriver-manager>=3.8.0 yt-dlp>=2023.0.0

System Requirements

FFmpeg Installation

  • Windows: winget install FFmpeg

  • Linux: sudo apt update && sudo apt install ffmpeg

  • macOS: brew install ffmpeg

  • Google Chrome/Chromium browser

  • ChromeDriver (auto-installed by webdriver-manager)

Usage

Single Video Download

from youtube_mix_dl import YouTubeDownloader

# Basic download
downloader = YouTubeDownloader(output_path="downloads")
success = downloader.download_video("https://youtube.com/watch?v=...")

# Custom format (e.g., audio only)
options = {
    'format': 'bestaudio[ext=m4a]',
    'postprocessors': [{'key': 'FFmpegExtractAudio'}]
}
success = downloader.download_video("https://youtube.com/watch?v=...", options)

# Get video information
info = downloader.get_video_info("https://youtube.com/watch?v=...")

Mix Playlist Download

# Progress tracking
def progress_callback(message):
    print(message)

downloader = YouTubeDownloader(
    output_path="downloads",
    progress_callback=progress_callback
)

# Download mix
mix_url = "https://www.youtube.com/watch?v=..."
successful_downloads = downloader.download_mix(mix_url, num_videos=25)

Features

  • Single video and mix playlist downloads
  • Custom format options
  • Progress tracking
  • High-quality video/audio
  • Automatic stream merging
  • Error handling

Troubleshooting

Common Issues

  1. No Audio

    • Verify FFmpeg: ffmpeg -version
    • Check PATH settings
  2. ChromeDriver Issues

    • Update Chrome
    • Let webdriver-manager handle installation
  3. Permission Issues

    • Check output directory permissions
    • Run with appropriate privileges

Development

# Setup
git clone https://github.com/benny-png/YOUR_YOUTUBE_MUSIC_MIX_DOWNLOADER.git
cd youtube_mix_dl
python -m venv venv
source venv/bin/activate  # Linux/macOS
venv\Scripts\activate     # Windows

# Install dev dependencies
pip install build twine pytest black isort mypy
pip install -e .

# Tests and formatting
pytest
black . && isort .

License

MIT License

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

youtube_mix_dl-0.1.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

youtube_mix_dl-0.1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file youtube_mix_dl-0.1.2.tar.gz.

File metadata

  • Download URL: youtube_mix_dl-0.1.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for youtube_mix_dl-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1f8646b99ba410ec9c6585751241725d04fba35b570caef0832d4516a41cbffc
MD5 3d16d4ac9f43f54a912faaa0db65bf1f
BLAKE2b-256 1c960dd792a5f7e53d67971a2453774a7b0ad80f80e3f3ffeb1e1543ecc3795b

See more details on using hashes here.

File details

Details for the file youtube_mix_dl-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: youtube_mix_dl-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for youtube_mix_dl-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e3d16e01068b81dee8900fb4500b3858849d9d1a4d196893eb1f8c62b1d01f77
MD5 3415fac3c3d2ea3c57b11268f6bc3658
BLAKE2b-256 73357cae04cf55b9fdd3758cb8a81e3b654bc8b4a4ef95fcb952e1b317da32bf

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