e
This commit is contained in:
parent
9ed2d0a778
commit
00000d98ae
2 changed files with 8 additions and 2 deletions
|
|
@ -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")):
|
if not (date := row.css_first("div.date")):
|
||||||
continue
|
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():
|
if event_dt.date() != now.date():
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,11 @@ class Time(datetime):
|
||||||
formats = [
|
formats = [
|
||||||
"%Y-%m-%d %H:%M",
|
"%Y-%m-%d %H:%M",
|
||||||
"%Y-%m-%d %H:%M:%S",
|
"%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",
|
"%a, %d %b %Y %H:%M:%S %z",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue