npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

house-gov-page-scraper

0.1.1 • Public • Published

House.gov Page Scraper

Scrapes the representative finder on House.gov.

CircleCI Coverage Status Dependency Status Dev Dependency Status Known Vulnerabilities

Requirements

Requires NodeJS version 4.3.2 or greater.

Installation

$ npm install house-gov-page-scraper --save

Usage

Returns a promises, using Request-Promise-Native for http GET requests.

var scraper = require('house-gov-page-scraper');
 
scraper.getDistrictsInZip(90210)
    .then(function(result) {
        console.log(result); // outputs [ 'CA-28', 'CA-30', 'CA-33' ]
    });

Note: If a zip code is 4 digits, input as a 5 character string:

scraper.getDistrictsInZip('02109')
    .then(function(result) {
        console.log(result); // outputs [ 'MA-8' ]
    });

Tests

$ npm test

Contributing

Code is transpiled from ES6/ES2015. You can lint code by running:

$ npm run lint

install

npm i house-gov-page-scraper

Downloadsweekly downloads

0

version

0.1.1

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability