Skip to content

Instantly share code, notes, and snippets.

@acrymble
Created June 30, 2011 10:44
Show Gist options
  • Save acrymble/1055995 to your computer and use it in GitHub Desktop.
Save acrymble/1055995 to your computer and use it in GitHub Desktop.
Python open a webpage
# open-webpage.py
import urllib2
url = 'http://www.oldbaileyonline.org/print.jsp?div=t17800628-33'
response = urllib2.urlopen(url)
webContent = response.read()
print webContent[0:300]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment