Python equivalent of "lynx -dump"?

Dowe Keller dowe at onemain.com
Thu Mar 30 07:03:32 CEST 2000


On Mon, 27 Mar 2000, you wrote:
>I'm looking for a functional equivalent of the "-dump" option to the
>lynx web-browser in Python.  "-dump" dumps the formatted output of an
>HTML document.
>
>Right now I have a python program that captures the output of a
>webpage and prints it like so:
>
>        lynxcmd = "lynx -dump %s" %url
>        data = os.popen(lynxcmd).read()
>        print data
>
>I would like to do this entirely within python instead of relying on
>lynx to make the program more portable.
>
>How can I capture only the formatted output of an HTML page within
>Python?

Actually, If you just want system portability, you could stick with
lynx.  There's a version of lynx  for just about every
OS/Architecture out there.

--
Dowe Keller	dowe at onemain.com	http://dowe.50meg.com
---
-----BEGIN GEEK CODE BLOCK----
GSC d? s: a C++++ L * U++>++++ P++ L+++>++++ E- W++ N++ K++ w--- M- PS+++ PE++ Y+ PGP t+ 5+ X+ R tv b++++ DI+ D+ G e+>++ h++ r@ y+ 
-----END GEEK CODE BLOCK-----




More information about the Python-list mailing list