Update scraper/scraper.py
All checks were successful
Build & Push Football Docker Images / build-push-update (push) Successful in 7s

Match score at start of string only, max 2 digits each side
This commit is contained in:
2026-04-12 15:15:17 +00:00
parent 089754ac22
commit 51fce1b261

View File

@@ -127,7 +127,7 @@ def scrape() -> list[dict]:
time_str = "TBD"
if is_past:
# Extract just the score digits, ignore leg/aggregate text
score_match = re.search(r"(\d+)\s*-\s*(\d+)", mid_text)
score_match = re.match(r"^(\d{1,2})\s*-\s*(\d{1,2})", mid_text)
if score_match:
score_str = f"{score_match.group(1)}-{score_match.group(2)}"
else: