I\'m trying to use the rvest package to scrape data from a web page. In a simple format, the html code looks like this:
This will work just fine with straight CSS selectors:
library(rvest) doc <- ' ' pg <- html(doc) html_attr(html_nodes(pg, "div > input:first-of-type"), "value") ## [1] "123"