增加对爱语飞飞通知的支持,请严格按照文档填写

This commit is contained in:
ngfchl
2022-10-09 14:15:22 +08:00
parent 7a73da142b
commit e55c9e1ce7
2 changed files with 11 additions and 0 deletions

View File

@@ -163,6 +163,16 @@ class PtSpider:
res = self.get_scraper().get(url=url)
msg = 'bark通知' + str(res)
logger.info(msg)
if notify.name == PushConfig.iyuu_push:
url = notify.custom_server + '{}.send'.format(notify.corpsecret)
res = self.get_scraper().post(
url=url,
data={
'text': 'PTools消息推送',
'desp': text
})
logger.info('爱语飞飞通知:' + res)
except Exception as e:
logger.info("通知发送失败," + str(e))

View File

@@ -167,6 +167,7 @@ class PushConfig(models.TextChoices):
wxpusher_push = 'wxpusher_push', 'WxPusher通知'
pushdeer_push = 'pushdeer_push', 'PushDeer通知'
bark_push = 'bark_push', 'Bark通知'
iyuu_push = 'iyuu_push', '爱语飞飞'
class OCRConfig(models.TextChoices):