Open StevenPlai opened 2 years ago
Hey @StevenPlai - thanks for your patience!
I'm not finding this error, 404 suggest a not found error so maybe it's the wrong ID?
See below:
packageVersion("espnscrapeR")
#> [1] '0.6.5'
# works
espnscrapeR::get_athlete("2580")
#> # A tibble: 1 × 21
#> player_id player_guid team_id pos player_first_na… player_last_name
#> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 2580 a3d4f4473aef111aee5… <NA> QB Drew Brees
#> # … with 15 more variables: player_full_name <chr>, player_short_name <chr>,
#> # weight <dbl>, height <dbl>, age <int>, dob <chr>, debut_year <int>,
#> # headshot_url <chr>, jersey <chr>, nfl_exp <int>, draft_txt <chr>,
#> # draft_year <int>, draft_round <int>, draft_slot <int>, draft_team_id <chr>
# not found
espnscrapeR::get_athlete("batman")
#> Error in espnscrapeR::get_athlete("batman"): Not Found (HTTP 404).
Created on 2022-05-13 by the reprex package (v2.0.1)
get_athlete() function fails and returns the following: "Error: Not Found (HTTP 404)"
After browsing the source code the error is thrown after running this section of code:
It appears that the link for the API request is invalid, perhaps due to a change on ESPN's end. This function was working properly for me about two weeks ago, but has since stopped working.