Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Latest commit

 

History

History

lib

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

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