Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hadynz/puppeteer-goodreads

Scrapes private Kindle highlights for a Goodreads user using automation by headless chrome
https://github.com/hadynz/puppeteer-goodreads

automation goodreads headless-chrome puppeteer

Last synced: 10 days ago
JSON representation

Scrapes private Kindle highlights for a Goodreads user using automation by headless chrome

Awesome Lists containing this project

README

        


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

```bash
npm install --save puppeteer-goodreads
```

## Usage

This example signs into a [Goodreads](https://goodreads.com) account.

```js
// 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](https://github.com/hadynz)

[node-typescript-boilerplate]: https://github.com/jsynowiec/node-typescript-boilerplate