Mutuelinvestor
Mutuelinvestor

Reputation: 3538

Using rvest, is it possible to click a tab that activates a div and reveals new content for scraping

I'm new to rvest and I'm trying to determine if its possible to use rvest to click a tab that activates a div so that data can be scraped. I've been reading the rvest documentation on cran and have not read anything that talks about clicking links, buttons or tabs.

The site that I'm interested in scraping is: touch.tvg.com

From the home page I'd like to click the race button (Again, how do you clik buttons in rvest)

Next, I'd like to select an upcoming race. This should redirect me to the selected race's url. For example: The 10th race at Hoosier

Once one the race page, I'd like to click the Pool tab and scrape the pool information.

I've attached some screen shots below. Any suggestion, guidance is appreciated.

From Home Page - Click Races Button Home Page - Click Races

From Races Page - Click an upcoming Race Races Page - Click an upcoming race

From The Particular Race Page - Click The Pool Tab From the Race Page - Click the pool tab

With the Pool data (Div) visible - Scrape the Pool Data. With Pool data visible - Scrape Pool Data

Upvotes: 9

Views: 1328

Answers (1)

Mutuelinvestor
Mutuelinvestor

Reputation: 3538

RSelenium seems to offer all the functionality needed to harvest the data of interest. The best results might be achieved by combining the strength of rselenium with those of rvest.

Thank to everyone for their comments.

Upvotes: 3

Related Questions