Closed simonexmachina closed 12 years ago
Writers and loggers can't be set in .addSuite()
- they need to be specified in .config()
:
pjs.config({
writer: 'itemfile',
});
pjs.addSuite({
url: 'http://www.google.com/',
scraper: function() {
return {
filename: 'pjscrape-out.txt',
content: document.documentElement.outerHTML
}
}
});
Awesome, thanks Nick.
I've read the docs and checked the code, but the following config doesn't result in a file being written. I'm using the latest version of PhantomJS (1.6.1) and master branch of pjscrape (0.1.4 in VERSION.txt)
I've also tried 'file' writer and outFile in the top-level config, but neither results in a file being written.