0.3.1 • Published 7 years ago

site-meta v0.3.1

Weekly downloads
3
License
ISC
Repository
github
Last release
7 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

7 years ago

0.3.0

7 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago