Tuesday, 15 September 2015

python - urllib2.Request Keeps Downloading Cached File From Proxy -


I have found a Python 2.7 script which downloads a zip file from the public FTP site via our corporate proxy . The proxy is set in the system variables of my Windows server.

Downloading the file, except that I came to know that it is constantly downloading the same version of the file even if the file has been updated to the FTP site. It appears to be grabbing a proxy-cached version, not the current version on the web.

Here's the code to get the file:

  request = urllib.request (Download_url) response = urllib2.urlopen (requested) .read ()  

Instead of cached, how can I force the script to get the current file through a proxy?

Can you try something like URL? Foo = bar attached?


No comments:

Post a Comment