Closed acuatoria closed 10 years ago
I'm trying to save the html in a web with this code, but no result A help would be much appreciated.
var scraper = function() { return $().html();
};
pjs.addSuite({ url: 'http://www.expoquimia.com/exhibitors', moreUrls: function() { return _pjs.getAnchorUrls('li a'); }, maxDepth: 1, scraper: scraper });
pjs.config({ // options: 'stdout', 'file' (set in config.logFile) or 'none' log: 'stdout', // options: 'json' or 'csv' format: 'json', // options: 'stdout' or 'file' (set in config.outFile) writer: 'file', outFile: 'scrape_output.json' });
Have you tried $(document).html() ?
This is a jQuery issue, not a pjscrape one - try the code out in the browser console first, as it's much easier to debug.
I'm trying to save the html in a web with this code, but no result A help would be much appreciated.
var scraper = function() { return $().html();
};
pjs.addSuite({ url: 'http://www.expoquimia.com/exhibitors', moreUrls: function() { return _pjs.getAnchorUrls('li a'); }, maxDepth: 1, scraper: scraper });
pjs.config({ // options: 'stdout', 'file' (set in config.logFile) or 'none' log: 'stdout', // options: 'json' or 'csv' format: 'json', // options: 'stdout' or 'file' (set in config.outFile) writer: 'file', outFile: 'scrape_output.json' });