Node.js and Cheerio parsing table with selectors
Problem
I'm trying to parse an HTML table using Node.js and Cheerio and am getting some results but unfortunately I'm getting way too much data and am not sure how to parse it down further to get only the data I need.
Here is the small bit of code I've got going so far..
var request = require("request");
var cheerio = require("cheerio");
request('http://www.myURL.com', function(error, response, body) {
var $ = cheerio.load(body);
$('td').each(function() {
console.log($(this).text());
});
});
Using a Chrome plugin to locate the selector, I've found that I need ".clickableRow td" but every way I've tried to plug this in doesn't seem to work.
For a little more clarity, the html source looks like this -