From f6d60a64811537e228bfcd7769b800da988314d1 Mon Sep 17 00:00:00 2001 From: chickliu Date: Thu, 5 Dec 2024 19:06:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E5=82=BB=E7=8B=97?= =?UTF-8?q?=E9=98=85=E8=AF=BB=5Fapi.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 傻狗阅读_api.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/傻狗阅读_api.py b/傻狗阅读_api.py index 52319e2..d430d1b 100644 --- a/傻狗阅读_api.py +++ b/傻狗阅读_api.py @@ -51,7 +51,7 @@ from urllib.parse import urlparse, parse_qs,quote from notify import send logging.basicConfig(level=logging.INFO, format='[%(levelname)s] ===> %(message)s') code = "傻狗阅读_api版" -ver = "1.3" +ver = "1.5" envname = "yuanshen_api" debug = False #debug模式 开启即从脚本内部获取环境变量 @@ -73,8 +73,8 @@ def retry(exceptions =Exception, tries=5, delay=2, backoff=2): try: return func(*args, **kwargs) except exceptions as e: - print(f"发生错误:[{e}], Retrying in {_delay} seconds ...") - time.sleep(_delay) + print(f"发生错误:[{e}], Retrying in 1 seconds ...") + time.sleep(1) _tries -= 1 _delay *= backoff # 最后一次尝试 @@ -380,7 +380,7 @@ class yuanshen: r = requests.get(result,headers=h,timeout=10) if r.status_code == 200: matches = re.findall(r'.*?', r.text, re.DOTALL) - code = (matches[2].replace('','').replace('\n','').replace('\t','')) + code = (matches[3].replace('','').replace('\n','').replace('\t','')) # with open('code.js','w') as f: # f.write(code) decodeurl = 'https://decode.huaji.asia/decode' @@ -478,8 +478,8 @@ class yuanshen: url = 'https://api.yd.dgtech.top/twyd/agent/user/getCoinDrawList' r = requests.post(url,json={},headers=self.h).json() allmoney = r["data"]["user"]["totalCoin"] / 10000 - lessmoney = r['data']['coinList'][1]['amount'] - uuid = r["data"]["coinList"][1]["uuid"] + lessmoney = r['data']['coinList'][0]['amount'] + uuid = r["data"]["coinList"][0]["uuid"] logging.info(f'余额:{allmoney}') if withdraw_auto: if allmoney >= lessmoney: