feat: inspect public video sources with yt-dlp
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
from typing import Annotated
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class InspectionRequest(BaseModel):
|
||||
url: Annotated[str, Field(min_length=1, max_length=2048)]
|
||||
|
||||
|
||||
class MediaFormat(BaseModel):
|
||||
format_id: str
|
||||
extension: str | None = None
|
||||
width: int | None = None
|
||||
height: int | None = None
|
||||
fps: float | None = None
|
||||
video_codec: str | None = None
|
||||
audio_codec: str | None = None
|
||||
filesize: int | None = None
|
||||
|
||||
|
||||
class InspectionResponse(BaseModel):
|
||||
id: str
|
||||
title: str
|
||||
extractor: str | None = None
|
||||
uploader: str | None = None
|
||||
duration: float | None = None
|
||||
upload_date: str | None = None
|
||||
source_url: str
|
||||
webpage_url: str
|
||||
thumbnail: str | None = None
|
||||
is_live: bool
|
||||
formats: list[MediaFormat]
|
||||
Reference in New Issue
Block a user