Mechanize - save to XML or CSV

Simon Brunning simon at brunningonline.net
Mon Aug 2 09:41:20 EDT 2010


On 2 August 2010 14:13, flebber <flebber.crue at gmail.com> wrote:
> HI guys and gals this is probably a simple question but I can't find
> the answer directly in the docs for python mechanize.
>
> http://pypi.python.org/pypi/mechanize/
>
> Is it possible to retrieve and save a web page data as xml or a csv
> file?

Sure, but mechanize only does the first half of the job. You retrieve
the data using mechanize, then use another module for the save-as bit.
ElementTree for XML and csv for, um, for csv are both in the standard
library.

-- 
Cheers,
Simon B.



More information about the Python-list mailing list