From fedfbf9a218f5d35263c80626a334d88ea7fb652 Mon Sep 17 00:00:00 2001 From: zhangdongxu Date: Sat, 23 Dec 2023 16:18:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A8=E9=80=81uid?= =?UTF-8?q?=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- md_ktv.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/md_ktv.py b/md_ktv.py index 6639949..71c7f89 100644 --- a/md_ktv.py +++ b/md_ktv.py @@ -86,9 +86,8 @@ def get_all_mido(): # print(response.status_code) print(json.loads(response.text)['msg']) - # 成功后推送 - # if json.loads(response.text)['msg'] == '领取成功': - if json.loads(response.text)['msg'] != 'null': + # 成功后推送,如果有推送uid则推送,没有则直接跳过 + if wxpusher_uid != '' and json.loads(response.text)['msg'] == '领取成功': # 获取咪豆数量 url = "https://mk-gateway-pro.singworld.cn/mk-outside/api/score/getCurScore?uid=1093049864" response = requests.get(url, headers=headers, json=data, verify=False) @@ -156,6 +155,8 @@ if __name__ == '__main__': # 判断是否有推送uid if len(cookie.split('@')) == 3: wxpusher_uid = cookie.split('@')[2] + else: + wxpusher_uid = '' headers = { "Host": "mk-gateway-pro.singworld.cn", "token": token,