python - urllib.urlopen returns an old page? -
so have simple html page (a dir listing) , try read urllib, way:
page = urllib.urlopen(corerepositoryurl).read()
the problem is, html read way older newest. info()
returns me this:
date: fri, 19 apr 2013 18:48:09 gmt server: apache/2.0.52 (fedora) content-type: text/html; charset=utf-8 connection: close age: 481084
and page last updated today (2013-04-25). component might 1 caches?
add header "cache-control" value "max-age=0" in request
import urllib2 req = urllib2.request(url) req.add_header('cache-control', 'max-age=0') resp = urllib2.urlopen(req) content = resp.read()
using header each cache along way revalidate cache entry