[Surfraw-devel] How to use surfraw with curl
David Niklas
doark at mail.com
Thu Aug 11 21:13:21 UTC 2016
On Wed, 10 Aug 2016 17:47:36 -0700
Kyle Isom <kyle at imap.cc> wrote:
<imitate_illegal_top_post>
This works for me with two exceptions.
BTW: sr 2.2.9-r1
1. PATH (in fact the entire env), is not considered by the sr program so
I had to use an absolute path.
2. The equals sign HAD to be there.
It seems that sr is REALLY picky about it's arguments.
Thanks,
David
> Hello David,
>
> I did some tests, and it looks like the args aren't being passed. I
> created a curl wrapper
>
> printf '#!/bin/sh\n\ncurl -vL "$@"' | tee $HOME/bin/vcurl
> chmod +x $_
> sr -browser vcurl -s duckduckgo trump
>
> and I was able to get the actual HTML.
>
> Cheers,
> Kyle
>
>
> On 16/08/09 at 11:21, David Niklas wrote:
> > Hello,
> > I entered this (as a test):
> > % sr -browser="curl -L " -s duckduckgo trump
> >
> > And got this:
> > <html>
> > <head><title>301 Moved Permanently</title></head>
> > <body bgcolor="white">
> > <center><h1>301 Moved Permanently</h1></center>
> > <hr><center>nginx</center>
> > </body>
> > </html>
> >
> > Now, I expected to get results as an html page
> > to stdout.
> > What do I do?
> > I tried increasing curl verbosity curl -vLD -
> > to no avail.
> >
> > Thanks,
> > David
> >
More information about the Surfraw-devel
mailing list