npm-author-scrape
v1.0.1
Published
Javascript module to extract data from an NPM author's profile page.
Downloads
4
Readme
npm-author-scrape
npm-author-scrape is a Javascript module to extract data from an NPM author's profile page.
Requirements
- Node.js
- request
- jq-html-parser
- mocha (To run tests)
Installation
npm install npm-author-scrape
Run Tests
mocha
Usage
var scrape = require('npm-author-scrape');
scrape('aiham', function (user) {
console.log(user ? user : 'Not found');
});
/* user contains:
{
username: 'aiham',
email: '[email protected]',
full_name: 'Aiham Hammami',
github: 'aiham',
twitter: 'aihamh',
homepage: 'http://www.aiham.net',
irc_handle: 'aiham',
modules:
[ { name: 'no-more-lies',
url: '/package/no-more-lies',
description: 'Javascript normaliser for user input from web forms, APIs, etc.' },
{ name: 'node-model.js',
url: '/package/node-model.js',
description: 'A simple ORM for use with Node.js and MySQL.' },
{ name: 'reddit-oauth',
url: '/package/reddit-oauth',
description: 'Reddit API wrapper' },
{ name: 'reddit-scrubber-cli',
url: '/package/reddit-scrubber-cli',
description: 'Removes comments and posts from your Reddit user page' },
{ name: 'valid8',
url: '/package/valid8',
description: 'Javascript data validator for use with user input from web forms, APIs, etc.' } ]
}
*/