Open Forrest31 opened 1 year ago
My guess is Baseball Reference might've rate limited your requests.
I ran this below without any issues.
library(tidyverse)
library(baseballr)
teams<-c("NYM", "CHC", "ATL", "CIN", "SLN", "LAA", "BAL", "MIN",
"OAK", "TEX", "TOR", "ARI", "PIT", "SEA", "HOU", "KCR", "TBR",
"COL", "MIL", "PHI", "SDN", "SFN", "BOS", "DET", "NYA","LAD",
"CHA", "CLE", "WSN", "MIA")
mlb_results<-data.frame()
for (x in teams) {
Sys.sleep(runif(1, max = 7))
print(x)
season_results<-bref_team_results(Tm=x, year = 2022)
loop<-data.frame(season_results)
mlb_results<-rbind(mlb_results,loop)
}
Thank you for responding so quickly. I really appreciate it.
Do you happen to have contact information for anyone at baseball reference to increase my limit or know how I could increase this? Thank you so much.
On Wed, Mar 15, 2023 at 3:35 PM Camden Kay @.***> wrote:
My guess is Baseball Reference might've rate limited your requests.
I ran this below without any issues.
library(tidyverse) library(baseballr)
teams<-c("NYM", "CHC", "ATL", "CIN", "SLN", "LAA", "BAL", "MIN", "OAK", "TEX", "TOR", "ARI", "PIT", "SEA", "HOU", "KCR", "TBR", "COL", "MIL", "PHI", "SDN", "SFN", "BOS", "DET", "NYA","LAD", "CHA", "CLE", "WSN", "MIA")
mlb_results<-data.frame()
for (x in teams) { Sys.sleep(runif(1, max = 7)) print(x)
season_results<-bref_team_results(Tm=x, year = 2022) loop<-data.frame(season_results) mlb_results<-rbind(mlb_results,loop) }
— Reply to this email directly, view it on GitHub https://github.com/BillPetti/baseballr/issues/292#issuecomment-1470803841, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARTITNU5MESPQEC5PJ73VZDW4IR2RANCNFSM6AAAAAAV2SBRJM . You are receiving this because you authored the thread.Message ID: @.***>
I think it was likely a temporary limitation. Have you tried updating the package and then running the example that I included to see if that works for you?
No. I assumed the limitation was forever. I can try that now. Thank you.
On Tue, Mar 21, 2023 at 10:29 AM Camden Kay @.***> wrote:
I think it was likely a temporary limitation. Have you tried updating the package and then running the example that I included to see if that works for you?
— Reply to this email directly, view it on GitHub https://github.com/BillPetti/baseballr/issues/292#issuecomment-1478044824, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARTITNQYEQ64PWDNPSSPBHTW5HCM5ANCNFSM6AAAAAAV2SBRJM . You are receiving this because you authored the thread.Message ID: @.***>
Describe the bug No results for 5 teams using the bref_team_results function.: Marlins, Nats, Dodgers, Guardians, and White Sox.
To Reproduce
The following code provides results for only 25 teams. The teams listed above teams<-c("NYM", "CHC", "ATL", "CIN", "SLN", "LAA", "BAL", "MIN", "OAK", "TEX", "TOR", "ARI", "PIT", "SEA", "HOU", "KCR", "TBR", "COL", "MIL", "PHI", "SDN", "SFN", "BOS", "DET", "NYA","LAD", "CHA", "CLE", "WSN", "MIA")