Thursday, July 05, 2007

A simple but useful application for Google Co-op On-the-fly Custom Search

My del.icio.us linkstream is a bit like a window into my stream of consciousness.

I've always wanted to be able to 'search outward' from just my delicious links ... a recent post from Alf about Google Co-op 'on-the-fly' search engines just triggered a simple but really useful idea; make a Google Co-op search of my delicious linkstream ... this way I can search just within pages I've deemed worthy of bookmarking.

After a bit of wrangling with the various ways of getting data out of delicious (see my own comments to this post), I found this script for generating an html page of links from delicious. This page contains all my delicious links, not just the most recent ones (it seems you can only get a subset of the most recent links without authenticating with delicious, hence the PHP script using the delicious API).

So, after hosting the PHP script revealing all my links, I can point the Google Co-op Custom Search Engine to that page, and search away ! It's a nice way of using search to 'retrace' my steps, since it should generally restrict results to the parts of the web I've already seen and rated as worthy of re-examination.

2 comments:

Unknown said...

This is the long version of how I got to the current solution, with the various hiccups and discoveries along the way.

All I wanted to do is point Google Co-op at an html page containing all my delicious links ever. The delicious docs helped out here. Using the delicious API interface for html output, I can try to get the page of links I want:

http://del.icio.us/html/pansapiens?count=100000

The count=100000 is an attempt to get delicious to return all my bookmarks ... but it doesn't work and only gives me 100 links. In addition to that limitation, even if I do use this URL with the Google Co-op 'on-the-fly' search, I get no results and an error "Yahoo! - 999 Unable to process request at this time -- error 999". That sucks ... not sure if it's a temporary outage, or some other conspiracy at play (like others have already done this and Google Co-op has been hammering delicious ?).

So, I need to find another way to fetch a simple page of all my delicious links with a single URL. There is a way I can get all posts with the delicious API, but it requires authentication over https. My testing suggests that Google Co-Op can't handle this, using the (probably insecure) URL: https://username:password@api.del.icio.us/v1/posts/all .

I tested out a few searches by simply pointing Google Co-op to a static page of my delicious links created with the delicious "export/backup" function, and it works nicely, but this solution would generally need to be manually updated (or left up to a curl/cron kludge, which requires a server to run it). Ultimately, I was forced to use the delicious API and the hosted PHP script to create and update the page of links I need to do this.

Unknown said...

Wow .. that was timely.

Via Deepaks blog ( http://mndoci.com/blog/ ) I discovered Lijit ( http://www.lijit.com ) which does something pretty much like the Google Co-op / delicious mashup I described in this post, but with more services (eg Flickr, Digg, Youtube etc). I've added a Lijit search box to this blog, and I'll probably use that more often than my home-rolled approach from now on.