This commit is contained in:
doms9 2026-03-02 00:50:28 -05:00
parent 00000d99d6
commit 00000d9a1a
23 changed files with 44 additions and 108 deletions

View file

@ -133,9 +133,7 @@ async def scrape(browser: Browser) -> None:
log.info(f'Scraping from "{BASE_URL}"')
events = await get_events(cached_urls.keys())
if events:
if events := await get_events(cached_urls.keys()):
log.info(f"Processing {len(events)} new URL(s)")
async with network.event_context(browser, stealth=False) as context:
@ -184,8 +182,7 @@ async def scrape(browser: Browser) -> None:
urls[key] = entry
if new_count := valid_count - cached_count:
log.info(f"Collected and cached {new_count} new event(s)")
log.info(f"Collected and cached {valid_count - cached_count} new event(s)")
else:
log.info("No new events found")