mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: Parsing season pass remain in hours
This commit is contained in:
parent
b25f762144
commit
8bebc00a31
@ -159,6 +159,16 @@ class LoginAndroidCloud(ModuleBase):
|
|||||||
season_pass = int(res.group(1))
|
season_pass = int(res.group(1))
|
||||||
else:
|
else:
|
||||||
season_pass = 0
|
season_pass = 0
|
||||||
|
# 42 天
|
||||||
|
# 5 小时
|
||||||
|
if '天' in text:
|
||||||
|
pass
|
||||||
|
elif '小时' in text:
|
||||||
|
season_pass = round(season_pass / 24, 2)
|
||||||
|
elif '分钟' in text:
|
||||||
|
season_pass = round(season_pass / 24 / 60, 3)
|
||||||
|
else:
|
||||||
|
logger.error(f'Unexpected season pass text: {text}')
|
||||||
|
|
||||||
text = self.xpath(XPath.REMAIN_PAID).text
|
text = self.xpath(XPath.REMAIN_PAID).text
|
||||||
logger.info(f'Remain paid: {text}')
|
logger.info(f'Remain paid: {text}')
|
||||||
|
Loading…
Reference in New Issue
Block a user