I am downloading a file using HTTP Get request. When doing this on the browser, it takes few seconds for a file to generate and the response header contains: Content-Disposition: inline;filename="file.zip"
My python code downloads the file using:
response = opener.open(api_url,timeout=20)
content = response.read()
with open("file.zip","w") as fp:
fp.write(content)
However the file.zip I have locally ends up being a corrupted file. Am I missing something?