I\'m trying to use rvest
to download a list of files from this site. The file names are regular, but the download URLs don\'t match a pattern (just dozens of digits
How about using map2
from purrr
to combine two vectors all
and html_attr(html_nodes(doc, "a"), "href")
and then filter according to file type names
url <- "http://www-air.larc.nasa.gov/cgi-bin/ArcView/actamerica.2016?C130=1"
doc <- read_html(url)
all <- html_text(html_nodes(doc, "td a"))
href <- html_attr(html_nodes(doc, "a"), "href")
z <- purrr::map2(all, href, function(x, y) data.frame(x, y))
z <- do.call(rbind, z)
filetype <- "PICARRO"
z[grep(filetype, z[,1]),]