puppeteer-goodreads
v1.0.5
Published
Scrapes private Kindle highlights for a Goodreads user using automation by headless chrome
Downloads
21
Maintainers
Readme
puppeteer-goodreads
Scrapes private Kindle highlights for a Goodreads user using automation by headless chrome.
This module was built using the excellent node-typescript-boilerplate.
Install
npm install --save puppeteer-goodreads
Usage
This example signs into a Goodreads account.
// Import using CommonJS `require`
const { PuppeteerGoodreads } = require('puppeteer-goodreads')
// Import using Typescript. Module interfaces are also available for your consumption
import { PuppeteerGoodreads, Book, Highlight } from 'puppeteer-goodreads';
const defaultOptions = { headless: false, /* ... */ };
const goodreads = new PuppeteerGoodreads({ puppeteer: defaultOptions });
/* Logs in to Goodreads with credentials using a headless chrome brwoser session */
const success = await goodreads.signin('xxx', 'xxx');
/* Returns list of books with Kindle highlights for currently logged in Goodreads user */
const books = await goodreads.getMyBooks();
/* Returns all Kindle highlights for a given book for logged in Goodreads user */
const highlights = await goodreads.getBookHighlights(book);
await goodreads.close();
License
MIT © Hady Osman