Finding Out When Your Library Has New Books You Are Interested In
|
I've been meaning to do this for a while, and it wasn't until I discovered that my local library now has the new Robert Crais Joe Pike novel in, and there are already 87 people who have requested it, that I forced myself to work out what needed to be done. |
Here was a the goal. I wanted to be automatically informed via email, when my library had available any of the new books that I'm interested in.
Here's how I did it. First of all I created a new wish list at Amazon specifically for this list of books. You've probably seen that Amazon have a web page that will allow you to find newly released (or soon to be released books). From these lists, I populated that new wish list.
I know the web address of my libraries online web catalog. (See a previous post on this). I also have an access code to allow me to use the Amazon Web Services API.
I wrote a simple Python script that would do the following:
- Return the contents of my Amazon wish list.
- For each of the items in that list, get the web page for looking
that book up in the online web catalog for my local library.
- If that returned web page doesn't contain the text "Sorry, could not find
anything matching", then save that book information.
- If there are any found books, send me an email summarizing the results.
You'll see from the beginning of the script, that if you want to use this, there are four things you are going to need to adjust:
- Your Amazon Access License Key.
- Your Amazon Wishlist ID.
- The email address to sent results to.
- The Url to access your local library system. The book ISBN is appended to it.
You might also have to customize the magic string to look for to indicate whether the book was found at the library.
As books become available at my local library, I will request them, using the URL's provided automatically in the email, and remove them from my Amazon wish list so they don't get triggered again. Every two or three weeks, I plan to go back to the Amazon new books lists, and see if there are any more books that I want to add to my wish list.
I've already added this script as a cron job so that it runs every night.
It's already discovered that my library has pre-ordered the new book by John Scalzi, and I'm now #2 on the request list.
What would be even better was if there was an RSS feed I could subscribe to that would automatically tell me new books as they came out, maybe even filtering the results based on my interests. If anybody knows how to do this last part, please comment.
( Apr 02 2007, 07:36:38 AM PDT ) [Listen] Permalink
Comments are closed for this entry.














