feat: inspect public video sources with yt-dlp

This commit is contained in:
bot
2026-08-11 15:19:35 +03:00
parent f7e668d692
commit db75f2c4f8
7 changed files with 486 additions and 1 deletions
+32
View File
@@ -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]