if (FALSE) {
input <- c(".central-textlogo__image",".central-textlogo__image")
scrape_fun <- function(x){
input_i <- x
remDr$navigate("https://www.wikipedia.org/")
element <- remDr$findElement(using = "css", input_i)
element <- element$getElementText()
return(element)
}
parsel_out <- parscrape(scrape_fun = scrape_fun,
scrape_input = input,
cores = 2,
packages = c("RSelenium"),
browser = "firefox",
scrape_tries = 1,
chunk_size = 2,
extraCapabilities = list(
"moz:firefoxOptions" = list(args = list('--headless'))
)
)
}
Run the code above in your browser using DataLab