Python: Get HTTP headers from urllib2.urlopen call?
Use the response.info() method to get the headers. From the urllib2 docs: urllib2.urlopen(url[, data][, timeout]) … This function returns a file-like object with two additional methods: geturl() — return the URL of the resource retrieved, commonly used to determine if a redirect was followed info() — return the meta-information of the page, such as headers, … Read more