goodreads-quote-scraper
A nightmarejs based webscraper for collecting quotes of a given author from goodreads.com. The quotes are then saved as a prettified json file in your root directory.
The quotes are ordered as on goodreads i.e. most liked first. Only quotes attributed to the author are written to the final file.
Installation
npm install --save goodreads-quote-scraper
Note: electron can take some time to download.
Usage
The API takes three arguments, the third being optional.
- [string] - The author who's quotes you wish to scrape
- [Number] - The number of pages you wish to scrape (Goodreads has 20 quotes per page).
- [Boolean] - Whether or not you want the electron instance to show. Default is false.
//index.js const goodreads = ; ;
To batch quote scraping from a number of authors
; { try await ; await ; await ; catcherr console; }
Output
A message is logged to the console when the file has been written
george bernard shaw is complete!
├── node_modules
├── index.js
├── george-bernard-shaw.json
//george-bernard-shaw.json "quote": "Life isn't about finding yourself. Life is about creating yourself." "author": "George Bernard Shaw" "quote": "Make it a rule never to give a child a book you would not read yourself." "author": "George Bernard Shaw" ...