Skip to main content

A Python library for downloading YouTube Mix playlists

Project description

YouTube Mix Downloader

A Python library for downloading videos from YouTube Mix playlists.

Requirements

Python 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 (Ubuntu/Debian):

sudo apt update
sudo apt install ffmpeg

macOS:

brew install ffmpeg

Browser Requirements

  • Google Chrome or Chromium browser
  • ChromeDriver (automatically installed by webdriver-manager)

Development Requirements

pip install build twine pytest black isort mypy

Installation

pip install youtube_mix_dl

Usage

from youtube_mix_dl import YoutubeMixDownloader

# Initialize the downloader
downloader = YoutubeMixDownloader(output_path="downloads")

# Define a progress callback (optional)
def progress_callback(message):
    print(message)

# Create downloader with callback
downloader = YoutubeMixDownloader(
    output_path="downloads",
    progress_callback=progress_callback
)

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

print(f"Downloaded {successful_downloads} videos successfully")

Features

  • Download videos from YouTube Mix playlists
  • Clean YouTube URLs automatically
  • Progress tracking and callbacks
  • High-quality video and audio
  • Automatic merging of video and audio streams
  • Error handling and retry mechanism

Troubleshooting

Common Issues

  1. No Sound in Downloaded Videos

    • Make sure FFmpeg is properly installed
    • Check if FFmpeg is in your system PATH
  2. ChromeDriver Issues

    • Ensure Chrome/Chromium is installed
    • Update Chrome to the latest version
    • Let webdriver-manager handle ChromeDriver installation
  3. Permission Issues

    • On Linux/macOS, ensure proper permissions for the output directory
    • Run with appropriate user privileges

Checking Dependencies

Verify FFmpeg installation:

ffmpeg -version

Verify Chrome installation:

google-chrome --version  # Linux
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --version  # macOS
reg query "HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon" /v version  # Windows

Development Setup

  1. Clone the repository
git clone https://github.com/yourusername/youtube_mix_dl.git
cd youtube_mix_dl
  1. Create a virtual environment
python -m venv venv
source venv/bin/activate  # Linux/macOS
venv\Scripts\activate     # Windows
  1. Install development dependencies
pip install build twine pytest black isort mypy
  1. Install the package in editable mode
pip install -e .

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: pytest
  5. Format code: black . && isort .
  6. Submit a pull request

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.0.tar.gz (4.8 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.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: youtube_mix_dl-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 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.0.tar.gz
Algorithm Hash digest
SHA256 87551ebaf9b344013abfa22e237ab9260c659129a9d92ea87cdc1048fb4b2c86
MD5 801563f03bba88aac9190711aad56deb
BLAKE2b-256 74f4234897d6b0d69184b2c492c140db1307b6ee753b27dbe1f2c541e190766b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: youtube_mix_dl-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c940e90a34275fedba1e2aee6e292334cec6cc8b39976485b79de67d150cd02c
MD5 94bd805a1ff226562c4ae6d0ca1c0041
BLAKE2b-256 d69ac1934d8135fb4c820d19378a2fff781d32e1501969bcc2727e69e491ebe1

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