[newbie] Is Python what I'm looking for?

John J. Lee jjl at pobox.com
Sat May 25 13:59:00 EDT 2002


On Fri, 24 May 2002, Giulio Cespuglio wrote:
[...]
> My aim is to automatically get specific pieces of information from a
> website, simulating the behaviour of a user filling in HTML forms and
> clicking buttons (a web robot?), then embed them in my HTML page.
[...]
> Does Python provide libraries that could help me? Could you please
> give me some keywords/pointers? I'm completely new to Python.

You don't state whether or not you've done any programming before.  If you
have, I would say you're better off with Python.  If not, though Python is
a far saner language than Perl and takes much less time to learn to use
well, Perl has the advantage of a very mature web client library,
libwww-perl.  If you have no programming experience and want to get the
job done and never write another program again, you may prefer Perl for
this specific task.  Otherwise, IMO, use Python.

If you need cookies (in Python), you'll probably find this useful:

http://wwwsearch.sourceforge.net/ClientCookie

For forms, I don't know of any library to make it trivial, but of course
you can just use urllib, or better, urllib2.  There is a crummy form
parser and a form-filler buried in this tarball (in _Util.py -- for usage
see _WoSSearch.py):

http://wwwsearch.sourceforge.net/wos/WoSSearch.tar.gz

but it *is* a mess ATM.

HTH


John




More information about the Python-list mailing list