- misc edits.
This commit is contained in:
doms9 2026-06-11 22:08:48 -04:00
parent ed564d75e2
commit 00000d9869
3 changed files with 8 additions and 5 deletions

View file

@ -11,7 +11,9 @@ TAG = "PLIBRE"
CACHE_FILE = Cache(TAG, exp=19_800) CACHE_FILE = Cache(TAG, exp=19_800)
API_URL = "https://la18hd.com/eventos/json/agenda123.json" BASE_URL = "https://la18hd.com"
API_URL = f"{BASE_URL}/eventos/json/agenda123.json"
async def process_event(url: str, url_num: int) -> str | None: async def process_event(url: str, url_num: int) -> str | None:
@ -43,7 +45,7 @@ async def get_events() -> list[dict[str, str]]:
if not (name := event.get("title")) or not (link := event.get("link")): if not (name := event.get("title")) or not (link := event.get("link")):
continue continue
elif "drm.php" in link: elif not link.startswith(BASE_URL) or "drm.php" in link:
continue continue
if (sport := event.get("category")) and sport == "Other": if (sport := event.get("category")) and sport == "Other":

View file

@ -1,7 +1,6 @@
import base64 import base64
import re import re
from functools import partial from functools import partial
from urllib.parse import urlsplit
from .utils import Cache, Time, get_logger, leagues, network from .utils import Cache, Time, get_logger, leagues, network

View file

@ -12,7 +12,9 @@ TAG = "STP"
CACHE_FILE = Cache(TAG, exp=19_800) CACHE_FILE = Cache(TAG, exp=19_800)
API_URL = "https://streamtpday1.xyz/eventos.json" BASE_URL = "https://streamtpday1.xyz"
API_URL = f"{BASE_URL}/eventos.json"
async def process_event(url: str, url_num: int) -> str | None: async def process_event(url: str, url_num: int) -> str | None:
@ -46,7 +48,7 @@ async def get_events() -> list[dict[str, str]]:
if not (name := event.get("title")) or not (link := event.get("link")): if not (name := event.get("title")) or not (link := event.get("link")):
continue continue
elif "sudamericaplay" in link: elif not link.startswith(BASE_URL):
continue continue
if (sport := event.get("category")) and sport == "Other": if (sport := event.get("category")) and sport == "Other":