Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetch web page data, manipulating HTML in the server
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
.gitignore
package.json
readme.md
teste.js

readme.md

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.
  • merriam webster: Returns the audios of words from Merriam Webster website

Contributors

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

Something went wrong with that request. Please try again.