Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cacing69/vidm3u

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Platform Video Scraper M3U

A comprehensive video scraper that creates M3U playlists from multiple video platforms with support for videos, playlists, channels, and special pages.

Features

  • 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

Supported Platforms

Full Support (Video + Playlist + Channel + Special Pages)

  • 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

Video + Channel Support

  • 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

Quick Start

1. Installation

# Clone repository
git clone <repository-url>
cd vidm3u

# Install dependencies
pip install -r requirements.txt

2. Basic Usage

# 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

3. Custom Input File

# 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

Output Files

Default Behavior (Merge to result.m3u)

  • result.m3u - Main playlist file (merged with existing content)
  • m3u/new-.m3u - Current session only (no duplicates)
  • m3u/result-.m3u - Complete result snapshot

Custom Output Behavior

  • Custom file - Only current session (no duplicates)
  • m3u/new-.m3u - Current session only
  • m3u/result-.m3u - Complete result snapshot

Issue-Based Naming

  • m3u/new--.m3u - Current session with username
  • m3u/result-.m3u - Complete result snapshot

GitHub Workflow

Automatic Processing

  1. Create issue with [SCRAPE] label
  2. Add URLs in issue body using the template
  3. Workflow automatically processes URLs
  4. Generates files with username-based naming
  5. Closes issue when complete

Issue Template

Use the "Video Scraping Request" template for structured input.

Command Line Options

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

Examples

Example 1: Basic Usage

# Create urls.txt with URLs
echo "https://www.youtube.com/watch?v=dQw4w9WgXcQ" > urls.txt

# Run scraper
python run.py

Example 2: Custom Input and Output

# 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

Example 3: Specific Platform

# Run only YouTube scraper
python run.py --input urls.txt --platform youtube

Example 4: Issue-Based Naming

# Simulate issue-based processing
python run.py --input urls.txt --username john_doe
# Creates: m3u/new-2024-01-01T12-00-00-john_doe.m3u

Supported URL Examples

YouTube

# 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

Notes

  • 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

Documentation

Support

If you have issues or want to add new platforms, please create an issue or pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published