sportsdataverse / hoopR

An R package to quickly obtain clean and tidy men's basketball play by play data.
http://hoopr.sportsdataverse.org/
Other
80 stars 18 forks source link

Trouble loading KenPom player page #74

Closed gitmoneyMSBA closed 2 years ago

gitmoneyMSBA commented 2 years ago

I get the following error running kp_team_players(tm_name, year = season):

Error in kp_team_players(tm_name, year = season) : object 'kenpom' not found

Digging in a little further, it looks like when I try to pull roster pages, I get the following:

Warning message: In session_set_response(x, resp) : Too Many Requests (RFC 6585) (HTTP 429).

saiemgilani commented 2 years ago

You are making too many requests according to the error, I would suggest slowing down on the speed of your calls with a rest (i.e. Sys.sleep() of some kind) between calls. This feels like it is a problem that the package should not inherently need to solve if you follow polite scraping.