Use Google Chrome from your R scripts using WebDriver for navigating to web pages, user input, JavaScript execution, and more.
You can crawl available CRAN packages using Selenium on Ubuntu (should work also in other Linux/Windows/Mac) with R by following this steps:
- Clone the project (change myproject to whatever your want)
git clone https://github.com/jrosell/chrome-rselenium myproject
cd myproject
-
Install Rstudio for R from https://rstudio.com/products/rstudio/
-
Run crawler-cran.R (~5h)
-
Check the results in the data folder (You can check 2023-03-15 results here)
You can crawl a website using selenium on Ubuntu (should work also in other Linux/Windows/Mac) with R by following this steps:
- Clone the project (change myproject to whatever your want)
git clone https://github.com/jrosell/chrome-rselenium myproject
cd myproject
-
Install Rstudio for R from https://rstudio.com/products/rstudio/
-
Edit crawler.R. Change next_url, include_path, exclude_path and max_crawls, chrome_version, save_intermediate_results and sleep_sample as required.
-
Run it and check the results in the data folder.
You can use selenium on Ubuntu (should work also in other Linux/Windows/Mac) with R by following this steps:
- Clone the project (change myproject to whatever your want)
git clone https://github.com/jrosell/chrome-rselenium myproject
cd myproject
-
Install Rstudio for R from https://rstudio.com/products/rstudio/
-
Place chromedriver file in your "User/Documents/R" folder If you need to update current chromedriver, download it from https://sites.google.com/a/chromium.org/chromedriver/downloads and extract it there.
-
Install devtools and RSelenium for Rstudio using r-crhomedriver.R
-
Run it
-
Have fun!
Copy r-crhomedriver.R script and edit your new scripts.
You can do pull resquests or open issues if you want to help.