0.0
No commit activity in last 3 years
No release in over 3 years
Fetch books metadata using Amazon Product Advertising API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0

Runtime

~> 1.3.0
~> 2.9.3
~> 1.19.0
 Project Readme

Bookcrawler

Installation

Add this line to your application's Gemfile:

gem 'bookcrawler'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bookcrawler

Usage

Set your Amazon credentials as env vars:

export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
export AMAZON_ASSOCIATES_TRACKING_ID=...

Find a book:

crawler = Bookcrawler::Client.new
book = crawler.find_by_title('A Clash of Kings')

# <Bookcrawler::Book:
#   asin: "0553579908",
#   title: "A Clash of Kings (A Song of Ice and Fire, Book 2)",
#   author: "George R. R. Martin",
#   detail_page_url: "http://...",
#   cover_url: "http://...">

You can fetch the book cover at cover_url. Support for covers is not official in the Amazon Product Advertising API. The url is generated according to this article.

This gem uses Vacuum under the hood.

License

The gem is available as open source under the terms of the MIT License.