e
This commit is contained in:
parent
8e5b3e786c
commit
00000d98c4
4 changed files with 8 additions and 9 deletions
|
|
@ -122,13 +122,14 @@ def hijack_id(
|
||||||
async def main() -> None:
|
async def main() -> None:
|
||||||
tvg_ids: dict[str, str] = json.loads(tvg_ids_file.read_text(encoding="utf-8"))
|
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
|
tvg_ids |= additions
|
||||||
|
|
||||||
root = ET.Element("tv")
|
root = ET.Element("tv")
|
||||||
|
|
||||||
tasks = [fetch_xml(url) for url in epg_urls]
|
tasks = [fetch_xml(url) for url in epg_urls]
|
||||||
|
|
||||||
results = await asyncio.gather(*tasks)
|
results = await asyncio.gather(*tasks)
|
||||||
|
|
||||||
for epg_data in results:
|
for epg_data in results:
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ NFL_TEAMS = {
|
||||||
"Seattle Seahawks",
|
"Seattle Seahawks",
|
||||||
"Tampa Bay Buccaneers",
|
"Tampa Bay Buccaneers",
|
||||||
"Tennessee Titans",
|
"Tennessee Titans",
|
||||||
"Washington Redskins",
|
"Washington Commanders",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,6 @@ TZ = pytz.timezone("America/New_York")
|
||||||
|
|
||||||
now = datetime.now(TZ)
|
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"
|
live_img = "https://i.gyazo.com/978f2eb4a199ca5b56b447aded0cb9e3.png"
|
||||||
|
|
||||||
leagues_file = Path(__file__).parent / "leagues.json"
|
leagues_file = Path(__file__).parent / "leagues.json"
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,11 @@ from typing import Any
|
||||||
import httpx
|
import httpx
|
||||||
from playwright.async_api import Browser, BrowserContext, Playwright, Request
|
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(
|
CLIENT = httpx.AsyncClient(
|
||||||
timeout=5,
|
timeout=5,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue