JaseZiv / worldfootballR

A wrapper for extracting world football (soccer) data from FBref, Transfermark, Understat
https://jaseziv.github.io/worldfootballR/
444 stars 60 forks source link

Unavailable to retrieve data from several functions from fotmob #122

Closed Pablo-Alvarez-Baeza closed 2 years ago

Pablo-Alvarez-Baeza commented 2 years ago

I'm getting this issue with several functions from fotmob:

library(worldfootballR) library(dplyr) library(tidyr)

epl_team_xg_2021 <- fotmob_get_season_stats( country = "ENG", league_name = "Premier League", season_name = "2020/2021", stat_name = "Expected goals", team_or_player = "team" )

Error: Expected to find table or tables element but did not. Error: Document is empty In addition: Warning message: Unknown or uninitialised column: page_url.

JaseZiv commented 2 years ago

Thanks for submitting.

It appears as though fotmob have changed some URL endpoints.

This issue is also linked to this.

Given fotmob tend to change these semi-regularly, then back again, maybe we hold off pushing any changes for a few days... Thoughts @tonyelhabr?

tonyelhabr commented 2 years ago

Thanks for submitting.

It appears as though fotmob have changed some URL endpoints.

This issue is also linked to this.

Given fotmob tend to change these semi-regularly, then back again, maybe we hold off pushing any changes for a few days... Thoughts @tonyelhabr?

I think the best solution is to take the fotmob functions out of this package. I could make a package just for fotmob that should not be expected to be as robust as {worldfootballR}