From 00000d9c936a65cd53c2bc976af53e8998faebec Mon Sep 17 00:00:00 2001 From: doms9 <96013514+doms9@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:36:09 -0400 Subject: [PATCH] e --- M3U8/scrapers/streameast.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/M3U8/scrapers/streameast.py b/M3U8/scrapers/streameast.py index 59760f1..879fea5 100644 --- a/M3U8/scrapers/streameast.py +++ b/M3U8/scrapers/streameast.py @@ -111,7 +111,10 @@ async def get_events( continue for a in section.css("a.uefa-card"): - href = urljoin(url, a.attributes.get("href", "")) + if not (href := a.attributes.get("href")): + continue + + link = urljoin(url, href) team_spans = [t.text(strip=True) for t in a.css("span.uefa-name")] @@ -129,7 +132,7 @@ async def get_events( time_text = time_span.text(strip=True) - timestamp = int(time_span.attributes.get("data-time", 31496400)) + timestamp = int(a.attributes.get("data-time", 31496400)) key = f"[{sport}] {name} (SEAST)" @@ -143,7 +146,7 @@ async def get_events( { "sport": sport, "event": name, - "link": href, + "link": link, "timestamp": timestamp, } )