This commit is contained in:
doms9 2025-11-15 02:05:52 -05:00
parent d7c64fdeae
commit 00000d94fc
8 changed files with 38 additions and 33 deletions

View file

@ -177,9 +177,12 @@ async def get_events(
pattern = re.compile(r"\-+|\(")
for event in api_data:
match_id = event["matchId"]
name = event["title"]
league = event["league"]
match_id = event.get("matchId")
name = event.get("title")
league = event.get("league")
if not (match_id and name and league):
continue
if not (ts := event.get("ts")):
continue
@ -222,7 +225,7 @@ async def scrape(client: httpx.AsyncClient) -> None:
log.info(f"Loaded {cached_count} event(s) from cache")
if not (base_url := await network.get_base(MIRRORS)):
log.warning("No working WatchFooty mirrors")
log.warning("No working Watch Footy mirrors")
CACHE_FILE.write(cached_urls)
return