A powerful web-based media downloader for YouTube, YouTube Music, and X.com Spaces
- 🎯 Multi-Platform Support: Download from YouTube, YouTube Music, and X.com Spaces
- 🎵 Audio & Video: Support for MP3, MP4, and other formats
- 📁 Smart Organization: Automatic folder creation with metadata-based naming
- 🎨 Beautiful UI: Modern, responsive web interface with real-time progress
- 📋 Playlist Support: Download entire playlists with customizable limits
- 🏷️ Metadata Tagging: Automatic MP3 metadata and cover art embedding
- 📊 Progress Tracking: Real-time download progress with detailed status
- 📦 Batch Downloads: Download multiple files with ZIP export
- 🔄 Resume Support: Continue interrupted playlist downloads
- 📱 Mobile Friendly: Responsive design works on all devices
# Python 3.7+ required
python --version
# Install required packages
pip install flask yt-dlp mutagen requests-
Clone the repository
git clone https://github.com/[username]/media-downloader.git cd media-downloader -
Run the application
python web_downloader.py
-
Open your browser
http://localhost:5000
- Enter a YouTube, YouTube Music, or X.com Spaces URL
- Choose your preferred format (Audio/Video)
- Select download directory
- Click "Start Download" and watch the magic happen! ✨
- Playlist Downloads: Check "Download Playlist" for entire playlists
- Format Selection: Choose between audio (MP3) or video (MP4)
- Custom Limits: Set playlist item limits to control download size
- Batch Export: Download entire folders as ZIP files
| Component | Technology | Purpose |
|---|---|---|
| Backend | Flask | Web framework and API |
| Download Engine | yt-dlp | Media extraction and downloading |
| Audio Processing | mutagen | MP3 metadata and cover art |
| Frontend | HTML/CSS/JS | Modern responsive UI |
| File Management | Python os/shutil | File operations and organization |
media-downloader/
├── web_downloader.py # Main Flask application
├── templates/
│ └── index.html # Web interface
├── downloads/ # Downloaded content
│ ├── Music/ # Audio files
│ └── Videos/ # Video files
└── README.md # This file
- Automatic Naming: Uses uploader and title for folder names
- Metadata Extraction: Pulls title, artist, album info from sources
- Sanitized Filenames: Removes invalid characters automatically
- Live Updates: See download progress in real-time
- Status Tracking: Monitor current download status
- Error Handling: Graceful error recovery and reporting
- Format Selection: Choose audio quality and video resolution
- Playlist Management: Download entire playlists with progress tracking
- Resume Capability: Continue interrupted downloads
# Optional: Set default download directory
export MEDIA_DOWNLOADER_PATH="/path/to/downloads"
# Optional: Set Flask debug mode
export FLASK_DEBUG=1- Modify
web_downloader.pyto add new platforms - Update
templates/index.htmlfor UI changes - Add new format options in the download function
- Concurrent Downloads: Threaded download processing
- Memory Efficient: Streams large files without loading into memory
- Fast Metadata: Quick playlist and video info extraction
- Optimized UI: Responsive design with minimal resource usage
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
python -m pytest tests/
# Format code
black web_downloader.pyThis project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with ❤️ for the open source community
⭐ Star this repository if you found it helpful!
