I want to create a crawler that will scrape some data from Trip Advisor. Ideally, it will (a) identify the links to all locations to crawl, (b)
Basically, you can try to send a click event to the To expand all locations, you can possibly repeat the above logic in a while loop. Keep clicking on the I'm not fluent in remDr$navigate(tu)
div <- remDr$findElement("class", "morePopularCities")
div$clickElement()
div
no longer in the page) :
divs <- remDr$findElements("class", "morePopularCities")
while(length(divs )>0) {
for(div in divs ){
div$clickElement()
}
divs <- remDr$findElements("class", "morePopularCities")
}
R
, you may find my code example not pretty, feel free to suggest.