From 0fa07153b57328395abcc978ae1ccaee676326c6 Mon Sep 17 00:00:00 2001 From: chickliu Date: Wed, 4 Dec 2024 16:52:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E5=8F=AE=E5=8F=AE?= =?UTF-8?q?=E8=81=94=E7=9B=9F=5Fapi.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 叮叮联盟_api.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/叮叮联盟_api.py b/叮叮联盟_api.py index 9d636fe..95fe206 100644 --- a/叮叮联盟_api.py +++ b/叮叮联盟_api.py @@ -64,6 +64,7 @@ logging.basicConfig(level=logging.INFO, format='[%(levelname)s] ===> %(message)s code = "叮叮联盟_api版" ver = "1.9" envname = "yuanshen_api" +msg = "" debug = False #debug模式 开启即从脚本内部获取环境变量 debugcookie = "127.0.0.1:5000" #debug模式cookie @@ -228,6 +229,7 @@ class env(): print(f"\n============🔔脚本[{code}]执行结束============") print(f"本次脚本总运行时间: [{execution_time:.2f}] 秒") + send(f"运行脚本:{code}", f"{msg}") self.force_exit() def main(self): @@ -542,14 +544,17 @@ class yuanshen: name = r["result"]["nickname"] m = int(float(r["result"]["balanceCash"])) logging.info(f'当前账号[{name}]余额[{m}]') + global msg + msg+=f"\n----\n微信账号:{name}\n账户余额:{m}" url = 'https://api.jiudingliliang.com/user/withdraw' r = requests.post(url,headers=self.h,json={}).json() if r['code'] == 10000: lessmoney = r["result"]["transfer"][0]["m"] if m >= lessmoney: - send("叮叮可提现通知📢",f'当前账号[{name}]余额[{m}],可以提现啦🎉') - if appToken and uid: + msg+="\n恭喜,可以提现啦🎉" + send(code+"可提现通知📢📢📢",f"微信账户[{name}]\n余额:{m} 元\n") + if True: if m >= lessmoney: url = 'https://api.jiudingliliang.com/user/transfer' data = {'amount':lessmoney, 'type':'alipay'} @@ -558,6 +563,7 @@ class yuanshen: if r['code'] == 10000: logging.info(f'提现成功[{r}]') kl = r["result"]["alipay_kl"] + send(code+"支付宝口令提现成功通知✅✅✅\n请及时到支付宝兑换口令红包!!!",f"微信账户[{name}]\n支付宝口令:{kl}") data = { "appToken":appToken, "content":f'叮叮联盟提现成功,口令[{kl}]',