I need to download an attribute in json that has a url of a pdf and I need to download it, but I try to convert it but the body of the pdf generates it as html
THE FILE JSON : "bulletins": [ { "name": "Boletín mensual Julio 2021", "type": "Mensuales", "update": "2021-08-31 20:35", "file": "https://saeadmin.sgc.gov.co/media/bulletin/Boletin_Informativo_No_0139_julio_2021_hq7KSVs.pdf" }, ]
For simple download cases the system may have several means to download a file, Most desktop systems including windows 10 have the curl command. Thus for this usage write a small script snippet without any header request for the json data
Invoke in the relative OS method the single line curl -O URL
curl -O https://saeadmin.sgc.gov.co/media/bulletin/Boletin_Informativo_No_0139_julio_2021_hq7KSVs.pdf
That will automatically download the URL as a file which if you wish, and system supports it, you run that as a command to open in the viewer, just as if you had placed the source URL address into the browser.