Overview

uk-books is framework independent pure Python library that scrapes (or uses APIs) book websites.

Right now, it lets you find the price of a book via it's ISBN13. That's it. (I'll keep adding to it, of course.)

Try this out:

>>> import bookworm, httplib2
>>> h = httplib2.Http()
>>> bookworm.Tesco(h.request).isbn('9780552151832')
{'url': 'http://www.tesco.com/books/product.aspx?R=9780552151832', 'price': u'3.86', 'isbn': '9780552151832', 'title': u'One Day at a Time'}

>>> bookworm.Amazon(h.request).bestsellers()
[{'isbn': u'1849162743',
  'price': '',
  'title': u"The Girl Who Kicked the Hornets' Nest",
  'url': u'http://www.amazon.co.uk/Girl-Who-Kicked-Hornets-Nest/dp/184...'},
 {'isbn': u'1847245455',
    ... etc ...


It also works on AppEngine. Right now, all I've done is created a crawler. Subsequent versions will have a UI as well.



FILE STRUCTURE
==============

Controllers
    main.py             The main controller for ALL user-facing actions
    admin.py            Controller only for administration actions, such as deletion or testing
    taskfetch.py        Controller only for crawling actions
    
Models  
    model.py            The main data model class
    
Libraries   
    bookworm.py         The actual crawler library
    BeautifulSoup.py    BeautifulSoup library
    soupselect.py       CSS select on top of beautifulsoup

Config
    config.py           Dummy config file for public
    secret_config.py    Actual config file containing all API keys, etc.