0.1.3 • Published 6 years ago

url-info-scraper v0.1.3

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

NPM version Build Status Dependency Status

Library to retrieve meta data (title, favicon address etc) from a url

Install

$ npm install --save url-info-scraper

Usage

var urlInfoScraper = require('url-info-scraper');

urlInfoScraper('http://en.wikipedia.org/wiki/Wikipedia', function(error, linkInfo) {
  var title = linkInfo.title; //'Wikipedia - Wikipedia, the free encyclopedia'
});

The response is an object with the following properties:

{
  isWebResource: boolean, //true if the link is valid
  title: string, //title of the page requested
  mime: string, //content-type header of the page e.g. image/jpeg
  parsable: boolean, //false if the content type is 'application'
  tooLarge: boolean, //true if the link body is greater than 5MB
  faviconUrl: string //the url of the favicon for the root site, null if not found
}

Todo

  • Rewrite tests to use mocked resources instead of real urls
  • "Best image" support
  • Store additional metadata (response time etc.)
  • Screenshots
  • ...?

License

MIT © Paul Cleary

Bitdeli Badge

0.1.3

6 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago