npm.io
1.4.6 • Published 6 years ago

@5app/opengraph-scraper

Licence
ISC
Version
1.4.6
Deps
4
Size
7 kB
Vulns
1
Weekly
0

Opengraph Scraper

Given a URL will return meta information about the page.

e.g.

Usage:

// Import
const opengraphScraper = require('@5app/opengraph-scraper');

// Set a timeout in ms
const timeout = 3000;

// Url
const url = 'https://twitter.com/';

// Returns object
const {title, description} = await opengraphScraper(url, timeout);

console.log('Title: ', title, '- Description: ', description);

// Title: