From 00000d9735c26ce1c136e1384f2d93bc73bf2154 Mon Sep 17 00:00:00 2001 From: doms9 <96013514+doms9@users.noreply.github.com> Date: Mon, 9 Feb 2026 13:43:06 -0500 Subject: [PATCH] e add olympic games to livetvsx.py --- M3U8/scrapers/livetvsx.py | 11 ++++++++--- M3U8/scrapers/streambtw.py | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/M3U8/scrapers/livetvsx.py b/M3U8/scrapers/livetvsx.py index 93f9d56..5f7eb5a 100644 --- a/M3U8/scrapers/livetvsx.py +++ b/M3U8/scrapers/livetvsx.py @@ -22,6 +22,7 @@ VALID_SPORTS = { "Football", "Basketball", "Ice Hockey", + "Olympic Games", } @@ -140,9 +141,6 @@ async def refresh_xml_cache(now_ts: float) -> dict[str, dict[str, str | float]]: sport, league = sprt[0], "".join(sprt[1:]).strip() - if sport not in VALID_SPORTS: - continue - event_dt = Time.from_str(date) key = f"[{sport} - {league}] {title} ({TAG})" @@ -176,6 +174,13 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]: if k in cached_keys: continue + if not ( + v["sport"] in VALID_SPORTS + or v["league"] in VALID_SPORTS + or v["event"].lower() == "olympic games" + ): + continue + if not start_ts <= v["event_ts"] <= end_ts: continue diff --git a/M3U8/scrapers/streambtw.py b/M3U8/scrapers/streambtw.py index fe66a9c..eefb8a4 100644 --- a/M3U8/scrapers/streambtw.py +++ b/M3U8/scrapers/streambtw.py @@ -13,7 +13,7 @@ TAG = "STRMBTW" CACHE_FILE = Cache(TAG, exp=3_600) -API_FILE = Cache(f"{TAG}-api", exp=28_800) +API_FILE = Cache(f"{TAG}-api", exp=19_800) BASE_URL = "https://hiteasport.info"