![]() | -=( In Between )=-Scholarly Online Publishing, Open Access and Library Related Technology |
Author: HEnk Ellermann
Today's:All time:
There are currently 0 users and 19 guests online.
|
I wanted to know what the "protocol" is because I am working on an XSLT stylesheet for a list of Latest Acquisitions of our library and thought that those cover images might make it look better. Before starting a series of experiments to see what Amazon really had to offer, I first did a search on the Internet and, luckily, came across a nice page by Nat Gertler called Abusing Amazon images who has already done a number of experiments to determine the way these URLs can be used. They are exremely ugly, but they do seem to have a clear pattern. The pattern is as follows: [BaseURL][ASIN].[country-code].[commands]The most important bit of information in this URL is the ASIN number, the number that Amazon uses to identify the items in its stock. In the case of books, the ASIN is simply the ISBN (without spaces and bars). The BaseURL can be
and ASIN, country-code and commands are separated by a dot. Other BaseURL's are possible too, for instance
An example of a real and usable URL is: <a href="http://images.amazon.com/images/P/1582406006.01.THUMBZZZ.jpg">http://images.amazon.com/images/P/1582406006.01.THUMBZZZ.jpg</a>The country code can be a two-letter-code, where 01 is for probing the amazon in the US and Canada (amazon.com), 02 for the UK (amazon.co.uk), 03 for Germany (amazon.de). A full list of country codes I wasn't able to find. The commands section is the ugliest part, and it is hard to imagine anyone, sane of mind, to have set this up. But what it amounts to is that certain ugly strings have certain nice results. The command string can be in one of three formats, two of which I'll discuss here shortly. For more information, you know where to go to. :)
Examples of the strings in format 1, are: In the other format it is also possible to specify sizes, but extra commands can be attached to these strings (by prefixing them to the size specification and embedding them into two underscores) to achieve some effects, like adding a border and shadows to the pictures. For example, getting a medium sized image we have to use
The final URL would then be <a href="http://images.amazon.com/images/P/1582406006.01._PB_SCMZZZZZZZ_.jpg">http://images.amazon.com/images/P/1582406006.01._PB_SCMZZZZZZZ_.jpg</a>And the result is:
Of course Amazon has more to offer here than just links. It is possible too to direct the user to the site where the book can be ordered, as you can see below. But the full use of Amazon's capabilities is too much for one post. Perhaps another time. email this story | printer friendly version | 30556 reads |
|