mirror of
https://github.com/doms9/iptv.git
synced 2026-01-21 03:59:03 +01:00
e
fix scraper crashing if api url(s) do not work misc. edits
This commit is contained in:
parent
51598ce2a2
commit
00000d903e
9 changed files with 18 additions and 24 deletions
|
|
@ -59,7 +59,7 @@ async def refresh_api_cache(now_ts: float) -> 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_ts}]
|
||||
|
||||
for ev in data:
|
||||
ev["ts"] = ev.pop("timestamp")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue