3.1.0 • Published 6 years ago
history-scraper v3.1.0
History Scraper (JS)
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
Run
npm i history-scraper
oryarn add history-scraper
Add this to your code:
const scraper = require('history-scraper'); scraper(optionsJson) .then(json => console.log(json)) .catch(err => console.error(err));
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
- Fork this repository
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'add my feature'
) - Push to your feature branch (
git push origin my-new-feature
) - Create a new Pull Request