filtro

Catch web pages data, manipulating HTML in the server.

npm install filtro
11 downloads in the last month

Filtro

Catch web pages data, manipulating HTML in the server.

Install

npm install filtro --save

Make a little test

1 - Install the module filtro-facebook to returns the facebook tags in the page: npm install filtro-facebook --save

2 - Write a file containing:

var pageData = require('filtro').filtro;

pageData({
    url: 'http://tutsmais.com.br/blog',
    modules: ['facebook'],
    onContent: function (e) {
        console.log('Content: ', e);
    }
});

You will see:

summary-content

API

  • url: URL to request.
  • modules: Array of modules to be used: ['facebook', 'title'], each module will call a Node module, for example filtro-facebook, filtro-title, filtro-otherFiltroModule

events

  • onContent: Trigered when your data is complete.
  • onError: Tregered when have any error.

Filtro Modules

  • Facebook: Returns the Facebook tags data.
  • Title: Returns the page title of an URL.
  • HTML: Returns the HTML of an URL.

Contributors

Feel free to create a Issue to send suggestions and bugs.

npm loves you