简体   繁体   中英

Do I need to use RSelenium to download these PDFs?

I am trying to use rvest and pdftools to go through this page and download the PDFs. I'm having trouble using CSS selector to do this, and wondering if this might take a webdriver?

Also, is it easy enough to use a webdriver to do this in R - as a bit of a beginner R user?

The solution could be download.file() function.

Suppose that we have detected all files links and we have a list.

url <- "https://northernbrucepeninsula.civicweb.net/filepro/documents/?preview=56705"

download.file(url, destfile, quiet = TRUE)

url = the link of the file that you want to donwload.

destfile = a character string (or vector, see url) with the name where the downloaded file is saved. Tilde-expansion is performed.

quiet = If TRUE, suppress status messages (if any), and the progress bar.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM