From 00000d9c684fa95e0b4ebf07c7557ab471407c1f Mon Sep 17 00:00:00 2001 From: doms9 <96013514+doms9@users.noreply.github.com> Date: Sat, 21 Feb 2026 11:39:00 -0500 Subject: [PATCH] e --- M3U8/scrapers/tvapp.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/M3U8/scrapers/tvapp.py b/M3U8/scrapers/tvapp.py index f5fe4501..469d18f5 100644 --- a/M3U8/scrapers/tvapp.py +++ b/M3U8/scrapers/tvapp.py @@ -25,12 +25,12 @@ async def process_event(url: str, url_num: int) -> str | None: soup = HTMLParser(html_data.content) if not (channel_name_elem := soup.css_first("#stream_name")): - log.warning(f"URL {url_num}) No channel found.") + log.warning(f"URL {url_num}) No channel name elem found.") return if not (channel_name := channel_name_elem.attributes.get("name")): - log.warning(f"URL {url_num}) No channel found.") + log.warning(f"URL {url_num}) No channel name found.") return @@ -51,13 +51,15 @@ async def get_events() -> list[dict[str, str]]: if not (h3_elem := row.css_first("h3")): continue - sport = h3_elem.text(strip=True) - - if sport.lower() == "live tv channels": + if (sport := h3_elem.text(strip=True)).lower() == "live tv channels": continue for a in row.css("a.list-group-item[href]"): - event_name = a.text(strip=True).split(":", 1)[0] + splits = a.text(strip=True).split(":") + + del splits[-3:] + + event_name = ":".join(splits) if not (href := a.attributes.get("href")): continue