library(rvest) library(downloader) url <- ‘http://www.nipic.com/show/15419595.html‘ web <- read_html(url) link <- web %>% html_nodes("img") %>% html_attr("src") for(i in 1:length(link)){ download(link[i],paste("D://picture",i,".jpg",sep = ""), mode = "wb") }
网页:
下载的图片:
本文链接:http://www.cnblogs.com/homewch/p/5840592.html
时间: 2024-09-30 19:41:41