npm.io
3.1.0 • Published 8 years ago

history-scraper

Licence
MIT
Version
3.1.0
Deps
5
Vulns
1
Weekly
0

History Scraper (JS)

npm version Code Climate License: MIT

About

Scraper that searches for events, births and deaths that occurred during a specific day of history from Wikipedia.

You may check out the ruby gem version here.

Usage

  1. Run npm i history-scraper or yarn add history-scraper

  2. Add this to your code:

const scraper = require('history-scraper');

scraper(optionsJson)
  .then(json => console.log(json))
  .catch(err => console.error(err));
  1. Run your code.

optionsJson may have the following key/values:

key description example value default value
delay ms delay between successive requests 200 50
outputDir name of the file to write the results data.json none (no file will be written)
logging whether to show the algorithm's progress or not true false

example options:

{ delay: 50, outputDir: 'data.json', logging: true }

Contributing

  1. Fork this repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'add my feature')
  4. Push to your feature branch (git push origin my-new-feature)
  5. Create a new Pull Request

Keywords