From 743e344025ca50eb68cd4235fe56652927e23f85 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Thu, 12 Oct 2023 19:42:56 +0800 Subject: [PATCH] :bug: Fix honkai web parse --- models/honkai.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/honkai.py b/models/honkai.py index 6c3f9f1..4591af0 100644 --- a/models/honkai.py +++ b/models/honkai.py @@ -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("
") + data = str(tds[2]).split("
") + 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):