jscrap
is a very fast and easy-to-use web scrapper for node.js
npm install jscrap
var
jscrap = require('jscrap');
jscrap.scrap("https://www.kernel.org/",function(err,$){
console.log("Latest Linux Kernel: ",$("article #latest_link > a").text().trim());
console.log("Released: ",$("article #releases tr:first-child td:nth-child(3)").text());
});
jscrap
supports all the zcsel selectors and functions.
Watch out zcsel documentation.
The scrap()
function supports these options:
debug
: Activates the debug mode. Defaults to false
.
followRedirects
: Number of redirects to follow. Defaults to 3
.
charsetEncoding
: Document charset. Default to utf-8
.