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 urljoin
import httpx
@ -12,9 +11,9 @@ log = get_logger(__name__)
urls: dict[str, dict[str, str | float]] = {}
CACHE_FILE = Cache(Path(__file__).parent / "caches" / "streameast.json", exp=10_800)
CACHE_FILE = Cache("streameast.json", exp=10_800)
prefix = {
prefixes = {
"ch": None,
"sg": None,
"tw": None,
@ -33,8 +32,8 @@ prefix = {
}
MIRRORS = [
*[f"https://streameast.{ext}" for ext in prefix if not prefix[ext]],
*[f"https://thestreameast.{ext}" for ext in prefix if prefix[ext] == "the"],
*[f"https://streameast.{ext}" for ext in prefixes if not prefixes[ext]],
*[f"https://thestreameast.{ext}" for ext in prefixes if prefixes[ext] == "the"],
]
@ -52,6 +51,7 @@ async def get_events(
return []
soup = HTMLParser(r.text)
events = []
now = Time.clean(Time.now())