

Ask HN: How could you automate this? (Amazon and a library catalogue) - corporalagumbo

I have several large wish-lists of books I would like to read on Amazon. Is there a way to automate the process of checking if these books are available in my local university catalogue? (http://www.library.otago.ac.nz/index.php)<p>1) Would it be possible to program a browser plug-in which displays a small box next to every item on the wish-list which, if clicked, checks and displays availability status (with call number, copies, and specific library available from)?
2) Could this information be trawled continuously and displayed live besides each entry?
3) Could this information be trawled, collated into a database, and displayed on an independent website?<p>Apologies if any of this is stupid or obvious. I am not a coder, so I don't know much beyond the vague understanding that things such as databases and APIs exist.
======
OafTobark
Yes it can be done. Whether or not its allowed is another story. Not every
University (or site) is okay with someone crawling their site.

~~~
corporalagumbo
Thanks :) Care to provide any details on how exactly?

~~~
wtracy
You would have to do it by screen scraping: Write a program that makes the
HTTP request to search for the book in question, then parse the HTML response
and determine what the result it.

~~~
badhairday
Additionally, use the ?layout=compact option on a the wishlist URL
(<http://www.amazon.com/registry/wishlist/?layout=compact>) to simplify the
HTML served by Amazon. The script would then want to extract the Amazon
Standard Identification Number (ASIN) from the linked URL. For example,
B007X5ZBU4 is the ASIN for "The Launch Pad: Inside Y Combinator, Silicon
Valley's Most Exclusive Schoolfor Startups [Kindle Edition]"
([http://www.amazon.com/The-Launch-Pad-Combinator-
ebook/dp/B00...](http://www.amazon.com/The-Launch-Pad-Combinator-
ebook/dp/B007X5ZBU4)). Now take the list of ASINs and convert them to ISBNs.
I'm sure there's an Amazon API that can handle this lookup. With a list of
ISBNs you can search against your school's database of books. Depending on how
open they are with this information there may be an API that allows you to
search by ISBN. Maybe talk to a tech-savvy librarian at your school.

