Skip to content

Restore live Player data and major teams from core records - #78

Merged
soodoku merged 1 commit into
masterfrom
fix-player-core-teams
Oct 21, 2026
Merged

soodoku merged 1 commit into
masterfrom
fix-player-core-teams

Conversation

@soodoku

@soodoku soodoku commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Player(253802) currently raises JSONDecodeError because the player-home endpoint returns an HTML 403 response. The constructor also fetches a player HTML page that is not used to populate its fields.

Read the existing core athlete record, resolve its majorTeams references lazily, and raise non-404 HTTP errors before parsing JSON. This restores Player construction and preserves major_teams, which the older #73 workaround removed. Thanks to @shsiddhant for the reproduction in #73; this PR replaces that approach because the contributor branch cannot be updated by maintainers and its Match/Summary changes conflict with the current implementation.

Validation:

  • Before: all 5 live Player integration tests failed with JSONDecodeError. After: all 5 pass against ESPN's current responses.
  • Offline suite: 121 passed, 10 live tests skipped; Ruff check and format pass.
  • Built sdist/wheel and ran the installed-wheel suite: 121 passed, 10 skipped.
  • Regression tests failed with the production change reverted and passed after restoration.

@soodoku
soodoku merged commit 5bd228c into master Oct 21, 2026
2 checks passed
@soodoku
soodoku deleted the fix-player-core-teams branch October 21, 2026 18:51
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