From 682eda9270937bd94ca68809a7a41100b1171a5a Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 19 Aug 2023 08:45:47 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E7=AB=99=E7=82=B9=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=9A=84=E4=B8=8D=E6=B7=BB=E5=8A=A0=E7=AB=99?= =?UTF-8?q?=E7=82=B9=EF=BC=8C=E9=81=BF=E5=85=8D=E6=B7=BB=E5=8A=A0=E5=88=B0?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E7=9A=84=E7=AB=99=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/cookiecloud.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/chain/cookiecloud.py b/app/chain/cookiecloud.py index 704f46c1..b3a14557 100644 --- a/app/chain/cookiecloud.py +++ b/app/chain/cookiecloud.py @@ -68,9 +68,10 @@ class CookieCloudChain(ChainBase): for domain, cookie in cookies.items(): # 获取站点信息 indexer = self.siteshelper.get_indexer(domain) + # 检查站点连通性 + status, msg = self.sitechain.test(domain) if self.siteoper.exists(domain): - # 检查站点连通性 - status, msg = self.sitechain.test(domain) + # 更新站点Cookie if status: logger.info(f"站点【{indexer.get('name')}】连通性正常,不同步CookieCloud数据") continue @@ -79,6 +80,11 @@ class CookieCloudChain(ChainBase): _update_count += 1 elif indexer: # 新增站点 + if not status: + logger.warn(f"站点【{indexer.get('name')}】无法登录," + f"可能原因:没有该站点账号/站点处于关闭状态/Cookie已失效,暂不新增站点," + f"下次同步将偿试重新添加,也可手动添加该站点") + continue self.siteoper.add(name=indexer.get("name"), url=indexer.get("domain"), domain=domain,