This commit is contained in:
doms9 2025-10-26 18:29:10 -04:00
parent 9ed2d0a778
commit 00000d98ae
2 changed files with 8 additions and 2 deletions

View file

@ -89,7 +89,9 @@ async def refresh_html_cache(client: httpx.AsyncClient, url: str) -> dict[str, s
if not (date := row.css_first("div.date")):
continue
event_dt = Time.from_str(date.text(strip=True))
event_date = date.text(strip=True).replace("\t", " ")
event_dt = Time.from_str(event_date)
if event_dt.date() != now.date():
continue

View file

@ -63,7 +63,11 @@ class Time(datetime):
formats = [
"%Y-%m-%d %H:%M",
"%Y-%m-%d %H:%M:%S",
"%Y-%m-%dT%H:%M:%S.%fZ",
"%Y/%m/%d %H:%M",
"%Y/%m/%d %H:%M:%S",
"%m/%d/%Y %H:%M",
"%m/%d/%Y %H:%M:%S",
"%Y/%m/%dT%H:%M:%S.%fZ",
"%a, %d %b %Y %H:%M:%S %z",
]