Fetch boxscore/playbyplay from FIBA LiveStats data.json feed#1
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The hosted Genius Sports competition-scoped pages (
competition/{id}/match/{id}/boxscoreand.../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
data.jsonfeed (fibalivestats.../data/{match_id}/data.json), keyed only by match id, which stays available for past/playoff matches.genius_livestats_parser.pyconverts that feed into the same intermediate shapesnormalize_boxscoreand_calculate_possessionsalready consume, so possession logic is unchanged.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