1.0.0 • Published 7 years ago

ogparser v1.0.0

Weekly downloads
6
License
ISC
Repository
github
Last release
7 years ago

ogparser

Node.js module for parsing Open Graph meta-tags from URL

Dependencies

  • bluebird
  • cheerio
  • request-promise

Installation

npm install ogparser

Usage

const OGParser = require('ogparser');

async function getOG(url) {
  return await OGParser.parse(url);
}

Ouput

{
  site_name: 'Example',
  type: 'article',
  image: {
    image: 'https://example.com/images/kittens.jpg',
    width: '480',
    height: '320'
  },
  title: 'Funny kittens',
  description: 'Watch this funniest kittens!',
  url: 'https://example.com/articles/funny_kittens'
}

Links

The Open Graph protocol documentation.