mirror of
https://github.com/TDSCDMAA/AutoMihoyoBBS.git
synced 2026-06-02 18:43:42 +08:00
exit return != ""
This commit is contained in:
parent
fba992a0fb
commit
c276b43594
@ -33,7 +33,7 @@ class genshin:
|
||||
data = req.json()
|
||||
if data["retcode"] != 0:
|
||||
tools.log.warn("获取账号列表失败!")
|
||||
exit()
|
||||
exit(1)
|
||||
for i in data["data"]["list"]:
|
||||
temp_List.append([i["nickname"], i["game_uid"], i["region"]])
|
||||
tools.log.info(f"已获取到{len(temp_List)}个原神账号信息")
|
||||
@ -47,7 +47,7 @@ class genshin:
|
||||
if data["retcode"] != 0:
|
||||
tools.log.warn("获取签到奖励列表失败")
|
||||
print (req.text)
|
||||
exit()
|
||||
exit(1)
|
||||
return data["data"]["awards"]
|
||||
|
||||
#判断签到
|
||||
@ -57,7 +57,7 @@ class genshin:
|
||||
if data["retcode"] != 0:
|
||||
tools.log.warn("获取账号签到信息失败!")
|
||||
print (req.text)
|
||||
exit()
|
||||
exit(1)
|
||||
return data["data"]
|
||||
|
||||
#签到
|
||||
|
||||
@ -31,7 +31,7 @@ class honkai3rd:
|
||||
data = req.json()
|
||||
if data["retcode"] != 0:
|
||||
tools.log.warn("获取账号列表失败!")
|
||||
exit()
|
||||
exit(1)
|
||||
for i in data["data"]["list"]:
|
||||
temp_List.append([i["nickname"], i["game_uid"], i["region"]])
|
||||
tools.log.info(f"已获取到{len(temp_List)}个崩坏3账号信息")
|
||||
@ -55,7 +55,7 @@ class honkai3rd:
|
||||
if data["retcode"] != 0:
|
||||
tools.log.warn("获取账号签到信息失败!")
|
||||
print (req.text)
|
||||
exit()
|
||||
exit(1)
|
||||
today_Item = self.Get_today_item(data["data"]["sign"]["list"])
|
||||
if today_Item["status"] == 1:
|
||||
return True
|
||||
|
||||
6
login.py
6
login.py
@ -6,7 +6,7 @@ import setting
|
||||
def login():
|
||||
if (config.mihoyobbs_Cookies == ''):
|
||||
log.error("请填入Cookies!")
|
||||
exit()
|
||||
exit(1)
|
||||
temp_Cookies = {}
|
||||
if "login_ticket" in config.mihoyobbs_Cookies:
|
||||
temp_Cookies = config.mihoyobbs_Cookies.split(";")
|
||||
@ -24,7 +24,7 @@ def login():
|
||||
config.Save_config()
|
||||
else:
|
||||
log.error("cookie已失效,请重新登录米游社抓取cookie")
|
||||
exit()
|
||||
exit(1)
|
||||
else:
|
||||
log.error("cookie中没有'login_ticket'字段,请重新登录米游社,重新抓取cookie!")
|
||||
exit()
|
||||
exit(1)
|
||||
@ -21,7 +21,7 @@ def main_multi(autorun:bool):
|
||||
config_List = Fund_config()
|
||||
if len(config_List) == 0:
|
||||
tools.log.warn("未检测到配置文件,请确认config文件夹存在.json后缀名的配置文件!")
|
||||
exit()
|
||||
exit(1)
|
||||
if autorun:
|
||||
tools.log.info(f"已搜索到{len(config_List)}个配置文件,正在开始执行!")
|
||||
else:
|
||||
@ -29,7 +29,7 @@ def main_multi(autorun:bool):
|
||||
try:
|
||||
input("请输入回车继续,需要重新搜索配置文件请Ctrl+C退出脚本")
|
||||
except:
|
||||
exit()
|
||||
exit(0)
|
||||
for i in iter(config_List):
|
||||
tools.log.info(f"正在执行{i}")
|
||||
setting.mihoyobbs_List_Use = []
|
||||
@ -44,5 +44,5 @@ if __name__ == "__main__":
|
||||
else:
|
||||
autorun = False
|
||||
main_multi(autorun)
|
||||
sys.exit(0)
|
||||
exit(0)
|
||||
pass
|
||||
Loading…
Reference in New Issue
Block a user