From 00000d98c4b50c69d99fa6600c2c90894264eb9f Mon Sep 17 00:00:00 2001 From: doms9 <96013514+doms9@users.noreply.github.com> Date: Sat, 20 Sep 2025 23:47:18 -0400 Subject: [PATCH] e --- EPG/fetch.py | 3 ++- M3U8/scrapers/ppv.py | 2 +- M3U8/scrapers/utils/config.py | 6 ------ M3U8/scrapers/utils/network.py | 6 +++++- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/EPG/fetch.py b/EPG/fetch.py index ac9e8a3..cdeac7a 100644 --- a/EPG/fetch.py +++ b/EPG/fetch.py @@ -122,13 +122,14 @@ def hijack_id( async def main() -> None: tvg_ids: dict[str, str] = json.loads(tvg_ids_file.read_text(encoding="utf-8")) - additions = dummies | {v["old"]: live_img for _, v in replace_ids.items()} + additions = dummies | {v["old"]: live_img for v in replace_ids.values()} tvg_ids |= additions root = ET.Element("tv") tasks = [fetch_xml(url) for url in epg_urls] + results = await asyncio.gather(*tasks) for epg_data in results: diff --git a/M3U8/scrapers/ppv.py b/M3U8/scrapers/ppv.py index 66da8a0..bf8113b 100644 --- a/M3U8/scrapers/ppv.py +++ b/M3U8/scrapers/ppv.py @@ -68,7 +68,7 @@ NFL_TEAMS = { "Seattle Seahawks", "Tampa Bay Buccaneers", "Tennessee Titans", - "Washington Redskins", + "Washington Commanders", } diff --git a/M3U8/scrapers/utils/config.py b/M3U8/scrapers/utils/config.py index 345076b..5c604c5 100644 --- a/M3U8/scrapers/utils/config.py +++ b/M3U8/scrapers/utils/config.py @@ -8,12 +8,6 @@ TZ = pytz.timezone("America/New_York") now = datetime.now(TZ) -UA = ( - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " - "AppleWebKit/537.36 (KHTML, like Gecko) " - "Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0" -) - live_img = "https://i.gyazo.com/978f2eb4a199ca5b56b447aded0cb9e3.png" leagues_file = Path(__file__).parent / "leagues.json" diff --git a/M3U8/scrapers/utils/network.py b/M3U8/scrapers/utils/network.py index a45a233..5121513 100644 --- a/M3U8/scrapers/utils/network.py +++ b/M3U8/scrapers/utils/network.py @@ -7,7 +7,11 @@ from typing import Any import httpx from playwright.async_api import Browser, BrowserContext, Playwright, Request -from .config import UA +UA = ( + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " + "AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0" +) CLIENT = httpx.AsyncClient( timeout=5,