comments
Periodic refresh of events / Run-Scraper (push) Successful in 1m49s

This commit is contained in:
2025-04-10 23:11:02 -07:00
parent f41c0b5806
commit 75e0fd8a47
+2 -1
View File
@@ -225,10 +225,11 @@ def update_gcal(scraped_events, tracks, cfg):
track_gcal_id = gcal_map[track_name]
for e in events:
ical_uid = uid_prefix + e["id"]
try: # sometimes events have weird start/end times that fail gcal's validation, but that shouldn't kill our vibe
try:
start = datetime.fromisoformat(e["start_calendar"])
end = datetime.fromisoformat(e["end_calendar"])
# sometimes events have weird start/end times that fail gcal's validation, but don't let that kill our vibe
if start >= end:
action_taken_map["other"].append(e)
raise Exception((f"Event {e['title']} (uid: {ical_uid}) has an invalid duration, {start} -> {end}"))