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

Syver Enstad syver-en+usenet at online.no
Fri May 24 19:28:21 EDT 2002


Giulio Cespuglio <giulio.agostini.remove.this at libero.it> writes:

> Hi there,
> 
> 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.
> In other words, the pages I need to access are not accessible from a
> standard URL.
> The other part of the problem is of course parsing the resulting HTML
> and extracting the pieces of info I need.
> 
> Does Python provide libraries that could help me? Could you please
> give me some keywords/pointers? 

Check out urllib for posting forms to a web server, the re module or
htmllib for parsing, and the cgi module for spewing it all back out on
the web again. There are lots of other alternatives, but these are the
most basic that I can think of. You may also need various utilities
like urlencode (can't remember the module name, use pydoc to find it).

>I'm completely new to Python.
> I would of course set up my web server under windows (Apache?) and the
> 
> necessary plugin.
> 
> Can you think of a better way of doing this? Another scripting
> language perhaps?

In my view, this should be a suitable job for Python.

-- 

Vennlig hilsen 

Syver Enstad



More information about the Python-list mailing list