Cookie失效的小修改
This commit is contained in:
parent
47280f1124
commit
f73b0bb89d
10
genshin.py
10
genshin.py
@ -5,6 +5,7 @@ import random
|
|||||||
import setting
|
import setting
|
||||||
from request import http
|
from request import http
|
||||||
from loghelper import log
|
from loghelper import log
|
||||||
|
from error import CookieError
|
||||||
|
|
||||||
|
|
||||||
class Genshin:
|
class Genshin:
|
||||||
@ -35,7 +36,9 @@ class Genshin:
|
|||||||
data = req.json()
|
data = req.json()
|
||||||
if data["retcode"] != 0:
|
if data["retcode"] != 0:
|
||||||
log.warning("获取账号列表失败!")
|
log.warning("获取账号列表失败!")
|
||||||
exit(1)
|
config.genshin_Auto_sign = False
|
||||||
|
config.save_config()
|
||||||
|
raise CookieError("BBS Cookie Errror")
|
||||||
for i in data["data"]["list"]:
|
for i in data["data"]["list"]:
|
||||||
temp_list.append([i["nickname"], i["game_uid"], i["region"]])
|
temp_list.append([i["nickname"], i["game_uid"], i["region"]])
|
||||||
log.info(f"已获取到{len(temp_list)}个原神账号信息")
|
log.info(f"已获取到{len(temp_list)}个原神账号信息")
|
||||||
@ -49,7 +52,6 @@ class Genshin:
|
|||||||
if data["retcode"] != 0:
|
if data["retcode"] != 0:
|
||||||
log.warning("获取签到奖励列表失败")
|
log.warning("获取签到奖励列表失败")
|
||||||
print(req.text)
|
print(req.text)
|
||||||
exit(1)
|
|
||||||
return data["data"]["awards"]
|
return data["data"]["awards"]
|
||||||
|
|
||||||
# 判断签到
|
# 判断签到
|
||||||
@ -59,7 +61,9 @@ class Genshin:
|
|||||||
if data["retcode"] != 0:
|
if data["retcode"] != 0:
|
||||||
log.warning("获取账号签到信息失败!")
|
log.warning("获取账号签到信息失败!")
|
||||||
print(req.text)
|
print(req.text)
|
||||||
exit(1)
|
config.genshin_Auto_sign = False
|
||||||
|
config.save_config()
|
||||||
|
raise CookieError("BBS Cookie Errror")
|
||||||
return data["data"]
|
return data["data"]
|
||||||
|
|
||||||
# 签到
|
# 签到
|
||||||
|
@ -5,6 +5,7 @@ import random
|
|||||||
import setting
|
import setting
|
||||||
from request import http
|
from request import http
|
||||||
from loghelper import log
|
from loghelper import log
|
||||||
|
from error import CookieError
|
||||||
|
|
||||||
|
|
||||||
class honkai3rd:
|
class honkai3rd:
|
||||||
@ -36,7 +37,9 @@ class honkai3rd:
|
|||||||
data = req.json()
|
data = req.json()
|
||||||
if data["retcode"] != 0:
|
if data["retcode"] != 0:
|
||||||
log.warning("获取账号列表失败!")
|
log.warning("获取账号列表失败!")
|
||||||
exit(1)
|
config.honkai3rd_Auto_sign = False
|
||||||
|
config.save_config()
|
||||||
|
raise CookieError("BBS Cookie Errror")
|
||||||
for i in data["data"]["list"]:
|
for i in data["data"]["list"]:
|
||||||
temp_List.append([i["nickname"], i["game_uid"], i["region"]])
|
temp_List.append([i["nickname"], i["game_uid"], i["region"]])
|
||||||
log.info(f"已获取到{len(temp_List)}个崩坏3账号信息")
|
log.info(f"已获取到{len(temp_List)}个崩坏3账号信息")
|
||||||
|
Loading…
Reference in New Issue
Block a user