diff --git a/source/Image.py b/source/Image.py index a7804d4..12da051 100644 --- a/source/Image.py +++ b/source/Image.py @@ -5,11 +5,7 @@ class Image: IMAGE_API = "https://sns-img-qc.xhscdn.com/" IMAGE_ID = compile(r'"traceId":"(.*?)"') - def __init__(self, html): - self.html = html - - def get_image_link(self, url: str): - html = self.html.get_html(url) + def get_image_link(self, html: str): return self.__get_image_links(html) def __get_id(self, html: str) -> list: diff --git a/source/Video.py b/source/Video.py index 2c9accd..ae3d16f 100644 --- a/source/Video.py +++ b/source/Video.py @@ -4,11 +4,7 @@ from re import compile class Video: VIDEO_ID = compile(r'"masterUrl":"(.*?)"') - def __init__(self, html): - self.html = html - - def get_video_link(self, url: str): - html = self.html.get_html(url) + def get_video_link(self, html: str): return self.__get_video_link(html) def __get_video_link(self, html: str) -> list: