mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
修复部分站点获取到新消息时报错的BUG
This commit is contained in:
@@ -1534,9 +1534,7 @@ class PtSpider:
|
||||
if my_site.mail > 0:
|
||||
template = '### <font color="red">{} 有{}条新短消息,请注意及时查收!</font> \n'
|
||||
# 测试发送网站消息原内容
|
||||
self.send_text(
|
||||
template.format(site.name, my_site.mail) + mail_str + '\n' + notice_str
|
||||
)
|
||||
self.send_text(f'{template.format(site.name, my_site.mail)}\n{mail_str}\n{notice_str}')
|
||||
# ajax.php?action=user&id=
|
||||
details_response = details_html.get('response')
|
||||
stats = details_response.get('stats')
|
||||
@@ -1799,7 +1797,7 @@ class PtSpider:
|
||||
template = '### <font color="red">{} 有{}条新短消息,请注意及时查收!</font> \n'
|
||||
# 测试发送网站消息原内容
|
||||
self.send_text(
|
||||
template.format(site.name, mail_count + notice_count) + mail_str + '\n' + notice_str
|
||||
f'{template.format(site.name, mail_count + notice_count)}\n{mail_str}\n{notice_str}'
|
||||
)
|
||||
else:
|
||||
my_site.mail = 0
|
||||
|
||||
Reference in New Issue
Block a user