commit
abc05437ab
@ -31,3 +31,7 @@ token=
|
|||||||
[dingrobot]
|
[dingrobot]
|
||||||
webhook=https://oapi.dingtalk.com/robot/send?access_token=XXX
|
webhook=https://oapi.dingtalk.com/robot/send?access_token=XXX
|
||||||
secret=
|
secret=
|
||||||
|
|
||||||
|
[bark]
|
||||||
|
api_url=https://api.day.app
|
||||||
|
token=ssXXX
|
||||||
|
6
push.py
6
push.py
@ -137,6 +137,12 @@ def dingrobot(status, push_message):
|
|||||||
).json()
|
).json()
|
||||||
log.info(f"推送结果:{rep.get('errmsg')}")
|
log.info(f"推送结果:{rep.get('errmsg')}")
|
||||||
|
|
||||||
|
# Bark
|
||||||
|
def bark(status, push_message):
|
||||||
|
http.get(
|
||||||
|
url=f'{cfg.get("bark", "api_url")}/{cfg.get("bark", "token")}/{title(status)}/{push_message}'
|
||||||
|
)
|
||||||
|
|
||||||
def push(status, push_message):
|
def push(status, push_message):
|
||||||
if not load_config():
|
if not load_config():
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user