Current version is 0.5.
It requires S-XML and TRIVIAL-HTTP.
Tested on SBCL, Clisp, and ACL 6.2, on RH9/x86.
Author: Martin Elster Download ASDF package from http://folk.uio.no/melster/cl-yahoo-latest.tar.gz
-- the link is broken 2007-11-22
Examples:
Searching the web for Lisp, returning 2 results starting at result number 3:
This query returns a list of objects, each representing the results of the search. To see the "summary" field of the first response from yahoo, use the following:
Searching for a lisp jpg image;
Checking spelling:
Finding the phone number of three pizza joints in zip code 94306:
Term extraction:
See README file for more details and examples, or the CHANGES.
I'm using SBCL 1.0.2 on Ubuntu Edgy and ran into problems getting Web search to work:
I tried to email the author, but the email bounced.
-- 2007.03.04, Marc Abramowitz (http://marc.abramowitz.info, msabramo at yahoo dot com)
I'm getting the same problem in Allegro Lisp 8.0. It looks like Yahoo doesn't like something about the HTTP request, but I can't figure out what.
-- 2007.06.08, Mike Travers This page is linked from: web API CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively
(ysearch :web :query "lisp" :type 'any :results 2 :start 3)
CL-USER> (summary (first (ysearch :web :query "lisp" :type 'any :results 2 :start 3 :adult-ok 1)))
"... The benefits of Common Lisp and CLISP. why is ANSI Common Lisp such a great programming environment? ..."
CL-USER>
(ysearch :image :query "lisp" :format 'jpg)
CL-USER> (ysearch :spelling :query "improbabble")
improbable
CL-USER>
CL-USER> (mapcar #'phone (ysearch :local :query "pizza" :results 3 :zip 94306))
("(650) 494-2928" "(650) 424-9400" "(650) 326-6552")
CL-USER>
CL-USER> (yahoo:ysearch :term-extraction :context "Italian sculptors and painters of the renaissance favored the Virgin Mary for inspiration." :query "madonna")
("italian sculptors" "virgin mary" "painters" "renaissance" "inspiration")
CL-USER>
CL-USER> (asdf:oos 'asdf:load-op :cl-yahoo)
NIL
CL-USER> (use-package :cl-yahoo)
T
CL-USER> (ysearch :web :query "lisp" :type 'any :results 2)
XML parser encountered eof before end of entity.
[Condition of type S-XML:XML-PARSER-ERROR]
Restarts:
0: [ABORT] Return to SLIME's top level.
1: [TERMINATE-THREAD] Terminate this thread (#
Since upstream seems to have died, you can get the source from a Gentoo project mirror: ftp://ibiblio.org/pub/linux/distributions/gentoo/distfiles/cl-yahoo-0.5.tar.gz