Closed crazy4groovy closed 12 years ago
There are two easy ways to do this:
Redirect STDOUT to a file:
~> phantomjs pjscrape.js my_script.js > my_output.json
"file"
writer and set the outFile
config parameter: see https://github.com/nrabinowitz/pjscrape/blob/master/tests/file_output_config.jsI'll try to add to the docs - haven't had much chance to update lately.
I knew about 1., but 2. is great. Thanks!
How do I specify and export scraped data into a file instead printing to the screen? Would be nice to have in documentation. I am using PhantomJS 1.6. Thanks!