running a browser from the command line...

Anthony E. Greene agreene at pobox.com
Wed Jun 9 03:14:48 UTC 2004


On 08-Jun-2004/16:37 -0700, bruce <bedouglas at earthlink.net> wrote:
>simple...
>
>as i initially stated... i'm curious as to whether anyone has managed to
>"drive" a browser from the command line. basically, i'm interested in
>possibly parsing some sites, and i'd like to be able to do something like:
>
>/tmp/brower "www.foo.com" > outputfile
>
>i'd like to be able to specify the site/page for the browser, with the
>browser then returnning the results for the given page...
>
>i've already been using libwww/mechanize.. it's my understanding that
>wget/curl aren't significantly better. so i'm searching for a browser app
>that can be used at the command level...
>
>i don't need the display/rendering function, just the ability to accurately
>return the page text.

  lynx -dump $url > file.txt

The HTML is stripped out and you get a text rendering of the page.

Tony
-- 
Anthony E. Greene <mailto:Anthony%20E.%20Greene%20%3Cagreene at pobox.com%3E>
AOL/Yahoo Messenger: TonyG05    HomePage: <http://www.pobox.com/~agreene/>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
Linux. The choice of a GNU generation <http://www.linux.org/>





More information about the redhat-list mailing list