Skip to content

Instantly share code, notes, and snippets.

@dopuskh3
Created April 30, 2010 16:26
Show Gist options
  • Select an option

  • Save dopuskh3/385431 to your computer and use it in GitHub Desktop.

Select an option

Save dopuskh3/385431 to your computer and use it in GitHub Desktop.
import urllib2
def fetch_page(url):
opener = urllib2.build_opener()
request = urllib2.Request(url)
datafd = opener.open(request)
return datafd.read()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment