From 00000d934915f3950f74380fa2ff4f7526fd03da Mon Sep 17 00:00:00 2001 From: doms9 <96013514+doms9@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:06:05 -0400 Subject: [PATCH] e --- M3U8/scrapers/watchfooty.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/M3U8/scrapers/watchfooty.py b/M3U8/scrapers/watchfooty.py index a072e80..330a572 100644 --- a/M3U8/scrapers/watchfooty.py +++ b/M3U8/scrapers/watchfooty.py @@ -203,8 +203,9 @@ async def get_events( async def scrape(client: httpx.AsyncClient) -> None: cached_urls = CACHE_FILE.load() - cached_count = len(cached_urls) - urls.update({k: v for k, v in cached_urls.items() if v["url"]}) + valid_urls = {k: v for k, v in cached_urls.items() if v["url"]} + valid_count = cached_count = len(valid_urls) + urls.update(valid_urls) log.info(f"Loaded {cached_count} event(s) from cache") @@ -253,11 +254,12 @@ async def scrape(client: httpx.AsyncClient) -> None: cached_urls[key] = entry if url: + valid_count += 1 urls[key] = entry await browser.close() - if new_count := len(cached_urls) - cached_count: + if new_count := valid_count - cached_count: log.info(f"Collected and cached {new_count} new event(s)") else: log.info("No new events found")