From 00000d9869bd20dec6bf2b52731a1ee2d7b58d61 Mon Sep 17 00:00:00 2001 From: doms9 <96013514+doms9@users.noreply.github.com> Date: Thu, 11 Jun 2026 22:08:48 -0400 Subject: [PATCH] e - misc edits. --- M3U8/scrapers/pelotalibre.py | 6 ++++-- M3U8/scrapers/resportz.py | 1 - M3U8/scrapers/streamtp.py | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/M3U8/scrapers/pelotalibre.py b/M3U8/scrapers/pelotalibre.py index 3db9409c..cc1ff7b7 100644 --- a/M3U8/scrapers/pelotalibre.py +++ b/M3U8/scrapers/pelotalibre.py @@ -11,7 +11,9 @@ TAG = "PLIBRE" 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: @@ -43,7 +45,7 @@ async def get_events() -> list[dict[str, str]]: if not (name := event.get("title")) or not (link := event.get("link")): continue - elif "drm.php" in link: + elif not link.startswith(BASE_URL) or "drm.php" in link: continue if (sport := event.get("category")) and sport == "Other": diff --git a/M3U8/scrapers/resportz.py b/M3U8/scrapers/resportz.py index fdaa9b62..6e2da01a 100644 --- a/M3U8/scrapers/resportz.py +++ b/M3U8/scrapers/resportz.py @@ -1,7 +1,6 @@ import base64 import re from functools import partial -from urllib.parse import urlsplit from .utils import Cache, Time, get_logger, leagues, network diff --git a/M3U8/scrapers/streamtp.py b/M3U8/scrapers/streamtp.py index e53779b9..970ee024 100644 --- a/M3U8/scrapers/streamtp.py +++ b/M3U8/scrapers/streamtp.py @@ -12,7 +12,9 @@ TAG = "STP" 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: @@ -46,7 +48,7 @@ async def get_events() -> list[dict[str, str]]: if not (name := event.get("title")) or not (link := event.get("link")): continue - elif "sudamericaplay" in link: + elif not link.startswith(BASE_URL): continue if (sport := event.get("category")) and sport == "Other":