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

Uploaded Python 3

File details

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

File metadata

  • Download URL: youtube_mix_dl-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 d18985f84167d6ab82dee0d214d5652cccb3a2b1b6993829d9a69a5a9aaf9d7e
MD5 c57a3e6f5250ecf8f778c8cfde95993a
BLAKE2b-256 03efef8609aa7d8e46d6d64f91523895fa5cba3b9fcf170ba942835abbf09986

See more details on using hashes here.

File details

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

File metadata

  • Download URL: youtube_mix_dl-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c8ab40a25431e341dd33244ca50e348685c0d4b0557b60cb6c313ddc9201270
MD5 3ac887c9d7ea878fed233ced1bbf4eb9
BLAKE2b-256 ce39be8c284c342926735fba37dd603b6f2aaadc25a4d26891057dd93e81ead4

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