Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,617 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How to download pdf file, which requires click botton?
Invoke-WebRequest -Uri “https://sbpcacervodigital.org.br/bitstream/20.500.11832/8353/1/BR_SPCMAIHSBPC_PUBLIC_JC_JC_431.pdf” -OutFile “D:\"
Hi Jose Antonio,
This script can help you:
$url = "https://sbpcacervodigital.org.br/bitstream/20.500.11832/8353/1/BR_SPCMAIHSBPC_PUBLIC_JC_JC_431.pdf"
$response = Invoke-WebRequest -Uri $url
$buttonElement = $response.Forms[0].Fields[“ButtonID”] # You need replace “ButtonID” with the name or ID of the button
$response = Invoke-WebRequest -Uri ($response.Forms[0].Action) -Method $response.Forms[0].Method -Body $buttonElement
$response.Content | Set-Content -Path "D:\" -Encoding Byte
Regards,