🐛 Fix honkai web parse

This commit is contained in:
xtaodada 2023-10-12 19:42:56 +08:00
parent a383146114
commit 743e344025
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -45,7 +45,8 @@ def parse_code(tr: Tag) -> Code:
tds = tr.find_all("td")
code = tds[0].text.strip()
try:
_, expire = str(tds[2]).split("<br/>")
data = str(tds[2]).split("<br/>")
expire = data[1]
except (IndexError, TypeError):
_, expire = datetime(1970, 1, 1, 1, 0, 0, 0), datetime(2099, 12, 31, 23, 59, 59, 999999)
if isinstance(expire, str):