forked from doms/iptv
e
misc edits
This commit is contained in:
parent
621008df1e
commit
00000d9a45
4 changed files with 10 additions and 9 deletions
|
|
@ -126,15 +126,16 @@ async def refresh_xml_cache(now_ts: float) -> dict[str, dict[str, str | float]]:
|
|||
feed = feedparser.parse(xml_data.content)
|
||||
|
||||
for entry in feed.entries:
|
||||
title = entry.get("title")
|
||||
if not (date := entry.get("published")):
|
||||
continue
|
||||
|
||||
link = entry.get("link")
|
||||
if not (link := entry.get("link")):
|
||||
continue
|
||||
|
||||
sport_sum = entry.get("summary")
|
||||
if not (title := entry.get("title")):
|
||||
continue
|
||||
|
||||
date = entry.get("published")
|
||||
|
||||
if not all([title, link, sport_sum, date]):
|
||||
if not (sport_sum := entry.get("summary")):
|
||||
continue
|
||||
|
||||
sprt = sport_sum.split(".", 1)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ async def process_event(
|
|||
url: str,
|
||||
url_num: int,
|
||||
page: Page,
|
||||
) -> tuple[str | None, str | None]:
|
||||
) -> str | None:
|
||||
|
||||
captured: list[str] = []
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ CACHE_FILE = Cache(TAG, exp=3_600)
|
|||
|
||||
API_FILE = Cache(f"{TAG}-api", exp=19_800)
|
||||
|
||||
BASE_URL = "https://hiteasport.info"
|
||||
BASE_URL = "https://streambtw.com"
|
||||
|
||||
|
||||
def fix_league(s: str) -> str:
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ async def process_event(
|
|||
await page.wait_for_timeout(2_000)
|
||||
|
||||
try:
|
||||
header = await page.wait_for_selector("text=/Stream Links/i", timeout=5_000)
|
||||
header = await page.wait_for_selector("text=/Stream Links/i", timeout=4_000)
|
||||
|
||||
text = await header.inner_text()
|
||||
except TimeoutError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue