Any web automation modules?
Skip Montanaro
skip at mojam.com
Fri Dec 10 11:31:20 EST 1999
John> Is there any modules for getting web pages? Lynx has a simple
John> switch but I do not know how to send user and passwords. I am a
John> complete newbie to python.
You can use urllib to fetch individual pages like:
import urllib
f = urllib.urlopen("http://www.python.org/")
page = f.read()
f.close()
If you need to transfer an entire group of pages, check out websucker.py in
the Python distribution tree at Tools/webchecker/websucker.py.
Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/
847-971-7098 | Python: Programming the way Guido indented...
More information about the Python-list
mailing list