[PR #823] [CLOSED] [FotMob] Added support for retrieving "Expected goals on target (xGOT)" stats #845

Closed
opened 2026-03-02 15:59:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/probberechts/soccerdata/pull/823
Author: @zack-fathi
Created: 4/1/2025
Status: Closed

Base: masterHead: FOTMOB_add_xGOT


📝 Commits (2)

  • 139caca Add support for 'Expected goals on target (xGOT)' to read_team_match_stats
  • e221f9b style: auto format pre-commit

📊 Changes

2 files changed (+25 additions, -2 deletions)

View changed files

📝 soccerdata/fotmob.py (+15 -1)
📝 tests/test_FotMob.py (+10 -1)

📄 Description

Changes Made

  • Enhanced read_team_match_stats to recognize and extract the "xG on target (xGOT)" field from within the "Expected goals (xG)" section.
  • Updated the test suite (test_read_team_match_stats) to include stat_type="Expected goals on target (xGOT)".

Closes #781 — This feature allows users to explicitly request xGOT data, which was previously included in the data but not directly accessible.

Note: CI failures are unrelated to this PR. The failing tests are in FiveThirtyEight and SoFIFA, which were not touched in this PR. Errors appear to be caused by external data sources returning unexpected or malformed data (e.g., HTML instead of JSON).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/probberechts/soccerdata/pull/823 **Author:** [@zack-fathi](https://github.com/zack-fathi) **Created:** 4/1/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `FOTMOB_add_xGOT` --- ### 📝 Commits (2) - [`139caca`](https://github.com/probberechts/soccerdata/commit/139caca811c6284b560f94c83649988621362d8c) Add support for 'Expected goals on target (xGOT)' to read_team_match_stats - [`e221f9b`](https://github.com/probberechts/soccerdata/commit/e221f9b924ff383f265fbdc818efc72c5e605f63) style: auto format pre-commit ### 📊 Changes **2 files changed** (+25 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `soccerdata/fotmob.py` (+15 -1) 📝 `tests/test_FotMob.py` (+10 -1) </details> ### 📄 Description ### Changes Made - Enhanced `read_team_match_stats` to recognize and extract the `"xG on target (xGOT)"` field from within the `"Expected goals (xG)"` section. - Updated the test suite (`test_read_team_match_stats`) to include `stat_type="Expected goals on target (xGOT)"`. Closes #781 — This feature allows users to explicitly request xGOT data, which was previously included in the data but not directly accessible. Note: CI failures are unrelated to this PR. The failing tests are in `FiveThirtyEight` and `SoFIFA`, which were not touched in this PR. Errors appear to be caused by external data sources returning unexpected or malformed data (e.g., HTML instead of JSON). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 15:59:51 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/soccerdata#845
No description provided.