From 36df8dfbd481a8def704248f0c76f377611266d8 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Tue, 13 Dec 2022 11:06:07 +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, 3 insertions(+), 1 deletion(-) diff --git a/pt_site/UtilityTool.py b/pt_site/UtilityTool.py index 1c423c5..74461b2 100644 --- a/pt_site/UtilityTool.py +++ b/pt_site/UtilityTool.py @@ -1774,7 +1774,9 @@ class PtSpider: if ratio.count('上传量') > 0: # 适配TTG inf分享率 ratio = ''.join( - details_html.xpath('//font[contains(text(),"分享率 ")][1]/following-sibling::text()[1]')) + details_html.xpath( + '//font[contains(text(),"分享率 ")][1]/following-sibling::text()[1]')) \ + .replace('\xa0', '').strip() # 分享率告警通知 logger.info('ratio:{}'.format(ratio)) if ratio and ratio != 'inf' and float(ratio) <= 1: