utilizzando il seguente documentation ho cercato di raschiare una serie di tabelle da marketwatch.comCome raschiare una tabella con rvest e xpath?
qui è quella rappresentata dal codice sotto:
Il collegamento e XPath sono già inclusi nel codice:
url <- "http://www.marketwatch.com/investing/stock/IRS/profile"
valuation <- url %>%
html() %>%
html_nodes(xpath='//*[@id="maincontent"]/div[2]/div[1]') %>%
html_table()
valuation <- valuation[[1]]
ottengo il seguente errore:
Warning message:
'html' is deprecated.
Use 'read_html' instead.
See help("Deprecated")
Grazie in anticipo.
rimuovere 'html()' e sostituire con 'read_html()' – cory
che non è un errore, è un avvertimento. il tuo codice verrà comunque eseguito con questo avviso. – SymbolixAU
grazie. fisso. –