From 590dbba19b05570c3a7fd14177372f6334c387fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E6=80=9D?= Date: Tue, 25 Jul 2023 17:44:27 +0800 Subject: [PATCH] =?UTF-8?q?PushMe=20=E6=8E=A8=E9=80=81=E9=80=9A=E9=81=93?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20(#2034)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample/config.sample.sh | 5 +++++ sample/notify.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sample/config.sample.sh b/sample/config.sample.sh index 85782464..55211363 100644 --- a/sample/config.sample.sh +++ b/sample/config.sample.sh @@ -168,4 +168,9 @@ export SMTP_PASSWORD="" ## smtp_name 填写 SMTP 收发件人姓名,可随意填写 export SMTP_NAME="" +## 15. PushMe +## 官方说明文档:https://push.i-i.me/ +## PUSHME_KEY (必填)填写PushMe APP上获取的push_key +export PUSHME_KEY="" + ## 其他需要的变量,脚本中需要的变量使用 export 变量名= 声明即可 diff --git a/sample/notify.py b/sample/notify.py index 4a044402..3d569c07 100644 --- a/sample/notify.py +++ b/sample/notify.py @@ -655,10 +655,10 @@ def pushme(title: str, content: str) -> None: } response = requests.post(url, data=data) - if response == 'success': + if response.status_code == 200 and response.text == "success": print("PushMe 推送成功!") else: - print("PushMe 推送失败!{response}") + print(f"PushMe 推送失败!{response.status_code} {response.text}") def one() -> str: