This Package is Open Graph Parser.
npm install @akumzy/ogp-parserThis module is a library to extract OGP tag information and SEO related tag information from URL
and a fork of ogpParser.
- cheerio
- follow-redirects (new)
- jsChardet
- iconv-lite
bash $ npm install @akumzy/ogp-parser
``javascript`
import ogp from '@akumzy/ogp-parser'
`javascript
import ogp from '@akumzy/ogp-parser'
const url = 'http://ogp.me'
parser(url, true)
.then(function(data) {
console.log(data)
})
.catch(function(error) {
console.error(error)
})
`
`javascript
import ogp from '@akumzy/ogp-parser'
const url = 'http://ogp.me'
parser(url, false)
.then(function(data) {
console.log(data)
})
.catch(function(error) {
console.error(error)
})
`
`json``
{
"title": "The Open Graph protocol",
"ogp": {
"og:title": ["Open Graph protocol"],
"og:type": ["website"],
"og:url": ["http://ogp.me/"],
"og:image": ["http://ogp.me/logo.png"],
"og:image:type": ["image / png"],
"og:image:width": ["300"],
"og:image:height": ["300"],
"og:description": ["The Open Graph protocol enables any web page to become a rich object in a social graph."],
"fb: app_id": ["115190258555800"]
},
"seo": {
"description": ["The Open Graph protocol enables any web page to become a rich object in a social graph."]
}
}
- This library has been set to MIT license
- This library has no restriction on commercial use