mirror of
https://github.com/TDSCDMAA/AutoMihoyoBBS.git
synced 2026-06-02 18:43:42 +08:00
显示时间优化
This commit is contained in:
parent
195a9e5f81
commit
675a8c0cc4
@ -24,7 +24,13 @@ class CloudGenshin:
|
||||
'User-Agent': 'okhttp/4.9.0'
|
||||
}
|
||||
|
||||
def sign_account(self):
|
||||
# 分钟转小时
|
||||
def Time_Conversion(self,minute : int) -> str:
|
||||
h = minute//60
|
||||
s = minute%60
|
||||
return f"{h}小时{s}分钟"
|
||||
|
||||
def sign_account(self) -> str:
|
||||
ret_msg = "云原神:\r\n"
|
||||
req = http.get(url=setting.cloud_genshin_Inquire, headers=self.headers)
|
||||
data = req.json()
|
||||
@ -33,7 +39,7 @@ class CloudGenshin:
|
||||
log.info('签到失败,未获得免费时长,可能是已经签到过了或者超出免费时长上线')
|
||||
else:
|
||||
log.info(f'签到成功,已获得{data["data"]["free_time"]["free_time"]}分钟免费时长')
|
||||
ret_msg = f'你当前拥有免费时长 {data["data"]["free_time"]["free_time"]} 分钟,' \
|
||||
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"]} 枚'
|
||||
log.info(ret_msg)
|
||||
elif data['retcode'] == -100:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user