[Sakai Jira] Commented: (SAKIII-2536) Investigate preview URL for Amazon books
Bert Pareyn (JIRA)
sakai-ui-dev-tracking at collab.sakaiproject.org
Wed Mar 23 03:54:47 PDT 2011
[ https://jira.sakaiproject.org/browse/SAKIII-2536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=123785#comment-123785 ]
Bert Pareyn commented on SAKIII-2536:
To process the URL of the Amazon Book we need to keep in mind that we're looking for the ID of the book.
An Amazon Kindle eBook has a URL like this: http://www.amazon.co.uk/Hard-Landing-introductory-Shepherd-Thriller/dp/B002V09292/ref=pd_sim_kinc_9
A paperback has a URL like this: http://www.amazon.co.uk/Case-Missing-Boyfriend/dp/B004IPPAOO/ref=sr_1_1?s=books&ie=UTF8&qid=1300877183&sr=1-1
To load this book preview into the Kindle viewer we need to extract B004IPPAOO (for the paperback) from the URL. An easy solution would be to split on '/' and look for the value after 'dp'.
I've browsed through the book store and found out that the books that have previews have this similar URL structure.
Of course, there are some that haven't got this structure (e.g. http://www.amazon.com/gp/product/0596516495/ref=s9_qpp_gw_p14_ir03?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-2&pf_rd_r=0XVHWFK3Z7JGY4RX6RNS&pf_rd_t=101&pf_rd_p=470938631&pf_rd_i=507846 ). I've manually tried to render the preview for these books but the ID doesn't seem to be compatible with the Kindle reader.
Looking further into the source code reveals that the URLs for a page are put into IMG tags and rendered. An example of such a page is http://sitb-images.amazon.com/Qffs+v35leqt2hzIDMEaTol5TNArHTUhuFVhrJ8og+MNOOIfCzl1tUbUx+0YIIq86gH2xbV4KtU=
There is no API to get, for example, the first page and show it as an image or show the sequence of images.
> Investigate preview URL for Amazon books
> Key: SAKIII-2536
> URL: https://jira.sakaiproject.org/browse/SAKIII-2536
> Project: Sakai 3 UI Dev
> Issue Type: Sub-task
> Components: Content & Media
> Affects Versions: Sprint 106
> Reporter: Nicolaas Matthijs
> Assignee: Bert Pareyn
> Fix For: Sprint 106
> Attachments: amazonbooks.html, Kindle for Web - No Preview.jpg, Kindle for Web preview.jpg
> Investigate how we can preview/show an Amazon book from an Amazon URL.
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the sakai-ui-dev-tracking