Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Web scraping using rvest and Rselenium

$
0
0

@davide855 wrote:

Hi Guys i’m wondering if it’s possible to scrape this website
https://servizi.ivass.it/RuirPubblica.
the url never change and it uses javascript to load contents so i decided to use RSelenium in order to take alle the elements i need.
i started doing this:
library(RSelenium)
remDr <- remoteDriver()
remDr$open()
agenziaIvass <- vector(mode = “character”)
remDr$navigate(“https://servizi.ivass.it/RuirPubblica/”)
click <- remDr$findElement(using = “css selector”,"#FormSearch\:j_id_jsp_558348152_13\:1")
click$clickElement()
click2 <- remDr$findElement(using = “css selector”,"#FormSearch\:j_id_jsp_558348152_16\:1")
click2$clickElement()
click3 <- remDr$findElement(using = “css selector”,"#FormSearch\:SecA")
click3$clickElement()
click4 <- remDr$findElement(using = “css selector”,"#FormSearch\:SecD")
click4$clickElement()
ricerca <- remDr$findElement(using = “css selector”,"#FormSearch\:SearchButton")
ricerca$clickElement()

this works and take me to the correct page where i have to be. I got stuck at this point. i need a way to iterate through all the result and take the string.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles