Download gz files possible?

24 views
Skip to first unread message

Alex Bobrowski

unread,
Apr 26, 2017, 5:22:24 AM4/26/17
to CasperJS
Hi,

currently i have the usecase that i want to download a gz compressed csv file via casperjs.

If use the download function i only get a 0kb file which contains no data. If i try to download non compressed files then it works fine for me.


var casper = require('casper').create({
pageSettings: {
webSecurityEnabled: false
}
});
casper.start('https://username:pass...@assoc-datafeeds-eu.amazon.com/datafeed/listReports', function() {

var url = 'https://username:pass...@assoc-datafeeds-eu.amazon.com/datafeed/getReport?filename=username-earnings-report-20151220.tsv.gz';
this.download(url, 'amz_reporting.tsv.gz');
});

casper.run(function() {
this.echo('Done.').exit();

});


Is there a solution to handle ziped/gz files?
Reply all
Reply to author
Forward
0 new messages