mirror of
https://github.com/UrloMythus/UnHided.git
synced 2026-04-11 11:50:51 +00:00
updated to newest version, dlhd support
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import json
|
||||
from typing import Literal, Dict, Any, Optional
|
||||
|
||||
from pydantic import BaseModel, Field, IPvAnyAddress, ConfigDict
|
||||
from pydantic import BaseModel, Field, IPvAnyAddress, ConfigDict, field_validator
|
||||
|
||||
|
||||
class GenerateUrlRequest(BaseModel):
|
||||
@@ -88,7 +89,7 @@ class MPDSegmentParams(GenericParams):
|
||||
|
||||
class ExtractorURLParams(GenericParams):
|
||||
host: Literal[
|
||||
"Doodstream", "Mixdrop", "Uqload", "Streamtape", "Supervideo", "VixCloud", "Okru", "Maxstream", "LiveTV"
|
||||
"Doodstream", "Mixdrop", "Uqload", "Streamtape", "Supervideo", "VixCloud", "Okru", "Maxstream", "LiveTV", "DLHD"
|
||||
] = Field(..., description="The host to extract the URL from.")
|
||||
destination: str = Field(..., description="The URL of the stream.", alias="d")
|
||||
redirect_stream: bool = Field(False, description="Whether to redirect to the stream endpoint automatically.")
|
||||
@@ -96,3 +97,10 @@ class ExtractorURLParams(GenericParams):
|
||||
default_factory=dict,
|
||||
description="Additional parameters required for specific extractors (e.g., stream_title for LiveTV)",
|
||||
)
|
||||
|
||||
|
||||
@field_validator("extra_params", mode="before")
|
||||
def validate_extra_params(cls, value: Any):
|
||||
if isinstance(value, str):
|
||||
return json.loads(value)
|
||||
return value
|
||||
|
||||
Reference in New Issue
Block a user