Scrapping Assemblée Nationale scrutin
Lib for Scrutin Scraper
$ npm install scrutin-scraper
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
ISC © Léo Colombaro