You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.
I am currently working on a project that has an optimal selection of FPL players and has been using the fplscrapR package. It is great and allows easy access to data.
I'm trying to use it to get the player's score for each game week for the last three years, but I'm having some problems trying to understand how to use the function and run an example of it.
get_entry_player_picks(1076,1)
Error in open.connection(con, "rb") : HTTP error 404.
df <- get_player_hist ( playerid = get_player_id ( c ( "Mesut Özil" , "Juan Mata" ))$ id )
Error in open.connection(con, "rb") : cannot open the connection
In addition: Warning message:
In open.connection(con, "rb") :
cannot open URL 'https://fantasy.premierleague.com/api/element-summary/NA/': HTTP status was '404 Not Found'
I initially thought the problem was on my computer and tried turning off the windows firewall, but I still can't get the data. Has anyone else had the same problem recently? If you have any time to get back to me I would be very grateful.
The text was updated successfully, but these errors were encountered:
I will update some of the vignettes, hopefully before the season starts, because I can see how they may cause confusion like here.
Simply, the errors you get are because:
get_entry_player_picks() won't work before Gameweek 1. This function fetches player picks for a given entry (team). But since the season hasn't started, there aren't any player picks. So you'll have to wait for Gameweek 1.
get_player_hist() only works for players currently in the game. If you run get_player_hist(playerid = get_player_id("Mohamed Salah")$id), that will work. You can access data from prior season through several package functions, e.g. get_player_info() or get_player_details() by specifying the 'season' parameter.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello.
I am currently working on a project that has an optimal selection of FPL players and has been using the fplscrapR package. It is great and allows easy access to data.
I'm trying to use it to get the player's score for each game week for the last three years, but I'm having some problems trying to understand how to use the function and run an example of it.
(Articles: https://wiscostret.github.io/fplscrapR/articles/hazalexishist.html)
I initially thought the problem was on my computer and tried turning off the windows firewall, but I still can't get the data. Has anyone else had the same problem recently? If you have any time to get back to me I would be very grateful.
The text was updated successfully, but these errors were encountered: