fix scraper crashing if api url(s) do not work
misc. edits
This commit is contained in:
doms9 2025-12-29 09:57:40 -05:00
parent 51598ce2a2
commit 00000d903e
9 changed files with 18 additions and 24 deletions

View file

@ -60,7 +60,7 @@ async def refresh_api_cache(now: Time) -> list[dict[str, Any]]:
results = await asyncio.gather(*tasks)
if not (data := [*chain.from_iterable(r.json() for r in results if r)]):
return []
return [{"timestamp": now.timestamp()}]
for ev in data:
ev["ts"] = ev.pop("timestamp")