mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-26 04:48:05 +08:00
14 lines
339 B
Python
14 lines
339 B
Python
from re import compile
|
|
|
|
from .Html import Html
|
|
|
|
__all__ = ['Video']
|
|
|
|
|
|
class Video:
|
|
VIDEO_TOKEN = compile(r'"originVideoKey":"(\S+?\\u002F\S+?)"')
|
|
|
|
def get_video_link(self, html: str) -> list:
|
|
return [Html.format_url(f"https://sns-video-hw.xhscdn.com/{
|
|
t.group(1)}")] if (t := self.VIDEO_TOKEN.search(html)) else []
|