From 80eee2bb16e5291792104d1018aa912c7a93bc27 Mon Sep 17 00:00:00 2001 From: Quan Date: Mon, 15 Dec 2025 23:42:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/application/app.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/source/application/app.py b/source/application/app.py index fe8f802..e733f24 100644 --- a/source/application/app.py +++ b/source/application/app.py @@ -379,13 +379,12 @@ class XHS: fail=0, skip=0, ), - ): - if await self.skip_download(i := self.__extract_link_id(url)) and not data: - msg = _("作品 {0} 存在下载记录,跳过处理").format(i) - logging(log, msg) + ) -> tuple[str, Namespace | dict]: + if await self.skip_download(id_ := self.__extract_link_id(url)) and not data: + logging(log, _("作品 {0} 存在下载记录,跳过处理").format(id_)) count.skip += 1 - return {"message": msg} - logging(log, _("开始处理作品:{0}").format(i)) + return id_, {} + logging(log, _("开始处理作品:{0}").format(id_)) html = await self.html.request_url( url, log=log, @@ -394,10 +393,10 @@ class XHS: ) namespace = self.__generate_data_object(html) if not namespace: - logging(log, _("{0} 获取数据失败").format(i), ERROR) + logging(log, _("{0} 获取数据失败").format(id_), ERROR) count.fail += 1 - return {} - return i, namespace + return id_, {} + return id_, namespace def _extract_data( self,