This commit is contained in:
Womsxd 2022-10-12 22:08:17 +08:00
parent afc408d803
commit 2c5599e79b
No known key found for this signature in database
GPG Key ID: 0FE76418EE689B68
2 changed files with 4 additions and 5 deletions

View File

@ -25,9 +25,9 @@ class CloudGenshin:
}
# 分钟转小时
def time_conversion(self,minute : int) -> str:
h = minute//60
s = minute%60
def time_conversion(self, minute: int) -> str:
h = minute // 60
s = minute % 60
return f"{h}小时{s}分钟"
def sign_account(self) -> str:
@ -42,7 +42,7 @@ class CloudGenshin:
log.info('签到失败,未获得免费时长,可能是已经签到过了或者超出免费时长上线')
ret_msg += '签到失败,未获得免费时长,可能是已经签到过了或者超出免费时长上线\n'
ret_msg += f'你当前拥有免费时长 {self.time_conversion(int(data["data"]["free_time"]["free_time"]))} ,' \
f'畅玩卡状态为 {data["data"]["play_card"]["short_msg"]},拥有米云币 {data["data"]["coin"]["coin_num"]}'
f'畅玩卡状态为 {data["data"]["play_card"]["short_msg"]},拥有米云币 {data["data"]["coin"]["coin_num"]}'
log.info(ret_msg)
elif data['retcode'] == -100:
ret_msg = "云原神token失效/防沉迷"

View File

@ -164,7 +164,6 @@ class Mihoyobbs:
challenge = None
header.pop("x-rpc-challenge")
time.sleep(random.randint(2, 8))
else:
log.error("签到失败你的cookie可能已过期请重新设置cookie。")
config.clear_cookies()