Closed zecellomaster closed 2 years ago
Hi,
This is a perfectly written and formatted issue! Thanks so much!
As for the issue itself - I can't seem to recreate this. I wonder if you have been blocked.
Can you try again in a few hours and let me know if the problems persist. My environment is very similar to yours so wondering if it is because you were rate limited for a short period.
You could always try another fbref function to see if that works to know whether you've been blocked or not?
Thanks!
Okay, so I have removed/reinstalled the package, restarted R, waited over a day, and tried a variety of functions. None of which seem to work (scream). The errors that were returned before from match data functions have remained the same, while the team/season pages throw back a different one:
pls_help_me <- fb_player_urls("https://fbref.com/en/squads/fd962109/Fulham-Stats")
Error in open.connection(x, "rb") :
SSL certificate problem: certificate has expired
I also seem to keep getting the 'echos' of warning messages past, even when I am doing something completely different.
Warning message:
In .Internal(gc(verbose, reset, full)) :
closing unused connection 3 (https://fbref.com/en/squads/fd962109/Fulham-Stats)
I really suspect that it has something to do with the package (or at least my implementation of it) because I recall that when I scraped data from FBRef's pages too quickly, I was locked out of the site even in my browser (or the internet at my old place was just that bad).
I'm at wits end here. I used remove.packages()
to uninstall worldfootballR
, reinstalled it using devtools
, then did the same again with CRAN when that didn't work. Could that be the issue? Here's the session info:
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Mojave 10.14.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] forcats_0.5.1 stringr_1.4.0 dplyr_1.0.9 purrr_0.3.4 readr_2.1.2
[6] tidyr_1.2.0 tibble_3.1.7 ggplot2_3.3.6 tidyverse_1.3.1 worldfootballR_0.5.6
loaded via a namespace (and not attached):
[1] cellranger_1.1.0 pillar_1.7.0 compiler_4.1.2 dbplyr_2.1.1 tools_4.1.2 gtable_0.3.0
[7] lubridate_1.8.0 jsonlite_1.8.0 lifecycle_1.0.1 pkgconfig_2.0.3 rlang_1.0.2 reprex_2.0.1
[13] rstudioapi_0.13 DBI_1.1.2 cli_3.3.0 curl_4.3.2 haven_2.5.0 withr_2.5.0
[19] httr_1.4.3 janitor_2.1.0 xml2_1.3.3 fs_1.5.2 generics_0.1.2 vctrs_0.4.1
[25] hms_1.1.1 grid_4.1.2 tidyselect_1.1.2 snakecase_0.11.0 glue_1.6.2 R6_2.5.1
[31] fansi_1.0.3 readxl_1.4.0 modelr_0.1.8 tzdb_0.3.0 magrittr_2.0.3 scales_1.2.0
[37] backports_1.4.1 ellipsis_0.3.2 assertthat_0.2.1 rvest_1.0.2 colorspace_2.0-3 utf8_1.2.2
[43] stringi_1.7.6 munsell_0.5.0 broom_0.7.12 crayon_1.5.1
Apologies for continuing to use up your time here, but this whole thing is odd. I've used this very package before with no issues whatsoever.
Hello, I am trying to use the data and in the .rmd file it stops in the first line which is
match_urls<- worldfootballR::get_match_urls(country = "ENG", gender = "M", season_end_year = c(2021:2022))
When I tried it in the console R local environment though it was alright.
The reason I am writing this here is because I noticed we had a similar error message, mine is in the screenshot below. If you have any idea what the problem is it would be very helpful.
Hello, I am trying to use the data and in the .rmd file it stops in the first line which is
match_urls<- worldfootballR::get_match_urls(country = "ENG", gender = "M", season_end_year = c(2021:2022))
When I tried it in the console R local environment though it was alright.
The reason I am writing this here is because I noticed we had a similar error message, mine is in the screenshot below. If you have any idea what the problem is it would be very helpful.
Hi, As defined in a google search,
The HTTP 403 Forbidden response status code indicates that the server understands the request but refuses to authorize it.
It would appear you have been blocked from accessing their servers for being in violation of their terms (see here: https://www.sports-reference.com/bot-traffic.html).
I think if you give it some time, you'll be allowed to scrape again. Remember to be mindful and ensure your time_pause number is set sufficiently high in all FBref functions.
Okay, so I have removed/reinstalled the package, restarted R, waited over a day, and tried a variety of functions. None of which seem to work (scream). The errors that were returned before from match data functions have remained the same, while the team/season pages throw back a different one:
pls_help_me <- fb_player_urls("https://fbref.com/en/squads/fd962109/Fulham-Stats") Error in open.connection(x, "rb") : SSL certificate problem: certificate has expired
I also seem to keep getting the 'echos' of warning messages past, even when I am doing something completely different.
Warning message: In .Internal(gc(verbose, reset, full)) : closing unused connection 3 (https://fbref.com/en/squads/fd962109/Fulham-Stats)
I really suspect that it has something to do with the package (or at least my implementation of it) because I recall that when I scraped data from FBRef's pages too quickly, I was locked out of the site even in my browser (or the internet at my old place was just that bad).
I'm at wits end here. I used
remove.packages()
to uninstallworldfootballR
, reinstalled it usingdevtools
, then did the same again with CRAN when that didn't work. Could that be the issue? Here's the session info:R version 4.1.2 (2021-11-01) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Mojave 10.14.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] forcats_0.5.1 stringr_1.4.0 dplyr_1.0.9 purrr_0.3.4 readr_2.1.2 [6] tidyr_1.2.0 tibble_3.1.7 ggplot2_3.3.6 tidyverse_1.3.1 worldfootballR_0.5.6 loaded via a namespace (and not attached): [1] cellranger_1.1.0 pillar_1.7.0 compiler_4.1.2 dbplyr_2.1.1 tools_4.1.2 gtable_0.3.0 [7] lubridate_1.8.0 jsonlite_1.8.0 lifecycle_1.0.1 pkgconfig_2.0.3 rlang_1.0.2 reprex_2.0.1 [13] rstudioapi_0.13 DBI_1.1.2 cli_3.3.0 curl_4.3.2 haven_2.5.0 withr_2.5.0 [19] httr_1.4.3 janitor_2.1.0 xml2_1.3.3 fs_1.5.2 generics_0.1.2 vctrs_0.4.1 [25] hms_1.1.1 grid_4.1.2 tidyselect_1.1.2 snakecase_0.11.0 glue_1.6.2 R6_2.5.1 [31] fansi_1.0.3 readxl_1.4.0 modelr_0.1.8 tzdb_0.3.0 magrittr_2.0.3 scales_1.2.0 [37] backports_1.4.1 ellipsis_0.3.2 assertthat_0.2.1 rvest_1.0.2 colorspace_2.0-3 utf8_1.2.2 [43] stringi_1.7.6 munsell_0.5.0 broom_0.7.12 crayon_1.5.1
Apologies for continuing to use up your time here, but this whole thing is odd. I've used this very package before with no issues whatsoever.
Interesting. I think this closed issue might give you some clues - typically caused by an old OS... https://github.com/JaseZiv/worldfootballR/issues/83
Hello again,
~~ Do you know if the blocking period is extended if you try to get data whilst it is still active (since it's been almost 3 days for me)? Is it possible to be blocked on R, but still able to access pages on the browser and through Python (as I am currently)?
If the answer to the first question is false, then "a half day and then have access returned after a modest period of time" may mean quite a while. ~~
[Edit] Thanks also for the reply to my other comment, just saw it.
Just saw your comment. I am also running Mojave. It will be a task and a half to update this thing due to limited space, but I'll see what happens and let y'all know if things change.
Hello again,
~~ Do you know if the blocking period is extended if you try to get data whilst it is still active (since it's been almost 3 days for me)? Is it possible to be blocked on R, but still able to access pages on the browser and through Python (as I am currently)?
If the answer to the first question is false, then "a half day and then have access returned after a modest period of time" may mean quite a while. ~~
[Edit] Thanks also for the reply to my other comment, just saw it.
Great questions... not sure about the answer to Q1. As for Q2, absolutely possible as the headers will be different so will think its a different requestor
Quick update: I was able to update my OS to Monterey and the problem was solved. It indeed appears that the issue was that I was running it on Mojave. I was having so much fun I forgot to update this! 😅 Thanks for the advice and support!
Hi! I'm trying to pull the match summary of specific games to determine whether goals were scored in regular or extra time. The match in question is clearly a valid URL and has a summary, but when I try to run it, I see this response. Perhaps I am missing something, but just in case, here is what I did:
Full disclosure, the above was run in the RStudio console and not sourced. I updated the package to 0.5.6 after the first time this error popped up, and since that version has the 3 second delay built in, I am hoping I have not been blocked by the website (though I doubt this as I am still able to access the page via my web browser). Below is my session info.
This is also my first time making an writing about an issue on Github. I hope I did well.