A npm package to get famous quotes in english, spanish, french and brazilian portuguese.
npm i -S quote-scraper
var quoteScraper = require('quote-scraper');
// quote-scraper gives you an array with famous quote from someone.
// Just give the name (case insensitive)
// and you will get quotes in english.
console.log(quoteScraper('Agatha Christie'));
// You can also get quotes in spanish.
console.log(quoteScraper('mark twain', 'es'));
// In french.
console.log(quoteScraper('mark twain', 'fr'));
// And brazilian portuguese.
console.log(quoteScraper('mark twain', 'pt_br'));
// Using pt_br you can give a number of page to get more quotes.
// Do not worry about a big number.
// The library will handle it automatically.
console.log(quoteScraper('mark twain', 'pt_br', 5));
// You can use 'max' to get the maximum number of quotes.
console.log(quoteScraper('mark twain', 'pt_br', 'max'));