mirror of
https://github.com/doms9/iptv.git
synced 2026-03-07 11:18:25 +01:00
e
This commit is contained in:
parent
00000d99d6
commit
00000d9a1a
23 changed files with 44 additions and 108 deletions
|
|
@ -143,9 +143,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:
|
||||
|
|
@ -194,8 +192,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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue