0.3.1 • Published 9 years ago

site-meta v0.3.1

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

node-site-meta

Package intended to parse a site's meta data. A simple parser, which accepts invalid tags such as mixed case attributes/properties.

Installation:

$ npm install site-meta

Example usage:

var SiteMeta = require( 'site-meta' )(  ); // Initialize

SiteMeta.scrape( 'http://github.com', function( err, meta ){
    if( !err ) console.log( meta );
});

This will return an object

{   
    url  : String,
    type : String (HTML, RSS, Unknown),
    meta : {
        title: String
        description: String
        canonical: String
        feeds : Array,
        favicon : String,
        apple-touch-icon : Array,
        og : {
            title: String,
            type: String,
            image: String,
            url: String,
            description: String,
            site_name: String
        },
        twitter : {
            card: String,
            site: String,
            title: String,
            url: String,
            description: String,
            creator: String,
            image: String
        }
    }
}

Tests

$ npm install // Install Dependencies

$ npm test // Runs Tests
0.3.1

9 years ago

0.3.0

9 years ago

0.2.3

9 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.5

10 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago