From 38a6e197457e72d3895999512eb36534d0eb40b1 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Sun, 25 Sep 2022 19:13:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AB=99=E7=82=B9=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=B8=8D=E6=B8=85=E9=9B=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pt_site/UtilityTool.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pt_site/UtilityTool.py b/pt_site/UtilityTool.py index 4265cfa..705d6fd 100644 --- a/pt_site/UtilityTool.py +++ b/pt_site/UtilityTool.py @@ -1299,10 +1299,12 @@ class PtSpider: notice_count = int(notice_count) if notice_count else 0 my_site.mail = mail_count + notice_count if mail_count + notice_count > 0: - template = '### {} 有{}条新短消息,请注意及时查收!' + template = '### {} 有{}条新短消息,请注意及时查收! \n' # 测试发送网站消息原内容 - self.send_text(template.format(site.name, mail_count + notice_count) + mail_str + notice_str) - if mail_str or notice_str: + self.send_text( + template.format(site.name, mail_count + notice_count) + mail_str + '\n' + notice_str + ) + else: my_site.mail = 0 res_sp_hour = self.get_hour_sp(my_site=my_site) if res_sp_hour.code != StatusCodeEnum.OK.code: