This commit is contained in:
doms9 2025-10-13 13:36:09 -04:00
parent 65769e3d19
commit 00000d9c93

View file

@ -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,
}
)