8 June 2004

Amazon hacks

Everybody loves Amazon, and with the Search Inside feature it's become the Library of Alexandria.

I've begun using it to provide links to relevant quotes and have been a little lazy. The links ended up being session dependent and have expired. Here's a quick hack to do it correctly.

[Some links below had AISN instead of ASIN. Fixed now.]

I began by reading O'Reilly's online examples of Amazon Hacks. Hack numbers three and four outline how to refer to catalog items using their ASIN:

http://www.amazon.com/exec/obidos/ASIN/ASIN
http://amazon.com/o/ASIN/ASIN

So, we can go to Amazon Hacks at Amazon using this:

http://www.amazon.com/exec/obidos/ASIN/0596005423

To link to a quote, first come up with the search that will bring up the correct page. Let's refer to the opening line of Gravity's Rainbow.

We can link to the book Gravity's Rainbow:

http://www.amazon.com/exec/obidos/ASIN/0140188592

And link to the quote A screaming comes across the sky. It has happened before...

http://www.amazon.com/gp/reader/0140188592?v=search-inside&keywords=A+screaming+comes+across+the+sky.+It+has+happened+before

Now, I need to go back and update my old links...

For Search Inside, Amazon will ignore certain stop words in the search string. These include articles and pronouns.
Images can be linked using the following format:
http://images.amazon.com/images/P/ASIN.01.LZZZZZZZ.jpg

As with Gravity's Rainbow:

[ posted by sstrader on 8 June 2004 at 3:00:47 PM in Programming ]