in reply to Re^2: Download FIle with WWW::Mechanize::PhantomJS
in thread Download FIle with WWW::Mechanize::PhantomJS

phantomjs but examples are given in .js

Great, where is that?

  • Comment on Re^3: Download FIle with WWW::Mechanize::PhantomJS

Replies are listed 'Best First'.
Re^4: Download FIle with WWW::Mechanize::PhantomJS
by NeerajPandey (Novice) on Dec 25, 2015 at 17:28 UTC
    var fs = require('fs'); var page=this; var result = page.evaluate(function() { var out; $.ajax({ 'async' : false, 'url' : 'fullurltodownload.csv', 'success' : function(data, status, xhr) { out = data; } }); return out; }); fs.write('mydownloadedfile.csv', result);
    Found something here http://stackoverflow.com/questions/31564215/how-to-download-a-csv-file-using-phantomjs.
        Thank you very much for the direction.