Skip to content
Return a webpage's title and favicon
CoffeeScript Shell
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
src
LICENSE
README.md
compile.sh
package.json

README.md

Return a webpage's title and favicon.

Installing the library

npm install webpage-info -g

API signature

// Signature (timeout is in milliseconds):
webpage_info = require('webpage-info')
webpage_info.parse(url, callback, timeout)

Example

webpage_info = require('webpage-info')
callback = function(obj) { 
    console.log(obj.title); 
    console.log(obj.favicon); 
    console.log(obj.error); // Will be set if an error happend
}
webpage_info.parse('http://www.youtube.com/watch?v=9bZkp7q19f0', callback)
Something went wrong with that request. Please try again.