Skip to content

Instantly share code, notes, and snippets.

@jldupont
Created January 27, 2012 21:46
Show Gist options
  • Save jldupont/1691098 to your computer and use it in GitHub Desktop.
Save jldupont/1691098 to your computer and use it in GitHub Desktop.
urllib2: fetch web page & return headers
import urllib2
response=urllib2.urlopen(page)
data=response.read()
headers=response.info().items()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment