I am a beginner, and doing an assignment to scrape the content of this page using node.io
http://www.nycourts.gov/reporter/3dseries/2013/2013_06966.htm.
I want to save the text content which are under < P > tags as a string in a variable.
My code is this:
var nodeio = require('node.io'); var methods = { input: false, run: function() { this.getHtml('http://www.nycourts.gov/reporter/3dseries/2013/2013_06966.htm', function(err, $) {
//Handle any request / parsing errors if (err) this.exit(err); var content = $('P'); this.emit(content); }); } }
exports.job = new nodeio.Job({timeout:10}, methods);
This is showing error: No elements matching 'P'. Please help..