Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Python save webpage
# save-webpage.py
import urllib2
url = 'http://www.oldbaileyonline.org/print.jsp?div=t17800628-33'
response = urllib2.urlopen(url)
webContent = response.read()
f = open('obo-t17800628-33.html', 'w')
f.write(webContent)
f.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.