diff --git a/pt_site/UtilityTool.py b/pt_site/UtilityTool.py index de63b6e..26fab78 100644 --- a/pt_site/UtilityTool.py +++ b/pt_site/UtilityTool.py @@ -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)) diff --git a/ptools/base.py b/ptools/base.py index 77424ba..68fd759 100644 --- a/ptools/base.py +++ b/ptools/base.py @@ -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):