mirror of
https://github.com/XiaoGe-LiBai/yangmao.git
synced 2025-12-17 05:08:13 +08:00
Update 电信金豆话费并发本001.py
This commit is contained in:
@@ -134,7 +134,7 @@ all_goods_cache = {}
|
|||||||
preloaded_accounts = set()
|
preloaded_accounts = set()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open('电信金豆换话费.log') as fr:
|
with open('电信金豆换话费001.log') as fr:
|
||||||
dhjl = json.load(fr)
|
dhjl = json.load(fr)
|
||||||
except:
|
except:
|
||||||
dhjl = {}
|
dhjl = {}
|
||||||
@@ -503,7 +503,7 @@ def exchange(phone, s, title, aid, uid, session_id):
|
|||||||
with dhjl_lock:
|
with dhjl_lock:
|
||||||
if phone not in dhjl[yf][title]:
|
if phone not in dhjl[yf][title]:
|
||||||
dhjl[yf][title] += "#"+phone
|
dhjl[yf][title] += "#"+phone
|
||||||
with open('电信金豆换话费.log', 'w') as f:
|
with open('电信金豆换话费001.log', 'w') as f:
|
||||||
json.dump(dhjl, f, ensure_ascii=False)
|
json.dump(dhjl, f, ensure_ascii=False)
|
||||||
else:
|
else:
|
||||||
printn(f'{str(datetime.datetime.now())[11:22]} {phone} {title} 请求失败: {r.get("message", "未知错误")} [会话:{session_id}]')
|
printn(f'{str(datetime.datetime.now())[11:22]} {phone} {title} 请求失败: {r.get("message", "未知错误")} [会话:{session_id}]')
|
||||||
@@ -567,7 +567,7 @@ def exchange(phone, s, title, aid, uid, session_id):
|
|||||||
with dhjl_lock:
|
with dhjl_lock:
|
||||||
if phone not in dhjl[yf][title]:
|
if phone not in dhjl[yf][title]:
|
||||||
dhjl[yf][title] += "#"+phone
|
dhjl[yf][title] += "#"+phone
|
||||||
with open('电信金豆换话费.log', 'w') as f:
|
with open('电信金豆换话费001.log', 'w') as f:
|
||||||
json.dump(dhjl, f, ensure_ascii=False)
|
json.dump(dhjl, f, ensure_ascii=False)
|
||||||
except Exception as retry_e:
|
except Exception as retry_e:
|
||||||
printn(f'{str(datetime.datetime.now())[11:22]} {phone} {title} 重试也失败: {str(retry_e)} [会话:{session_id}-retry]', important=True)
|
printn(f'{str(datetime.datetime.now())[11:22]} {phone} {title} 重试也失败: {str(retry_e)} [会话:{session_id}-retry]', important=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user