h5
v0.0.5
Published
Distributed computing with JSON.
Downloads
473
Readme
h5js
Distributed computing with JSON.
Checkout example.js
and cloud.js
in examples directory.
var h5 = require('h5');
require('./functions.js');
var example =
h5.action('http.request', { url: 'http://www.imdb.com/title/tt0110912/' }).
action('html.extract', { selectors: { title: 'h1.header > span[itemprop="name"]', year: 'h1.header > span > a' } });
example.
run().
then(function(result) {
console.log(result);
}, function(err) {
console.log('Error:', err);
});
Saving action and running in cloud
h5.cloud.set('http://127.0.0.1:6090/');
example.
save().
then(function() {
example.
run({url: 'http://www.imdb.com/title/tt0137523/'}, true).
then(function(result) {
console.log(result);
}, function(err) {
console.log('Error:', err);
});
});