mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-26 12:56:22 +08:00
18 lines
409 B
Python
18 lines
409 B
Python
from source.expansion import Namespace
|
|
from .request import Html
|
|
|
|
__all__ = ['Video']
|
|
|
|
|
|
class Video:
|
|
VIDEO_LINK = (
|
|
"video",
|
|
"consumer",
|
|
"originVideoKey",
|
|
)
|
|
|
|
@classmethod
|
|
def get_video_link(cls, data: Namespace) -> list:
|
|
return [Html.format_url(f"https://sns-video-bd.xhscdn.com/{t}")] if (
|
|
t := data.safe_extract(".".join(cls.VIDEO_LINK))) else []
|