A node server and module which allows for cross-domain page scraping on web documents with JSONP or POST.
A node server and module which allows for cross-domain page scraping on web documents with JSONP or POST.
noodle is a Node.js server and module for querying and scraping data from web documents. It features:
{
"url": "https://github.com/explore",
"selector": "ol.ranked-repositories h3 a",
"extract": "href"
}Setup
$ npm install noodlejsor
$ git clone [email protected]:dharmafly/noodle.git
$ cd noodle
$ npm installStart the server by running the binary
$ bin/noodle-server
Noodle node server started
├ process title node-noodle
├ process pid 4739
└ server port 8888You may specify a port number as an argument
$ bin/noodle-server 9090
Noodle node server started
├ process title node-noodle
├ process pid 4739
└ server port 9090If you are interested in the node module just run npm install noodlejs,
require it and check out the noodle api
var noodle = require('noodlejs');
noodle.query({
url: 'https://github.com/explore',
selector: 'ol.ranked-repositories h3 a',
extract: 'href'
})
.then(function (results) {
console.log(results);
});The noodle tests create a temporary server on port 8889 which the automated
tests tell noodle to query against.
To run tests you can use the provided binary from the noodle package root directory:
$ cd noodle
$ bin/testsContributors and suggestions welcomed.
No open issues yet, or sync has not completed.