lundi 22 février 2016

R - How can I run javascript button on website to display all values for scraping

I am trying to scrape some data on a site that shows products 1-30 unless I press "List all" button. This button is JavaScript and doesn't change the URL when I run it. I am currently using the rvest package in R to do this.

  page <- paste("http://ift.tt/1SNaEaG")
  page <- read_html(page)

I have looked at some other posts and it mentions using RSelenium package but I'd prefer if there was another way.

Aucun commentaire:

Enregistrer un commentaire