e
This commit is contained in:
parent
7cabebb529
commit
00000d940b
4 changed files with 13 additions and 13 deletions
|
|
@ -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}:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue