1.1.1 • Published 5 years ago
scrutin-scraper v1.1.1
Scrutin Scraper Lib
Scrapping Assemblée Nationale scrutin
Lib for Scrutin Scraper
Install
$ npm install scrutin-scraper
Usage
const scrutScrap = require('scrutin-scraper')
const scrutin = await scrutScrap({
legislature: 15,
scrutin: 1116,
voteTypes: ['Pour', 'Contre', 'Non-votants']
})
console.log(scrutin)
// => [{
// name: 'Dupond',
// fullName: 'Jean Dupond',
// vote: 'Pour'
// }, ...]
console.log(JSON.stringify(scrutin))
// => JSON data
const CSV = require('csv-stringify')
CSV(scrutin, { header: true }, (err, output) => console.log(output))
// => CSV data
License
ISC © Léo Colombaro