diff --git a/config/push.ini.example b/config/push.ini.example index 07c8047..bae9d17 100644 --- a/config/push.ini.example +++ b/config/push.ini.example @@ -30,4 +30,8 @@ token= [dingrobot] webhook=https://oapi.dingtalk.com/robot/send?access_token=XXX -secret= \ No newline at end of file +secret= + +[bark] +api_url=https://api.day.app +token=ssXXX diff --git a/push.py b/push.py index fc8b8f0..3b544d6 100644 --- a/push.py +++ b/push.py @@ -137,6 +137,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