ResearchBuzz!
ResearchBuzz Logo

Get the Free Weekly Newsletter!
ResearchBuzz Every Week in Your Mailbox

Email address:
Privacy Policy

ResearchBuzz:

Search!
Google
Web ResearchBuzz.org   

Archives

Category-Based:

 
Date-Based:

All monthly archives

 

Last Five Entries:

[an error occurred while processing this directive]

January 21, 2004

Happy Google Hacks Week 2004 #3: LuckyMarklets

If you've spent any time munging around Google's search form, you know that the switch to get an "I'm Feeling Lucky" result without going to Google's search result list is &btnI. In other words, if you click on this URL:

http://www.google.com/search?q=%22washington+post%22&btnI

You will go straight to the Washington Post instead of getting a list of Google search results.

When I read in Rafe Colburn's Weblog entry about Google replacing bookmarks last November ( http://rc3.org/cgi-bin/less.pl?arg=5747 ) I thought it would be fun to have a bookmarklet that did an I'm Feeling Lucky search, as I don't use Firebird. So eventually I went to Bookmarklets.com, goobered with the Search Google bookmarklet, and make an I'm Feeling Lucky search bookmarklet. (Big big massive props to Bookmarklets.com) But then I thought, "Hmm. I wonder where else &btnI works?"

It turns out that the &btnI switch also works in Google News and Google Images. In other words, if you search Google News with the &btnI switch (you'll have to construct the URL), you'll go straight to the first news result. Try it:

http://news.google.com/news?q=%22new+hampshire%22&btnI

If you're not looking for the most relevant article, but the most RECENT article, you can get it by using the &scoring=d switch:

http://news.google.com/news?q=%22new+hampshire%22&scoring=d&btnI

The image one works much the same way, except you can't change the result order. So I made bookmarklets for "I'm feeling lucky" searches for Google, Google News (two, actually: one for sorted by relevance and sorted by date) and Google Images. You can either highlight text on a page and activate the bookmarklet or you can enter a query into the box when prompted. So if you're reading an article on diabetes and you want to get the latest news, highlight the word and activate the news-sorted-by-relevance bookmarklet (just save the bookmarklet like you'd save a regular bookmark and click on it), and you'll be whisked away to Google's most relevant story on diabetes.

By this time I was having a good old time rummaging around in the JavaScript so I made one more bookmarklet, to generate a Google News Alert. Fill out the queries and you'll be taken to Google's News Alert page with the form filled out. Click on it and Google will send you the news alert confirmation. I don't know how useful that'll be to anybody else; I know as I'm reading articles there are various topics that I usually want to track in the news and this'll make it a lot easier.

(These bookmarklets have been tested on Windows with Opera and IE, but not on Mac, unfortunately.)

Instant Web Search Results

Use this bookmarklet for Opera/Netscape


Use this bookmarklet for Internet Explorer


Instant News Search, Sorted by Relevance

Use this bookmarklet for Opera/Netscape


Use this bookmarklet for Internet Explorer.


Instant News Search, Sorted by Date

Use this bookmarklet for Opera/Netscape.


Use this bookmarklet for Internet Explorer.


Instant Image Search

Use this bookmarklet for Opera/Netscape


Use this bookmarklet for Internet Explorer.


Google News Alerts

Internet Explorer News Alert Bookmarklet

If you want to use the same e-mail address all the time, you can hardcode it in instead of typing it over and over. Save the following JavaScript (all in one line) as a bookmarklet, but replace foo@example.com with your address (be sure to use %40 instead of the at sign (@)!

javascript:inText=document.selection.createRange().text;if(!
inText){void(inText=prompt('Query',''))};if(inText)location.
href='http://www.google.com/newsalerts?&q='+escape(inText)+'&e=foo%40example.com&f=0'

This bookmarklet will prompt you only for a news query.

LuckyMarklets was written to celebrate Happy Google Hacks Week 2004. Check out the books in the O'Reilly Hacks Series:

Google Hacks
Spidering Hacks
Mac OS X Hacks
Amazon Hacks
eBay Hacks
Windows XP Hacks
Hardware Hacking Projects for Geeks
TiVO Hacks
Wireless Hacks
Linux Server Hacks

Posted in the following categories: Google Hacks | TrackBack
Take this title and: Google It | Yahoo It | Teoma It | Gigablast It | Amazon It


[an error occurred while processing this directive]

[an error occurred while processing this directive]