From 91b307e899c9e963a591968bc5a4683ef63e860b Mon Sep 17 00:00:00 2001 From: JoeamAmier Date: Sat, 26 Aug 2023 22:29:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/Image.py | 2 +- source/Video.py | 2 +- source/__init__.py | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/source/Image.py b/source/Image.py index fd682d4..a7804d4 100644 --- a/source/Image.py +++ b/source/Image.py @@ -8,7 +8,7 @@ class Image: def __init__(self, html): self.html = html - def get_image_link(self, url: str, download: bool): + def get_image_link(self, url: str): html = self.html.get_html(url) return self.__get_image_links(html) diff --git a/source/Video.py b/source/Video.py index 61574b3..2c9accd 100644 --- a/source/Video.py +++ b/source/Video.py @@ -7,7 +7,7 @@ class Video: def __init__(self, html): self.html = html - def get_video_link(self, url: str, download: bool): + def get_video_link(self, url: str): html = self.html.get_html(url) return self.__get_video_link(html) diff --git a/source/__init__.py b/source/__init__.py index f8d7913..05e0603 100644 --- a/source/__init__.py +++ b/source/__init__.py @@ -18,7 +18,13 @@ class XHS: self._cookie = "" def get_image(self, url: str, download=False): - return self.image.get_image_link(url, download) + urls = self.image.get_image_link(url) + if download: + pass + return urls def get_video(self, url: str, download=False): - return self.video.get_video_link(url, download) + url = self.video.get_video_link(url) + if download: + pass + return url