Skip to content

Instantly share code, notes, and snippets.

@wrunk
Created February 27, 2012 19:11
Show Gist options
  • Save wrunk/1926362 to your computer and use it in GitHub Desktop.
Save wrunk/1926362 to your computer and use it in GitHub Desktop.
Simple python web page get using urllib2
#! /usr/bin/env python
'''
Super dumb example of getting the contents of a web page.
'''
import urllib2
page_contents = urllib2.urlopen('http://www.python.org/').read()
print page_contents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment