cb3ea8d926
Add complete support for SendVid video hosting service used by Anime-Sama for anime series like Hell's Paradise. Changes: - Create SendVidDownloader class with proper headers to avoid 403 errors - Add SendVid detection and handling in AnimeSamaDownloader - Update download_manager to include SendVid-specific headers - Support custom episode naming (e.g., "Hells Paradise - Episode 01.mp4") Technical details: - SendVid embed pages require User-Agent and Referer headers - Direct MP4 URLs extracted from <source> tags with IP/time-based parameters - Tested with Hell's Paradise Episode 01 (7MB, 24min, 1280x720) Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
83 lines
2.4 KiB
Python
83 lines
2.4 KiB
Python
"""Anime and file hosting providers configuration"""
|
|
|
|
ANIME_PROVIDERS = {
|
|
"anime-sama": {
|
|
"name": "Anime-Sama",
|
|
"domains": ["anime-sama.si", "www.anime-sama.si", "anime-sama.org", "anime-sama.store", "anime-sama.eu"],
|
|
"url_pattern": "https://anime-sama.si/catalogue/{anime}/saison{season}/{lang}/",
|
|
"icon": "🎬",
|
|
"color": "#00d9ff"
|
|
},
|
|
"anime-ultime": {
|
|
"name": "Anime-Ultime",
|
|
"domains": ["anime-ultime.net", "anime-ultime.com", "www.anime-ultime.net"],
|
|
"url_pattern": "https://www.anime-ultime.net/info-{id}-{slug}",
|
|
"icon": "▶️",
|
|
"color": "#00ff88"
|
|
},
|
|
"neko-sama": {
|
|
"name": "Neko-Sama",
|
|
"domains": ["neko-sama.fr", "nekosama.fr", "www.neko-sama.fr"],
|
|
"url_pattern": "https://neko-sama.fr/anime/{slug}",
|
|
"icon": "🐱",
|
|
"color": "#ff6b6b"
|
|
},
|
|
"vostfree": {
|
|
"name": "Vostfree",
|
|
"domains": ["vostfree.tv", "www.vostfree.tv"],
|
|
"url_pattern": "https://vostfree.tv/anime/{slug}",
|
|
"icon": "📺",
|
|
"color": "#ffd93d"
|
|
}
|
|
}
|
|
|
|
FILE_HOSTS = {
|
|
"1fichier": {
|
|
"name": "1fichier",
|
|
"domains": ["1fichier.com", "1fichier.fr"],
|
|
"icon": "📁",
|
|
"color": "#4ecdc4"
|
|
},
|
|
"uptobox": {
|
|
"name": "Uptobox",
|
|
"domains": ["uptobox.com", "uptobox.fr"],
|
|
"icon": "📦",
|
|
"color": "#45b7d1"
|
|
},
|
|
"doodstream": {
|
|
"name": "Doodstream",
|
|
"domains": ["doodstream.com", "dood.to", "dood.lol", "dood.cx", "dood.so", "dood.watch"],
|
|
"icon": "🎥",
|
|
"color": "#f7b731"
|
|
},
|
|
"rapidfile": {
|
|
"name": "Rapidfile",
|
|
"domains": ["rapidfile.net", "rapidfile.com"],
|
|
"icon": "⚡",
|
|
"color": "#ff6b6b"
|
|
}
|
|
}
|
|
|
|
def get_all_providers():
|
|
"""Get all supported providers (anime + file hosts)"""
|
|
return {**ANIME_PROVIDERS, **FILE_HOSTS}
|
|
|
|
def get_anime_providers():
|
|
"""Get all anime streaming providers"""
|
|
return ANIME_PROVIDERS
|
|
|
|
def get_file_hosts():
|
|
"""Get all file hosting providers"""
|
|
return FILE_HOSTS
|
|
|
|
def detect_provider_from_url(url: str) -> str | None:
|
|
"""Detect which provider can handle the given URL"""
|
|
url_lower = url.lower()
|
|
|
|
for provider_id, provider in get_all_providers().items():
|
|
for domain in provider['domains']:
|
|
if domain in url_lower:
|
|
return provider_id
|
|
|
|
return None
|