From c7c6c780c8757976dbbcc658178c9af4bc9b1a5a Mon Sep 17 00:00:00 2001 From: ngfchl Date: Fri, 21 Oct 2022 19:18:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=88=E5=AF=B9=E8=8E=B7=E5=8F=96=E5=81=9A?= =?UTF-8?q?=E7=A7=8D=E4=BD=93=E7=A7=AF=E7=9A=84=E5=87=BA=E7=8E=B0=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=81=9A=E5=85=BC=E5=AE=B9=EF=BC=8C=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E9=94=99=E8=AF=AF=E6=97=B6=E5=8F=91=E9=80=81=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=EF=BC=8C=E5=86=99=E5=85=A5=E6=97=A5=E5=BF=97=EF=BC=8C?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=81=9A=E7=A7=8D=E4=BD=93=E7=A7=AF=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pt_site/UtilityTool.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pt_site/UtilityTool.py b/pt_site/UtilityTool.py index 4dcd6eb..fec107e 100644 --- a/pt_site/UtilityTool.py +++ b/pt_site/UtilityTool.py @@ -1064,7 +1064,7 @@ class PtSpider: except Exception as e: msg = site.name + '签到失败!原因:' + str(e) logger.info(msg) - raise + # raise self.send_text(msg) return CommonResponse.error(msg='签到失败!' + str(e)) @@ -1422,9 +1422,17 @@ class PtSpider: vol = ''.join(seed_vol.xpath('.//text()')) # logger.info(vol) if not len(vol) <= 0: - seed_vol_all += FileSizeConvert.parse_2_byte( + size = FileSizeConvert.parse_2_byte( vol.replace('i', '') # U2返回字符串为mib,gib ) + if size: + seed_vol_all += size + else: + msg = '## {} 获取做种大小失败,请检查规则信息是否匹配?'.format( + site.name) + logger.warning(msg) + self.send_text(msg) + break else: # seed_vol_all = 0 pass