Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Jimmy Sweeney
Jimmy Sweeney
5,649 Points

Project idea - Scan ISBN and post book info to a blog

Putting this in the python discussion section but I'm not sure if this question is better suited in another discussion section.

I have a project idea and I'd love any suggestions for getting direction to get started.

Airtable is a database program that you can run on your smart phone which has a function that allows you to scan bar-codes. If you scan a book's bar-code it gives you back an ISBN (International Standard Book Number). So I already have a handy way of collecting and storing large numbers of ISBN.

What I'd like to do is have a program that fetches a book's info (author, title, thumbnail of cover) using the ISBN and then storing it in a spreadsheet (preferably a google spreadsheet) or, if it is easier, right into my Airtable database. Then that data would automatically populate a blog post in Wordpress. I probably wouldn't need a script for that last part but could just use Zapier. Although it would be fun to learn how to do that by creating my own script as well.

The part I need help with is getting the data from ISBN and storing it in a spreadsheet. ISBNlib (https://pypi.org/project/isbnlib/) seems to have the right tools to do this. But I don't know how I would go about getting the data and writing it to a spreadsheet file.

Anyway, any thoughts, ideas, or directions are greatly appreciated!

2 Answers

Luke Ward
Luke Ward
9,154 Points

If you have a look at the Good Reads API you can provide them with a books ISBN and they will return book details in XML format which you could parse and then write to the spreadsheet.

Jimmy Sweeney
Jimmy Sweeney
5,649 Points

Thanks, Luke. Openlibrary.org turned out to be pretty useful for me as well. I'll have to play around with parsing out the data.