Goodreads automate: add books to list

Demo

Why

I try to compile all the MIT OCW books to a Goodreads list, as there are hundreds of books, I automate this process. Alas, I can automate it, but Goodreads only allow me to add 100 books to list per person. The list in question: https://www.goodreads.com/list/show/108086.MIT_Mathematics_syllabus_books.

How

I use the Python programming language version 3.6.0. Install packages such as BeautifulSoup4 for parsing HTML and Selenium Python for web browser automation. If you are not familiar with Python, BeautifulSoup, or Selenium or any part of this, search Google for “How to run Python program”, “Selenium web driver”, etc.

The code to parse MIT OCW website (https://ocw.mit.edu/courses/mathematics, you can edit this URL) for ISBN is as follows. The script will check for course pages that have “Syllabus” and “Readings” tab.

You will get a list of ISBNs (both ISBN10 and ISBN13) printed to your console, e.g.:

Copy and paste the list of ISBNs into a isbn.txt file.

Then, run another script as below to add books to Goodreads list based on ISBN. This script uses selenium, download Selenium Python package and Edge/ Firefox/ Chrome browser driver to the same folder of this script, I am using Edge. Edit the list URL (https://www.goodreads.com/list/show/108086.MIT_Mathematics_syllabus_books) to your list URL.

The script should open your browser and do its things.

Leave a Reply