Download pdfs from different site queries

Asked

Viewed 76 times

1

I would like to download pdfs of different queries from the following site

website to download the data

However as the link does not change with each new query of municipality, I do not know how to download in scale to several municipalities, because the package curl requires input from the download link and if it does not change with each query, I cannot download in scale.

I tried to do it this way

download.file("https://cadprev.previdencia.gov.br/Cadprev/faces/pages/modulos/dair/consultarDemonstrativos.xhtml", destfile = "C:/Users/holiveira/Desktop")

but I couldn’t download, and I can’t create a mechanism to scale.

I would like to have a vector with several names of municipalities and to make the automated download the pdf files of all

  • The link does not change but the parameter viewstate changes, just pass it in the post request.

  • I’m sorry for the lack of knowledge, could you please detail, I don’t know this parameter

  • Update your question with how you are doing that I show you how you need to do, your question has little information.

  • updated, thanks for availability

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.