scraping_games_acb_old {BAwiR}R Documentation

Old ACB player game finder data


This function allowed us to get all the player game finder data for all the desired ACB seasons available from: It was an old version that worked before the internal structure of the ACB website changed. The updated function is now scraping_games_acb.


scraping_games_acb_old(type_league, nums, year, verbose = TRUE, 
                       accents = FALSE, r_user = "")



String. If competition is ACB, to scrape ACB league games ("ACB"), Copa del Rey games ("CREY") or Supercopa games ("SCOPA").


Numbers corresponding to the website to scrape.


Season, e.g. 2017-2018.


Should R report information on progress? Default TRUE.


Should we keep the Spanish accents? The recommended option is to remove them, so default FALSE.


Email to identify the user when doing web scraping. This is a polite way to do web scraping and to certify that the user is working as transparently as possible with a research purpose.


The official website of the Spanish basketball league ACB used to present the statistics of each game in a php website, such as:

In some cases, didn't exist, so for these cases is where we can use the httr package.


A data frame with the player game finder data.


In addition to use the email address to stay identifiable, the function also contains two headers regarding the R platform and version used.

Furthermore, even though in the robots.txt file at, there is no information about scraping limitations and all robots are allowed to have complete access, the function also includes the command Sys.sleep(2) to pause between requests for 2 seconds. In this way, we don't bother the server with multiple requests and we do carry out a friendly scraping.


Guillermo Vinue

See Also



## Not run: 
# Not needed to scrape every time the package is checked, built and installed.
df1 <- scraping_games_acb_old(type_league = "ACB", nums = 62001:62002, year = "2017-2018",
                              verbose = TRUE, accents = FALSE, 
                              r_user = "")

## End(Not run)                           

[Package BAwiR version 1.3.2 Index]