Skip to content

Super simple and fast html page meta data extractor with low memory footprint

License

Notifications You must be signed in to change notification settings

velocityzen/meta-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meta-extractor

NPM Version NPM Downloads

Super simple and fast meta data extractor with low memory footprint.

Extracts:

  • title
  • description
  • charset
  • theme-color
  • rss/atom feeds
  • all opengraph meta data
  • all twitter meta data
  • all app links meta data
  • all vk meta data
  • all unique image urls (absolute)
  • returns mime and extension for binary files without downloading the whole file

install

npm i meta-extractor

usage

const extract = require('meta-extractor');

extract({ uri: 'http://www.newyorker.com' }, (err, res) =>
  console.log(err, res)
);

or;

const res = await extract({ uri: 'http://www.newyorker.com' });
console.log(res);

If no callback provided returns a Promise.

The first parameter opts as in got module and:

  • uri — uri to get meta from.
  • rxMeta — regexp, custom regexp for meta data.
  • limit — number, response body size limit in bytes. Default 2Mb.

License MIT;

© velocityzen