this is the code im using to download a pdf file , ijust don't know how to specify or name the downloaded file.... thanks in advance
rD <- rsDriver(browser="firefox", port=4445L,verbose = F)
remDr <- rD[["client"]]
ffd <- rD$client
url1 <- 'http://www.bvmt.com.tn/fr/entreprises/list'
ffd$navigate(url1)
elements1 <- ffd$findElements("id", "pano-societe")
elements1[[1]]$clickElement()
webElem1 <- ffd$findElement("css selector", "li.tt2:nth-child(14) > a:nth-child(1)")
webElem1$clickElement()
elements2 <- ffd$findElements("class", "savoir-plus-actu")
elements2[[1]]$clickElement()
page3<-ffd$getCurrentUrl()
page<-read_html(page3[[1]])
raw_list<- page %>%
html_nodes("a") %>%
html_attr("href") %>%
str_subset("\.pdf") %>%
walk2(., basename(.), download.file, mode = "wb")