So guys, I have this file thay I need to download using python, and this is my code
import requests
url = "http://servicos.ibama.gov.br/ctf/publico/areasembargadas/downloadListaAreasEmbargadas.php"
response = requests.get(url)
url = open("test.zip", "wb+")
url.write(response.content)
url.close()
if you click into the link you'll see that it is a zipped file, that's why i put the .zip extension, it downloads the file but it is a file that can't be opened, I have a feeling that I am doing something wrong.
Also I tryied to change it to .txt so I could see the content of what it was downloading and I saw that it saves only the HTML code of the page that redirects me to the downloading URL, quite frankly I am as lost as one can be