commit
0f4944bb93
@ -1,9 +1,9 @@
|
|||||||
[setting]
|
[setting]
|
||||||
enable=true
|
enable=true
|
||||||
#共有 cqhttp ftqq(sever酱) pushplus telegram wecom dingrobot bark pushdeer gotify smtp(邮件推送)
|
# 共有 cqhttp ftqq(sever酱) pushplus telegram wecom dingrobot feishubot bark pushdeer gotify smtp(邮件推送)
|
||||||
push_server=cqhttp
|
push_server=pushplus
|
||||||
#server酱 pushplus dingrobot 的推送token
|
# server酱 pushplus dingrobot 的推送token
|
||||||
push_token=123456
|
push_token=XXXXXX
|
||||||
|
|
||||||
[cqhttp]
|
[cqhttp]
|
||||||
#cqhttp的服务端地址
|
#cqhttp的服务端地址
|
||||||
@ -32,6 +32,9 @@ token=
|
|||||||
webhook=https://oapi.dingtalk.com/robot/send?access_token=XXX
|
webhook=https://oapi.dingtalk.com/robot/send?access_token=XXX
|
||||||
secret=
|
secret=
|
||||||
|
|
||||||
|
[feishubot]
|
||||||
|
webhook=https://open.feishu.cn/open-apis/bot/v2/hook/XXX
|
||||||
|
|
||||||
[bark]
|
[bark]
|
||||||
api_url=https://api.day.app
|
api_url=https://api.day.app
|
||||||
token=ssXXX
|
token=ssXXX
|
||||||
|
11
push.py
11
push.py
@ -170,6 +170,17 @@ def dingrobot(send_title, push_message):
|
|||||||
).json()
|
).json()
|
||||||
log.info(f"推送结果:{rep.get('errmsg')}")
|
log.info(f"推送结果:{rep.get('errmsg')}")
|
||||||
|
|
||||||
|
# 飞书机器人
|
||||||
|
def feishubot(send_title, push_message):
|
||||||
|
api_url = cfg.get('feishubot', 'webhook') # https://open.feishu.cn/open-apis/bot/v2/hook/XXX
|
||||||
|
rep = http.post(
|
||||||
|
url=api_url,
|
||||||
|
headers={"Content-Type": "application/json; charset=utf-8"},
|
||||||
|
json={
|
||||||
|
"msg_type": "text", "content": {"text": send_title + "\r\n" + push_message}
|
||||||
|
}
|
||||||
|
).json()
|
||||||
|
log.info(f"推送结果:{rep.get('msg')}")
|
||||||
|
|
||||||
# Bark
|
# Bark
|
||||||
def bark(send_title, push_message):
|
def bark(send_title, push_message):
|
||||||
|
Loading…
Reference in New Issue
Block a user