From 00000d952c8554773761802c40e58222265b098a Mon Sep 17 00:00:00 2001 From: doms9 <96013514+doms9@users.noreply.github.com> Date: Wed, 19 Nov 2025 12:29:27 -0500 Subject: [PATCH] e --- EPG/fetch.py | 1 + M3U8/scrapers/pixel.py | 12 +++--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/EPG/fetch.py b/EPG/fetch.py index bd4dcd6..5d7983b 100644 --- a/EPG/fetch.py +++ b/EPG/fetch.py @@ -8,6 +8,7 @@ from xml.etree import ElementTree as ET import httpx epg_file = Path(__file__).parent / "TV.xml" + epg_urls = [ "https://epgshare01.online/epgshare01/epg_ripper_CA2.xml.gz", "https://epgshare01.online/epgshare01/epg_ripper_DUMMY_CHANNELS.xml.gz", diff --git a/M3U8/scrapers/pixel.py b/M3U8/scrapers/pixel.py index dd837fc..9929538 100644 --- a/M3U8/scrapers/pixel.py +++ b/M3U8/scrapers/pixel.py @@ -9,7 +9,7 @@ log = get_logger(__name__) urls: dict[str, dict[str, str | float]] = {} -CACHE_FILE = Cache("pixel.json", exp=10_800) +CACHE_FILE = Cache("pixel.json", exp=86_400) API_FILE = Cache("pixel-api.json", exp=86_400) @@ -69,16 +69,10 @@ async def get_events(cached_keys: set[str]) -> dict[str, str | float]: re.IGNORECASE, ) - start_dt = now.delta(minutes=-30) - end_dt = now.delta(minutes=30) - for event in api_data.get("events", []): event_dt = Time.from_str(event["date"], timezone="UTC") - if now.date() != event_dt.date(): - continue - - if not start_dt <= event_dt <= end_dt: + if event_dt.date() != now.date(): continue event_name = event["match_name"] @@ -103,7 +97,7 @@ async def get_events(cached_keys: set[str]) -> dict[str, str | float]: "url": stream_link, "logo": logo, "base": "https://pixelsport.tv/", - "timestamp": event_dt.timestamp(), + "timestamp": now.timestamp(), "id": tvg_id or "Live.Event.us", }