On Thu, Feb 25, 2021 at 03:50:32PM +0300, IL Ka wrote:
> >
> >
> > I would like to pipe search results to a text processor.
> >
> Do you want rendered results or plain HTML ?
> In latter case you need ``wget``

To expand on that, perhaps

  wget -O - <your URL here> | html2text

tries to make sense of the html (which isn't always possible) and
output some text version of it. The "-O -" tells wget to send its
output to stdout (instead of to a file).

You get html2text from the like-named package, html2text.

For duckduckgo, you'll get better results by using its non-Javascript
URL:

  https://html.duckduckgo.com/html?q=<your query string here>

(Duckduckgo will try to redirect your wget to that, but according to
some scant testing by me, it doesn't seem to work).

Cheers
 - t

Attachment: signature.asc
Description: Digital signature

Reply via email to