This commit is contained in:
doms9 2025-11-13 12:43:55 -05:00
parent 4f6e1caa5f
commit 00000d9c6d
16 changed files with 106 additions and 89 deletions

View file

@ -1,5 +1,4 @@
from functools import partial
from pathlib import Path
from urllib.parse import unquote, urljoin
import httpx
@ -9,7 +8,9 @@ from .utils import Cache, Time, get_logger, leagues, network
log = get_logger(__name__)
urls: dict[str, dict[str, str]] = {}
urls: dict[str, dict[str, str | float]] = {}
CACHE_FILE = Cache("fstv.json", exp=10_800)
MIRRORS = [
"https://fstv.online",
@ -18,8 +19,6 @@ MIRRORS = [
"https://fstv.us",
]
CACHE_FILE = Cache(Path(__file__).parent / "caches" / "fstv.json", exp=10_800)
async def process_event(
client: httpx.AsyncClient,
@ -179,3 +178,6 @@ async def scrape(client: httpx.AsyncClient) -> None:
log.info("No new events found")
CACHE_FILE.write(cached_urls)
# cloudflare bot check added