0

I want to get PDF document sending POST request to following website:

https://ezkbd.osbd.ba:8443/

You can try it by choosing any item from drop down and enter some number (eg 1) in "Broj uloška". After clicking captcha and submit you can open or save pdf file. Let's say I have recaptcha key, how can I download pdf document using POST request? Here is my try:

url_captcha <- "https://ezkbd.osbd.ba:8443/"
parameters <- as.list(c("3", "3", captcha_key))
names(parameters) <- c("SearchKatastarskaOpstinaId", "SearchBrojUloska",  "g-recaptcha-response")

output <- httr::POST(
  url_captcha,  # url
  body = parameters, 
  encode = "form",
  verbose()
)
Mislav
  • 1,533
  • 16
  • 37

0 Answers0