This commit is contained in:
doms9 2025-09-24 16:21:25 -04:00
parent 56e0a3b9de
commit 00000d9bd1
4 changed files with 13 additions and 12 deletions

View file

@ -54,10 +54,6 @@ async def get_events(client: httpx.AsyncClient) -> list[dict[str, str]]:
events = []
for card in soup.css("div.container div.card"):
img = card.css_first("img.league-logo")
logo = img.attrs.get("src") if img else None
sport = card.css_first("h5.card-title").text(strip=True)
name = card.css_first("p.card-text").text(strip=True)
@ -70,7 +66,6 @@ async def get_events(client: httpx.AsyncClient) -> list[dict[str, str]]:
"sport": sport,
"event": name,
"link": urljoin(BASE_URL, href),
"logo": logo,
}
)
@ -105,7 +100,7 @@ async def scrape(client: httpx.AsyncClient) -> None:
entry = {
"url": url,
"logo": ev["logo"] or logo,
"logo": logo,
"base": BASE_URL,
"timestamp": now.timestamp(),
"id": tvg_id or "Live.Event.us",