Python get headers with requests
>>> import requests
>>> response = requests.head('http://example.com')
>>> response.headers
{'connection': 'close',
'content-encoding': 'gzip',
'content-length': '606',
'content-type': 'text/html; charset=UTF-8',
'date': 'Fri, 11 Jan 2013 02:32:34 GMT',
'last-modified': 'Fri, 04 Jan 2013 01:17:22 GMT',
'server': 'Apache/2.2.3 (CentOS)',
'vary': 'Accept-Encoding'}