From ad668c4d0b34e14bc1ab8184ba9439c581f82a07 Mon Sep 17 00:00:00 2001 From: showerst Date: Fri, 17 May 2024 14:24:32 -0400 Subject: [PATCH] AK: Events: Fix for events missing fully qualified time (#4952) --- scrapers/ak/events.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scrapers/ak/events.py b/scrapers/ak/events.py index ffc5265e3f..bad8cc71dd 100755 --- a/scrapers/ak/events.py +++ b/scrapers/ak/events.py @@ -99,7 +99,12 @@ def parse_event(self, row, chamber): # No room name, so just use building address location = building + # most dates are of the format 2023-05-15:T12:30:00-09:00 + # but occasionally we just get 2023-05-15 start_date = dateutil.parser.parse(row.xpath("string(Schedule)")) + if "T" not in row.xpath("string(Schedule)"): + start_date = start_date.date() + # todo: do i need to self._TZ.localize() ? event_name = f"{name}#{location}#{start_date}" event = Event(