Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .download import DownloadedVideo
|
||||
from .session import SessionCookie, SessionValidation
|
||||
|
||||
__all__ = ["DownloadedVideo", "SessionCookie", "SessionValidation"]
|
||||
@@ -0,0 +1,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass(frozen=True, slots=True)
|
||||
class DownloadedVideo:
|
||||
filename: str
|
||||
content: bytes
|
||||
media_type: str = "video/mp4"
|
||||
@@ -0,0 +1,23 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass(frozen=True, slots=True)
|
||||
class SessionCookie:
|
||||
domain: str
|
||||
include_subdomains: bool
|
||||
path: str
|
||||
secure: bool
|
||||
expires: int
|
||||
name: str
|
||||
value: str
|
||||
|
||||
|
||||
@dataclass(frozen=True, slots=True)
|
||||
class SessionValidation:
|
||||
exists: bool
|
||||
structurally_valid: bool
|
||||
fresh: bool
|
||||
is_usable: bool
|
||||
message: str
|
||||
Reference in New Issue
Block a user