e
This commit is contained in:
parent
856ddda848
commit
00000d9186
10 changed files with 36 additions and 440 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue