sratter
the worts scrapper for the peruvian congress website
Development
- Install dependencies using
npm install
- Create a .env file with the following variables
CONGRESS_URL_BASE=http://www.congreso.gob.pe/CONGRESS_URL_LIST=congresistas
Usage
- Get all the information of the last period of the congress
const srapper = ;srapper ;
- Get information from other period rather than the last one
const srapper = ;srapper // six means the period 2011 - 2016 ;
Data Structure
- The listAll method will return you an array of objects
id: 1 // an arbitrary index email: 'racuna@congreso.gob.pe' fullName: 'Acuña Núñez Richard Frank' image: 'http://www.congreso.gob.pe/Storage/tbl_congresistas/fld_47_Fotografia_file/802-o5Bb5Jd3Ns0Gr4I.jpg' party: 'ALIANZA PARA EL PROGRESO'
I do not care about your silly package, give me the data
- Ok ok, slow down little man, here you have the list of the last period
http://www.jsoneditoronline.org/?id=206b733c480dde6801707e1224022fad