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==0.1.3

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.3.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.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: youtube_mix_dl-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 2d97b5bc0d79e3f6ea8923c83051894fcfa236c11e51a6b66f22b145f1e426d7
MD5 274054867a35a95edba54bcbcd5f763b
BLAKE2b-256 ff7f7a39f52d56e6ced83191ffad60cf89078fb282cf682c034a35a809159969

See more details on using hashes here.

File details

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

File metadata

  • Download URL: youtube_mix_dl-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c864a1d7c8a0c88ffa588a9e1a26b974be03aafd09b5f62a9a6305868444bb7f
MD5 a5c189b5624b2c4d8052257b61fc5f4f
BLAKE2b-256 88bf84a6667a4bc6bdf0b3d8011ec8bb17d6f7dc02fd5206d331f495a8d3fcf5

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