This commit is contained in:
doms9 2025-10-01 14:56:15 -04:00
parent 7cabebb529
commit 00000d940b
4 changed files with 13 additions and 13 deletions

View file

@ -83,13 +83,13 @@ async def refresh_html_cache(client: httpx.AsyncClient, url: str) -> dict[str, s
soup = HTMLParser(r.text)
events = {}
now = Time.now().to_tz("EST")
now = Time.now()
for row in soup.css("div.wrap div.row"):
if not (date := row.css_first("div.date")):
continue
event_dt = Time.from_str(date.text(strip=True)).to_tz("EST")
event_dt = Time.from_str(date.text(strip=True))
if event_dt.date() != now.date():
continue
@ -134,10 +134,10 @@ async def get_events(
HTML_CACHE.write(events)
live = []
now = Time.now().to_tz("EST")
now = Time.now()
start_ts = now.delta(minutes=-30).to_tz("EST").timestamp()
end_ts = now.delta(minutes=30).to_tz("EST").timestamp()
start_ts = now.delta(minutes=-30).timestamp()
end_ts = now.delta(minutes=30).timestamp()
for k, v in events.items():
if cached_keys & {k}: