Hi guys,
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 <- "Morningstar.dk | Seneste NAV | Danske fonde | Udenlandske fonde | Hedgefonde | ETFs | Aktier | Sammenlign fonde"
webpage <- read_html(url)
A <- html_nodes(webpage, xpath='//*[@id="ctl00_ctl00_MainContent_Layout_1MainContent_gridResult"]')
AA <- html_table(A)
AA
I can not apply the same code to the page below:
If i try to scrape the table with the above code, i get:
list()
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
Patrick Larsen