This commit is contained in:
doms9 2025-09-15 09:26:20 -04:00
parent 856ddda848
commit 00000d9186
10 changed files with 36 additions and 440 deletions

View file

@ -1,4 +1,3 @@
import json
import re
from pathlib import Path
from urllib.parse import urljoin
@ -6,7 +5,7 @@ from urllib.parse import urljoin
import httpx
from selectolax.parser import HTMLParser
from .utils import get_logger, load_cache, now, safe_process_event
from .utils import get_logger, load_cache, now, safe_process_event, write_cache
log = get_logger(__name__)
@ -111,4 +110,4 @@ async def main(client: httpx.AsyncClient) -> None:
log.info(f"Collected {len(urls)} event(s)")
CACHE_FILE.write_text(json.dumps(urls, indent=2), encoding="utf-8")
write_cache(CACHE_FILE, urls)