Update scraper/scraper.py
All checks were successful
Build & Push Football Docker Images / build-push-update (push) Successful in 7s
All checks were successful
Build & Push Football Docker Images / build-push-update (push) Successful in 7s
This commit is contained in:
@@ -97,7 +97,10 @@ def scrape() -> list[dict]:
|
|||||||
home_id = home_m.group(1) if home_m else None
|
home_id = home_m.group(1) if home_m else None
|
||||||
home_logo = f"https://a.espncdn.com/i/teamlogos/soccer/500/{home_id}.png" if home_id else None
|
home_logo = f"https://a.espncdn.com/i/teamlogos/soccer/500/{home_id}.png" if home_id else None
|
||||||
|
|
||||||
# ── Score / time (cell[2]) ─────────────────────
|
# ── Score / time (cell[2]) ─────────────────────────────────────────
|
||||||
|
# Remove gameNote spans (e.g. "1st Leg", "2nd Leg", aggregate text)
|
||||||
|
for note in cells[2].find_all("span", class_="gameNote"):
|
||||||
|
note.decompose()
|
||||||
mid_text = cells[2].get_text(strip=True)
|
mid_text = cells[2].get_text(strip=True)
|
||||||
|
|
||||||
# ── Away team ──────────────────────────────────
|
# ── Away team ──────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user