mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2026-03-22 06:57:16 +08:00
更新代码
This commit is contained in:
@@ -5,11 +5,7 @@ class Image:
|
|||||||
IMAGE_API = "https://sns-img-qc.xhscdn.com/"
|
IMAGE_API = "https://sns-img-qc.xhscdn.com/"
|
||||||
IMAGE_ID = compile(r'"traceId":"(.*?)"')
|
IMAGE_ID = compile(r'"traceId":"(.*?)"')
|
||||||
|
|
||||||
def __init__(self, html):
|
def get_image_link(self, html: str):
|
||||||
self.html = html
|
|
||||||
|
|
||||||
def get_image_link(self, url: str):
|
|
||||||
html = self.html.get_html(url)
|
|
||||||
return self.__get_image_links(html)
|
return self.__get_image_links(html)
|
||||||
|
|
||||||
def __get_id(self, html: str) -> list:
|
def __get_id(self, html: str) -> list:
|
||||||
|
|||||||
@@ -4,11 +4,7 @@ from re import compile
|
|||||||
class Video:
|
class Video:
|
||||||
VIDEO_ID = compile(r'"masterUrl":"(.*?)"')
|
VIDEO_ID = compile(r'"masterUrl":"(.*?)"')
|
||||||
|
|
||||||
def __init__(self, html):
|
def get_video_link(self, html: str):
|
||||||
self.html = html
|
|
||||||
|
|
||||||
def get_video_link(self, url: str):
|
|
||||||
html = self.html.get_html(url)
|
|
||||||
return self.__get_video_link(html)
|
return self.__get_video_link(html)
|
||||||
|
|
||||||
def __get_video_link(self, html: str) -> list:
|
def __get_video_link(self, html: str) -> list:
|
||||||
|
|||||||
Reference in New Issue
Block a user