Skip to content

Fetch boxscore/playbyplay from FIBA LiveStats data.json feed#1

Merged
apmnt merged 1 commit into
mainfrom
fix/livestats-boxscore-fetch
Jun 14, 2026
Merged

Fetch boxscore/playbyplay from FIBA LiveStats data.json feed#1
apmnt merged 1 commit into
mainfrom
fix/livestats-boxscore-fetch

Conversation

@apmnt

@apmnt apmnt commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Why

The hosted Genius Sports competition-scoped pages (competition/{id}/match/{id}/boxscore and .../playbyplay) return 404 for the entire 25-26 season — the competition id (42145) has rotated/closed. Because the ingestion requires a complete boxscore + play-by-play, all 14 playoff-final games (Mar 29 – Apr 26) were skipped, freezing the site at Mar 28.

What

  • Switch the primary source to the FIBA LiveStats data.json feed (fibalivestats.../data/{match_id}/data.json), keyed only by match id, which stays available for past/playoff matches.
  • New genius_livestats_parser.py converts that feed into the same intermediate shapes normalize_boxscore and _calculate_possessions already consume, so possession logic is unchanged.
  • The hosted HTML path is kept as a fallback.

Validation

On a known-good game the LiveStats path reproduces the previously-stored boxscore totals and possession counts exactly (80/81/161). Re-running ingestion adds the 14 playoff games (159 total, all with boxscore + pbp).

🤖 Generated with Claude Code

The hosted Genius Sports competition-scoped HTML pages
(competition/{id}/match/{id}/boxscore|playbyplay) return 404 once a
competition id rotates/closes, which dropped every playoff-final game
(no complete boxscore -> skipped by the ingestion).

Switch the primary source to the FIBA LiveStats data.json feed, which is
keyed only by match id and stays available for past and playoff matches.
A new genius_livestats_parser converts that feed into the same
intermediate shapes normalize_boxscore and _calculate_possessions
already consume, so possession logic is unchanged (validated to
reproduce stored boxscore totals and possession counts exactly). The
hosted HTML path remains as a fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@apmnt apmnt merged commit a580aa7 into main Jun 14, 2026
1 check failed
@apmnt apmnt deleted the fix/livestats-boxscore-fetch branch June 14, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant