0

I am trying to scrape data table from following website using R, but it is not returning any value. I am using SelectorGadget to get the nodes detail.

library(rvest)
url = "http://www.bursamalaysia.com/market/derivatives/prices/"

text <- read_html(url) %>% 
html_nodes("td") %>% 
html_text()

output:

text
character(0)

I would appreciate any kind of help. Thank you!

honey
  • 89
  • 2
  • 8
  • Where is the code that uses SelectorGadget? – IRTFM May 17 '17 at 16:32
  • are you sure there are any "td" nodes? – Phi May 17 '17 at 16:51
  • It looks like the page is dynamiclly created with javascript. There is some information stored here: http://www.bursamalaysia.com/searchbox_data.json?_=1495066355942 . Most likely not the information you are looking for – Dave2e May 18 '17 at 00:33
  • @42 In `rvest` tutorial it's mention that CSS selectors are used to select elements based on properties. In `html_nodes("td")` , "td", I am getting using SelectorGadget. – honey May 18 '17 at 03:07
  • @Phi, "td" I am getting using SelectorGadget. I might be wrong here. Please guide. – honey May 18 '17 at 03:08
  • @Dave2e, That means, it's not easy to pull data from this website. Excuse me for dumb question. – honey May 18 '17 at 03:10
  • Yes, it is not straight forward to pull from this website. Take a look at the RSelenium package. That might help – Dave2e May 19 '17 at 02:51
  • try this https://stackoverflow.com/questions/24723606/scrape-password-protected-website-in-r?noredirect=1&lq=1 – Ajay Ohri May 30 '17 at 04:17

0 Answers0