mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
增加对爱语飞飞通知的支持,请严格按照文档填写
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user