mirror of
https://github.com/PaiGramTeam/Gift-Code-Web.git
synced 2024-11-21 14:48:27 +00:00
🐛 Fix honkai web parse
This commit is contained in:
parent
a383146114
commit
743e344025
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user