mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-26 04:48:05 +08:00
21 lines
444 B
Python
21 lines
444 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 []
|
|
)
|