perl - File download via LWP returns error 500 (probably timeout due to long waiting time) -


i'm pretty new perl , tried use simple , small script download file. works on websites, seems not working on 1 particular website need download file from.

my code is:

use lwp::simple;  $status = getstore("http://www.regelleistung.net/download/abgerufene_mrl_betr_soll-werte.csv", "file.csv");  if ( is_success($status) ) {   print "file downloaded correctly\n"; } else {   print "error downloading file: $status\n"; } 

i keep getting error status 500. file directly linked on https://www.regelleistung.net/ext/data/ can click on "mrl", "srl" , "rz_saldo".

also, if try download file via clicking link in browser takes forever load before actual download starts.

i feel need getstore() wait until either timeouts (say ~60 seconds) or file loaded.

do have hint me solve problem? using other library or method? keyworks might helpful, since don't know search on google.

your code ran first time tried it. suspect site may have been busy when first tested

to make kind of changes asking need full lwp::useragent module, think code should work if keep trying few times


Comments