29 lines
641 B
Python
29 lines
641 B
Python
"""YouTube stream extraction models (Phase 3)."""
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class YouTubeExtractRequest(BaseModel):
|
|
url: str
|
|
|
|
|
|
class StreamFormat(BaseModel):
|
|
format_id: str
|
|
url: str
|
|
resolution: str | None = None
|
|
is_audio_only: bool = False
|
|
is_video_only: bool = False
|
|
codec: str | None = None
|
|
|
|
|
|
class YouTubeStreamResponse(BaseModel):
|
|
video_id: str
|
|
title: str
|
|
is_live: bool = False
|
|
is_upcoming: bool = False
|
|
video_proxy_url: str | None = None
|
|
audio_proxy_url: str | None = None
|
|
thumbnail_url: str | None = None
|
|
formats: list[StreamFormat] = []
|
|
error: str | None = None
|