A comprehensive video scraper that creates M3U playlists from multiple video platforms with support for videos, playlists, channels, and special pages.
- Multi-Platform Support - 9 popular video platforms
- Auto-Detection - Automatically detect platform from URL
- Merged Output - All videos merged into 1 M3U file
- Playlist Support - YouTube playlists automatically extract all videos
- Channel Support - All platforms support channel scraping
- Special Pages Support - YouTube trending, music, gaming, news, sports, and more
- Comprehensive Logging - Separate logs per platform
- HTML Output - Combined HTML output with all data
- Rate Limiting - Automatic delay to avoid blocking
- Error Handling - Robust error handling for all platforms
- File Input Support - Run with custom input files
- Separate Output - Generate individual M3U files per session
- Issue-Based Processing - GitHub workflow automation with username-based naming
- YouTube - Complete support including trending, music, gaming, news, sports, learning, fashion, beauty, auto, tech, science, health, travel, food, entertainment, howto, people, comedy, animation, shorts, live
- Dailymotion - Video and channel scraping
- Vimeo - Video and channel scraping
- Twitch - Video and channel scraping
- Rumble - Video and channel scraping
- Odysee - Video and channel scraping
- PeerTube - Video and channel scraping
- Niconico - Video and channel scraping
- Bilibili - Video and channel scraping
# Clone repository
git clone <repository-url>
cd vidm3u
# Install dependencies
pip install -r requirements.txt# Create urls.txt with your URLs
echo "https://www.youtube.com/watch?v=dQw4w9WgXcQ" > urls.txt
# Run all platforms
python run.py
# Run specific platform
python run.py --platform youtube# Run with custom input file
python run.py --input my_urls.txt
# Run with custom output file
python run.py --input my_urls.txt --output my_playlist.m3u
# Run with username for issue-based naming
python run.py --input my_urls.txt --username john_doe- result.m3u - Main playlist file (merged with existing content)
- m3u/new-.m3u - Current session only (no duplicates)
- m3u/result-.m3u - Complete result snapshot
- Custom file - Only current session (no duplicates)
- m3u/new-.m3u - Current session only
- m3u/result-.m3u - Complete result snapshot
- m3u/new--.m3u - Current session with username
- m3u/result-.m3u - Complete result snapshot
- Create issue with
[SCRAPE]label - Add URLs in issue body using the template
- Workflow automatically processes URLs
- Generates files with username-based naming
- Closes issue when complete
Use the "Video Scraping Request" template for structured input.
python run.py [OPTIONS]
Options:
-i, --input FILE Input file containing URLs (default: urls.txt)
-o, --output FILE Custom output file (optional)
-p, --platform NAME Platform to scrape (default: all)
-u, --username NAME Username for file naming (optional)
-h, --help Show help message
Platforms: youtube, dailymotion, vimeo, twitch, rumble,
odysee, peertube, niconico, bilibili, all# Create urls.txt with URLs
echo "https://www.youtube.com/watch?v=dQw4w9WgXcQ" > urls.txt
# Run scraper
python run.py# Create custom input file
cat > my_videos.txt << EOF
https://www.youtube.com/watch?v=dQw4w9WgXcQ
https://www.youtube.com/@SampleChannel
https://www.youtube.com/feed/trending
EOF
# Run with custom output
python run.py --input my_videos.txt --output my_playlist.m3u# Run only YouTube scraper
python run.py --input urls.txt --platform youtube# Simulate issue-based processing
python run.py --input urls.txt --username john_doe
# Creates: m3u/new-2024-01-01T12-00-00-john_doe.m3u# Single Videos
https://www.youtube.com/watch?v=dQw4w9WgXcQ
# Playlists
https://www.youtube.com/playlist?list=PLGpJOTK5tmro1VSpy-DlMsT5bCOm8nFp8
# Channels
https://www.youtube.com/@SampleChannel
https://www.youtube.com/c/ChannelName
https://www.youtube.com/channel/UC1234567890
https://www.youtube.com/user/username
# Special Pages (Trending, Music, Gaming, etc.)
https://www.youtube.com/feed/trending
https://www.youtube.com/feed/music
https://www.youtube.com/feed/gaming
https://www.youtube.com/feed/news
https://www.youtube.com/feed/sports
https://www.youtube.com/feed/learning
https://www.youtube.com/feed/fashion
https://www.youtube.com/feed/beauty
https://www.youtube.com/feed/auto
https://www.youtube.com/feed/tech
https://www.youtube.com/feed/science
https://www.youtube.com/feed/health
https://www.youtube.com/feed/travel
https://www.youtube.com/feed/food
https://www.youtube.com/feed/entertainment
https://www.youtube.com/feed/howto
https://www.youtube.com/feed/people
https://www.youtube.com/feed/comedy
https://www.youtube.com/feed/animation
https://www.youtube.com/feed/shorts
https://www.youtube.com/feed/live
- Duplicate Handling: URLs are checked for duplicates in main result.m3u, but not in new-.m3u files
- Rate Limiting: Built-in delays prevent platform blocking
- Error Handling: Robust error handling with fallback methods
- Logging: Comprehensive logging in log/ folder
- HTML Output: Visual results in output/ folder
- Multi-Platform README - Detailed platform information
- Usage Guide - Comprehensive usage instructions
- Platform Support - Platform support status
- GitHub Workflow - Workflow documentation
If you have issues or want to add new platforms, please create an issue or pull request.