puppeteer-goodreads
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

actions status npm version Follow on Twitter

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

Package Sidebar

Install

npm i puppeteer-goodreads

Weekly Downloads

0

Version

1.0.5

License

Apache-2.0

Unpacked Size

21.9 kB

Total Files

33

Last publish

Collaborators

  • hadynz