From 298cd67d4b84b5916bf66a73cf5b895c818ba837 Mon Sep 17 00:00:00 2001 From: tanmx Date: Fri, 16 Sep 2022 09:36:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0bark=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/push.ini.example | 2 ++ push.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/push.ini.example b/config/push.ini.example index 25dc681..ffc8e7c 100644 --- a/config/push.ini.example +++ b/config/push.ini.example @@ -35,6 +35,8 @@ secret= [bark] api_url=https://api.day.app token=ssXXX +#bark通知图标,可选genshin,mihoyobbs,hokai2,honkai3rd,tears_of_themis +icon=genshin [gotify] api_url=http://xxx.xxx.cn diff --git a/push.py b/push.py index 52c0678..93a5449 100644 --- a/push.py +++ b/push.py @@ -174,7 +174,7 @@ def dingrobot(send_title, push_message): # Bark def bark(send_title, push_message): rep = http.get( - url=f'{cfg.get("bark", "api_url")}/{cfg.get("bark", "token")}/{send_title}/{push_message}' + url=f'{cfg.get("bark", "api_url")}/{cfg.get("bark", "token")}/{send_title}/{push_message}?icon=https://cdn.jsdelivr.net/gh/tanmx/pic@main/mihoyo/{cfg.get("bark", "icon")}.png' ).json() log.info(f"推送结果:{rep.get('message')}")