summaryrefslogtreecommitdiff
path: root/plans/abook
blob: 0418bbd5d1a6f4f92a1bb8aeab82762cdc4fccee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
final img urls look like:
http://sitb-images.amazon.com/Qffs+v35lepeP2icY2OteGGgTPZO7sxgfhv6+rCKfpWLrJyvNAksvFu4WzV79TodydVXgzoaP3o=
http://sitb-images.amazon.com/Qffs+v35lepeP2icY2OteGGgTPZO7sxgsXoL4TS0WgsVOflj1z8cVkwoGTF8uqsrBObiKx03xck=

ugly, but need no cookie, and can be re-downloaded

feature is called variously 'search inside this book' ('sitb') or 'look inside this book' ('litb')


http://www.amazon.com/gp/reader/0140442278/ is reader link, but appears to just redirect back to book link, with js pre-opened

sitb js library (not very obfuscated):
http://z-ecx.images-amazon.com/images/G/01/digital/sitb/reader/v4/201010271203/sitb-library-js._V176048133_.js


loadBookData looks promising - does ajax method:"getBookData",asin:asin - line 4903. this uses the SITB_READER_AJAX_URL. http://www.amazon.com/gp/search-inside/service-data?method=getBookData&asin=0140442278

some page urls are contained in that. under the title 'litbPages', e.g. 'look inside the book'. other ajax calls are definitely the place to look; follow usage of AJAX_URL and jquery.ajax

* note: https works :)

the main book data only contains the initial pages linked to from sidebar; others are available from the interface by using next/prev buttons, or by scrolling. investigate the ajax calls further

getSBData gives more metadata, not relevant here

goToPage gives lots of good stuff (line 2972); page requested plus nearby ones. official arg requests use a 'token', but seem to be able to get away without one

http://www.amazon.com/gp/search-inside/service-data?method=goToPage&asin=0140442278&page=27

not all pages are available; if not, we get this (still a 200, mind):

{"error":{"text":{"key":"PAGE_NOT_AVAILABLE_TEXT"},"title":{"key":"PAGE_NOT_AVAILABL
E_TITLE"},"reftag":"rdr_bar_view"}}