Functionality similar to PHP's SimpleXML?
Stefan Behnel
stefan_ml at behnel.de
Fri Jun 13 08:13:42 EDT 2008
Phillip B Oldham wrote:
> I'm going to throw together a quick project over the weekend: a
> spider. I want to scan a website for certain elements.
>
> I come from a PHP background, so normally I'd:
> - throw together a quick REST script to handle http request/responses
Use the urllib/urllib2 module in the stdlib for GET/POST with parameters or
lxml for simple page requests.
> - load the pages into a simplexml object and
> - run an xpath over the dom to find the nodes I need to test
Use lxml.
http://codespeak.net/lxml/
Stefan
More information about the Python-list
mailing list