e
This commit is contained in:
parent
65769e3d19
commit
00000d9c93
1 changed files with 6 additions and 3 deletions
|
|
@ -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,
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue