Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Games Not Loading after 2023-12-29 #14

Open
jkvederis10 opened this issue Jan 21, 2024 · 5 comments
Open

Games Not Loading after 2023-12-29 #14

jkvederis10 opened this issue Jan 21, 2024 · 5 comments

Comments

@jkvederis10
Copy link

Thank you for this awesome R package! I am noticing that games after 2023-12-29 are not loading when using the load_pbp() function. Tested scrape_day('2024-01-01') which did work. Could be user error.

@stnorton
Copy link

Not the package maintainer, but also experiencing this issue. I was able to scrape that day - it may have been a transient API issue. I was able to scrape all games from 12-29 to yesterday with:

all_df <- load_pbp('2023-24') #load 23-24 season

#now cuts off at 12/29 - will scrape all days since then 
update_vector <- seq(as.Date("2023-12-30"), Sys.Date() - 1, by = "days")

test <- lapply(update_vector, scrape_day) #scrape all days since last update

updated_df <- do.call(rbind.data.frame, test) #bind all days together

all_df <- rbind(all_df, updated_df) #bind to original df

@sdisorbo
Copy link

Also having this issue!!

@sdisorbo
Copy link

Anyone finding a better solution? Loading games by scrape_day is incredibly slow...

@amritvignesh
Copy link

Not the package maintainer, but also experiencing this issue. I was able to scrape that day - it may have been a transient API issue. I was able to scrape all games from 12-29 to yesterday with:

all_df <- load_pbp('2023-24') #load 23-24 season

#now cuts off at 12/29 - will scrape all days since then 
update_vector <- seq(as.Date("2023-12-30"), Sys.Date() - 1, by = "days")

test <- lapply(update_vector, scrape_day) #scrape all days since last update

updated_df <- do.call(rbind.data.frame, test) #bind all days together

all_df <- rbind(all_df, updated_df) #bind to original df

ive tried doing this but it seems like this error is popping:

**There was a problem fetching games:

simpleWarning in open.connection(con, "rb"): URL 'https://statsapi.web.nhl.com/api/v1/schedule?date=2023-12-30': status was 'Couldn't resolve host name'

Error in get_game_ids(day = day) :**

@stnorton
Copy link

stnorton commented Mar 6, 2024

Not the package maintainer, but also experiencing this issue. I was able to scrape that day - it may have been a transient API issue. I was able to scrape all games from 12-29 to yesterday with:

all_df <- load_pbp('2023-24') #load 23-24 season

#now cuts off at 12/29 - will scrape all days since then 
update_vector <- seq(as.Date("2023-12-30"), Sys.Date() - 1, by = "days")

test <- lapply(update_vector, scrape_day) #scrape all days since last update

updated_df <- do.call(rbind.data.frame, test) #bind all days together

all_df <- rbind(all_df, updated_df) #bind to original df

ive tried doing this but it seems like this error is popping:

**There was a problem fetching games:

simpleWarning in open.connection(con, "rb"): URL 'https://statsapi.web.nhl.com/api/v1/schedule?date=2023-12-30': status was 'Couldn't resolve host name'

Error in get_game_ids(day = day) :**

Update the package - the NHL changed the API url a few months ago, your version is querying the old API url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants