Obtaining Webpage Source with Python

Phil Frost indigo at bitglue.com
Fri Jun 25 00:37:54 CEST 2004


Take a look at the urllib module:

http://python.org/doc/2.3.3/lib/module-urllib.html

On Wed, Jun 23, 2004 at 10:03:04PM -0700, Ryan Kaskel wrote:
> How can I obtain the source of a remote webpage (e.g.
> http://www.python.org/index.html) using Python?
> 
> 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?
> Thanks,
> Ryan Kaskel
> 
> --I posed this before but it seems it is not showing up...




More information about the Python-list mailing list