$ npm i mrspider --save
####Fetch the page
let spider = mr.Spider({
baseUrl: 'http://www.idealista.com'
});
let mr = require('mrspider');
let request = mr.request();
spider.createReadStream.pipe(request);
####Parse DOM
let spider = mr.Spider({
baseUrl: 'http://www.idealista.com'
});
let mr = require('mrspider');
let mrspiderCheerio = mr.cheerio;
spider.createReadStream().pipe(...).pipe(cheerio);
let spider = mr.Spider({
baseUrl: 'http://www.idealista.com'
});
let mr = require('mrspider');
let jsdom = mr.jsdom;
spider.createReadStream().pipe(...).pipe(jsdom);
####Parse Data
####Data validation
####Data persistence
- Super simple api.
- Streaming architecture allows complete customisation.
- Use the full power of JavaScript giving you great flexibility.
To run the test suite, first install the dependencies, then run npm test
: