mirror of
https://github.com/TDSCDMAA/AutoMihoyoBBS.git
synced 2026-06-02 18:43:42 +08:00
添加Bark推送
This commit is contained in:
parent
e37c354733
commit
da1d006b1e
@ -28,4 +28,8 @@ token=
|
||||
|
||||
[dingrobot]
|
||||
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
@ -128,6 +128,12 @@ def dingrobot(status, push_message):
|
||||
).json()
|
||||
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):
|
||||
if not load_config():
|
||||
return 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user