I am trying python function to download zip file https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.69/win32/chromedriver_win32.zip I tried this and the file is downloaded but damaged not complete
import osimport requestsheaders = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36'}url = 'https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.69/win32/chromedriver_win32.zip'request = requests.get(url, stream=True, headers=headers)zip_filename = os.path.basename(url)with open(zip_filename, 'wb') as zfile: zfile.write(request.content)