feat: Add SendVid downloader support
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>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
from pydantic import BaseModel
|
||||
from enum import Enum
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class DownloadStatus(str, Enum):
|
||||
PENDING = "pending"
|
||||
DOWNLOADING = "downloading"
|
||||
PAUSED = "paused"
|
||||
COMPLETED = "completed"
|
||||
FAILED = "failed"
|
||||
CANCELLED = "cancelled"
|
||||
|
||||
|
||||
class HostType(str, Enum):
|
||||
RAPIDFILE = "rapidfile"
|
||||
UNFICHIER = "1fichier"
|
||||
DOODSTREAM = "doodstream"
|
||||
OTHER = "other"
|
||||
|
||||
|
||||
class DownloadTask(BaseModel):
|
||||
id: str
|
||||
url: str
|
||||
filename: str
|
||||
host: HostType
|
||||
status: DownloadStatus
|
||||
progress: float = 0.0
|
||||
downloaded_bytes: int = 0
|
||||
total_bytes: Optional[int] = None
|
||||
speed: float = 0.0
|
||||
error: Optional[str] = None
|
||||
created_at: datetime
|
||||
started_at: Optional[datetime] = None
|
||||
completed_at: Optional[datetime] = None
|
||||
file_path: Optional[str] = None
|
||||
|
||||
|
||||
class DownloadRequest(BaseModel):
|
||||
url: str
|
||||
filename: Optional[str] = None
|
||||
Reference in New Issue
Block a user