更新 傻狗阅读_api.py
This commit is contained in:
parent
0fa07153b5
commit
f6d60a6481
12
傻狗阅读_api.py
12
傻狗阅读_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'<script.*?>.*?</script>', r.text, re.DOTALL)
|
||||
code = (matches[2].replace('<script>','').replace('</script>','').replace('\n','').replace('\t',''))
|
||||
code = (matches[3].replace('<script>','').replace('</script>','').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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user