From 00000d922d50b954a8b2c9bdba1b43810ea710b9 Mon Sep 17 00:00:00 2001 From: doms9 <96013514+doms9@users.noreply.github.com> Date: Sat, 27 Dec 2025 13:17:19 -0500 Subject: [PATCH] e edit totalsportek caching add base for cdnlivetv --- M3U8/scrapers/cdnlivetv.py | 2 +- M3U8/scrapers/totalsportek.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/M3U8/scrapers/cdnlivetv.py b/M3U8/scrapers/cdnlivetv.py index 3bf7d0e..3907609 100644 --- a/M3U8/scrapers/cdnlivetv.py +++ b/M3U8/scrapers/cdnlivetv.py @@ -138,7 +138,7 @@ async def scrape() -> None: entry = { "url": url, "logo": logo, - "base": "", + "base": link, "timestamp": ts, "id": tvg_id or "Live.Event.us", "link": link, diff --git a/M3U8/scrapers/totalsportek.py b/M3U8/scrapers/totalsportek.py index 5ccd650..9a86bf6 100644 --- a/M3U8/scrapers/totalsportek.py +++ b/M3U8/scrapers/totalsportek.py @@ -79,6 +79,12 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]: sport = span.text(strip=True) if node.tag == "a" and "nav-link2" in node_class: + if not (time_node := node.css_first(".col-3")): + continue + + if not time_node.text(strip=True) == "MatchStarted": + continue + if not (href := node.attributes.get("href")): continue