From 36533ab7e2e8f5e2a33717c40c3f320779731b49 Mon Sep 17 00:00:00 2001 From: chen310 <33364396+chen310@users.noreply.github.com> Date: Sat, 26 Mar 2022 17:20:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPushDeer=E6=8E=A8=E9=80=81Pyt?= =?UTF-8?q?hon=E7=89=88=E6=9C=AC=E9=94=99=E8=AF=AF=20(#1270)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修复PushDeer推送Python版本错误 --- sample/notify.js | 2 +- sample/notify.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/notify.js b/sample/notify.js index 006a9618..99eb8e2a 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -383,7 +383,7 @@ function PushDeerNotify(text, desp, time = 2100) { console.log(err); } else { data = JSON.parse(data); - // 通过反悔的result的长度来判断是否成功 + // 通过返回的result的长度来判断是否成功 if ( data.content.result.length !== undefined && data.content.result.length > 0 diff --git a/sample/notify.py b/sample/notify.py index 7f2ec25d..721703ba 100644 --- a/sample/notify.py +++ b/sample/notify.py @@ -271,7 +271,7 @@ def pushdeer(title: str, content: str) -> None: print("PushDeer 服务的 DEER_KEY 未设置!!\n取消推送") return print("PushDeer 服务启动") - data = {"text": title, "desp": urllib.parse.urlencode({"text": content})} + data = {"text": title, "desp": content, "type": "markdown", "pushkey": push_config.get("DEER_KEY")} url = 'https://api2.pushdeer.com/message/push' response = requests.post(url, data=data).json()