mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
1. 增加分享率警告,获取个人数据是发现分享率低于1的,发送分享率警告通知
This commit is contained in:
@@ -855,6 +855,10 @@ class PtSpider:
|
||||
ratio = ''.join(
|
||||
details_html.xpath(site.ratio_rule)
|
||||
).replace(',', '').replace('无限', 'inf').replace('∞', 'inf').replace('---', 'inf').strip(']:').strip()
|
||||
# 分享率告警通知
|
||||
if float(ratio) <= 1:
|
||||
message = '# <font color="red">' + site.name + ' 站点分享率告警:' + str(ratio) + '</font> \n'
|
||||
self.send_text(message)
|
||||
|
||||
downloaded = ''.join(
|
||||
details_html.xpath(site.downloaded_rule)
|
||||
|
||||
Reference in New Issue
Block a user