2013-04-11 01:07:29 -07:00
|
|
|
#!/usr/bin/txr -f
|
|
|
|
|
@(next :args)
|
|
|
|
|
@(cases)
|
|
|
|
|
@ QUERY
|
|
|
|
|
@ PAGE
|
|
|
|
|
@(or)
|
|
|
|
|
@ (throw error "specify query and page# (from zero)")
|
|
|
|
|
@(end)
|
2016-12-05 22:15:40 +01:00
|
|
|
@(next (open-command "!wget -O - http://search.yahoo.com/search?p=@QUERY\&b=@{PAGE}1 2> /dev/null"))
|
2013-04-11 01:07:29 -07:00
|
|
|
@(all)
|
|
|
|
|
@ (coll)<a class="yschttl spt" href="@URL" @/[^>]+/>@TITLE</a>@(end)
|
|
|
|
|
@(and)
|
|
|
|
|
@ (coll)<div class="@/abstr|sm-abs/">@ABSTR</div>@(end)
|
|
|
|
|
@(end)
|
|
|
|
|
@(output)
|
|
|
|
|
@ (repeat)
|
|
|
|
|
TITLE: @TITLE
|
|
|
|
|
URL: @URL
|
|
|
|
|
TEXT: @ABSTR
|
|
|
|
|
---
|
|
|
|
|
@ (end)
|
|
|
|
|
@(end)
|