wiscostret / fplscrapR

This package enables those interested in Fantasy Premier League to perform detailed data analysis of the game, using the FPL's JSON API. The fplscrapR functions help R users collect and parse data from the Official Fantasy Premier League website.
Creative Commons Zero v1.0 Universal
76 stars 16 forks source link

get_player_details() #25

Closed albyedw closed 2 years ago

albyedw commented 2 years ago

I'm trying to call get_player_details() to get gameweek level data for all players this season, but I get this error:

Error in data.frame(fplboot, playername = elements$playername[which(elements$id == : arguments imply differing number of rows: 0, 1

I've also tried get_player_details(season = '21') but I get this error:

Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open URL 'https://raw.githubusercontent.com/wiscostret/histfpldata/master/getplayerdetails21.csv': HTTP status was '404 Not Found'

wiscostret commented 2 years ago

Hi, is this a consistent issue? I just tested it out and had no problems. This may occassionally occur due to connection issues or when FPL are adding new players. The bug indicates that there is a mis-match between the list of players (elements) and the gameweek-by-gameweek information. Waiting a bit and trying again usually works. Let me know.

Oh and you don't need to add the 'season' parameter when you have grabbing data from this season. It is only for historical season (20/19/18 etc.)