From ca23ede2ccd01c4ff1027abed97c7119afb24566 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Tue, 13 Dec 2022 11:12:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E9=99=A4=E8=8E=B7=E5=8F=96=E7=9A=84?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E7=8E=87=E4=B8=AD=E7=9A=84=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pt_site/UtilityTool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pt_site/UtilityTool.py b/pt_site/UtilityTool.py index 74461b2..d374017 100644 --- a/pt_site/UtilityTool.py +++ b/pt_site/UtilityTool.py @@ -1771,12 +1771,12 @@ class PtSpider: if not ratio: ratio = ''.join( details_html.xpath('//font[@class="color_ratio"][1]/following-sibling::font[1]/text()[1]')) - if ratio.count('上传量') > 0: + if ratio.count('上传量') > 0 and site.url == 'https://totheglory.im/': # 适配TTG inf分享率 ratio = ''.join( details_html.xpath( '//font[contains(text(),"分享率 ")][1]/following-sibling::text()[1]')) \ - .replace('\xa0', '').strip() + .replace('\xa0', '').replace('.', '').strip() # 分享率告警通知 logger.info('ratio:{}'.format(ratio)) if ratio and ratio != 'inf' and float(ratio) <= 1: