node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

head-scraper

Head Scraper

Scrape the <head> of webpages for <title>, <meta>, and <link>s. Uses htmlparser2, cogent, head-parser and head-scraper.

Example

var co = require('co')
var scrape = require('head-scraper')
 
co(function* () {
  var data = yield* scrape('https://github.com')
  data.title === 'GitHub blah blah blah'
  data.description === 'GitHub is the best blah blah blah'
  data.og.title === 'GitHub blah blah blah facebook'
})()