This commit is contained in:
doms9 2025-09-05 12:00:23 -04:00
parent 00000d98b2
commit 00000d9449
5 changed files with 17 additions and 18 deletions

View file

@ -213,11 +213,11 @@ async def get_events(
) -> list[dict[str, str]]:
events: list[dict[str, str]] = []
pub_date_format = "%a, %d %b %Y %H:%M:%S %z"
window_start, window_end = now - timedelta(hours=1), now + timedelta(minutes=30)
if buffer := await fetch_xml_stream(url, ssl_ctx):
pub_date_format = "%a, %d %b %Y %H:%M:%S %z"
for _, elem in ET.iterparse(buffer, events=("end",)):
if elem.tag == "item":
title = elem.findtext("title")