web scraping - Node.js scraiping using Node.io -



web scraping - Node.js scraiping using Node.io -

i trying node.js titles of page: https://www.odesk.com/jobs/braintree

i seek this:

var nodeio = require('node.io'); var methods = { input: false, run: function() { this.gethtml('https://www.odesk.com/jobs/braintree/', function(err, $) { //handle request / parsing errors if (err) this.exit(err); var titles = [], scores = [], output = []; //select titles on page $('.content').each(function(a) { titles.push(a.text); }); this.emit(output); }); } } exports.job = new nodeio.job({timeout:10}, methods);

but i'm getting nil result. wrong?

thanks

you aren't accurately traversing markup. , utilize of each incorrect. seek this:

$('a', '.content h3').each(function(index, a) {console.log($(a).text())});

node.js web-scraping

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -