baseballr
baseballr copied to clipboard
fg_batter_game_logs no longer working
The function fg_batter_game_logs is no longer working. Example:
fg_batter_game_logs(playerid = 15640, year = 2023) Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host: cdn.fangraphs.com Request failed [ERROR]. Retrying in 1.5 seconds... Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host: cdn.fangraphs.com Request failed [ERROR]. Retrying in 1 seconds... 2023-09-22 06:58:17: Invalid arguments or no batter game logs data available! Error in fg_batter_game_logs(playerid = 15640, year = 2023) : object 'payload' not found
Same problem with fg_pitcher_game_logs. Trying to use this data for a project so would really appreciate if someone were able to fix this!
Here's a temporary solution for y'all: MLB Game Logs in R! https://youtu.be/2WcYK_TFDHE
Thank you! This was helpful! Quick follow up. If I wanted to use this temporary solution and get all the game logs of players that have played up until the 2023 season in one single dataset how would I go about doing that?!
So is this something that will be fixed before the season starts? I am hoping to use these stats that are specific from Fangraphs
fangraphs migrated from all cdn.fangraphs.com/api/ endpoints to http://www.fangraphs.com/api/. The underlying endpoint for the fg_xxx_game_logs functions need to be updated.
Yeah, I already resolved this. Update your package
install.packages("baseballr")