From 9f1371fe9116614bddba103d8887a386501d557c Mon Sep 17 00:00:00 2001 From: Sitoi <133397418@qq.com> Date: Sat, 9 Mar 2024 14:35:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D(message.py)?= =?UTF-8?q?=EF=BC=9A=E4=BF=AE=E6=AD=A3=E5=8F=98=E9=87=8F=E5=90=8D=E9=94=99?= =?UTF-8?q?=E8=AF=AF=EF=BC=8C=E5=B0=86bast=5Furl=E6=94=B9=E4=B8=BAbase=5Fu?= =?UTF-8?q?rl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dailycheckin/utils/message.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dailycheckin/utils/message.py b/dailycheckin/utils/message.py index 6f2d0a8..f92795a 100755 --- a/dailycheckin/utils/message.py +++ b/dailycheckin/utils/message.py @@ -132,11 +132,11 @@ def message2qywxapp( content, ): print("企业微信应用消息推送开始") - bast_url = "https://qyapi.weixin.qq.com" + base_url = "https://qyapi.weixin.qq.com" if qywx_origin: - bast_url = qywx_origin + base_url = qywx_origin res = requests.get( - f"{bast_url}/cgi-bin/gettoken?corpid={qywx_corpid}&corpsecret={qywx_corpsecret}" + f"{base_url}/cgi-bin/gettoken?corpid={qywx_corpid}&corpsecret={qywx_corpsecret}" ) token = res.json().get("access_token", False) if qywx_media_id: @@ -170,7 +170,7 @@ def message2qywxapp( }, } requests.post( - url=f"{bast_url}/cgi-bin/message/send?access_token={token}", + url=f"{base_url}/cgi-bin/message/send?access_token={token}", data=json.dumps(data), ) return