I recently started using the "rvest" and "xml2" package to scrape some data off the internet. However, i run into some trouble:
I can easily pull data in the "table" format e.g. from the Morningstar webpage below (Where i got the xpath from copying directly the elements tab in Chrome):
url <- "http://www.morningstar.dk/dk/fundquickrankLegacy/default.aspx"
webpage <- read_html(url)
A <- html_nodes(webpage, xpath='//*[@id="ctl00_ctl00_MainContent_Layout_1MainContent_gridResult"]')
AA <- html_table(A)
I can not apply the same code to the page below:
If i try to scrape the table with the above code, i get:
I suspect that it is because of the format, but how do i pull data into a table from a page like that?
The best regards