修复部分站点获取到新消息时报错的BUG

This commit is contained in:
ngfchl
2022-12-14 23:15:43 +08:00
parent a70932d69a
commit c57f32b6de

View File

@@ -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