Created
March 7, 2009 07:08
-
-
Save wfarr/75257 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun yql-yahoo-search (query) | |
| (let ((result (yql-filter 'result | |
| (yql-select "title,abstract,url" "search.web" | |
| (concat (format "query=\"%s\"" query) | |
| "LIMIT 5"))))) | |
| (save-excursion | |
| (set-buffer (get-buffer-create "*Search Results*")) | |
| (dolist (item result) | |
| (let ((title (yql-filter 'title item)) | |
| (abstract (yql-filter 'abstract item)) | |
| (url (yql-filter 'url item))) | |
| (insert (concat title "\n " abstract "\n " url "\n")))) | |
| (goto-address) | |
| (switch-to-buffer-other-window "*Search Results*")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment