Obtaining Webpage Source with Python

Paul Rubin http
Thu Jun 24 01:11:52 EDT 2004


ryan at ryankaskel.com (Ryan Kaskel) writes:
> Something like:
> 
> pyPage = open('http://www.python.org/index.html',r).read()
> 
> Obviously that won't work but how can I do something to that effect?

import urllib
pyPage = urllib.urlopen('http://www.python.org/index.html',r).read()



More information about the Python-list mailing list