grasshopper!!! has asked for the wisdom of the Perl Monks concerning the following question:
I have tried to download the 8mb index.all file from the Gutenburg Project website with LWP::UserAgent but it only gets around 5mb. With wget I gets the full file, is there some limit in LWP? I have tried LWP::Agent many times and it gets between 4mb-5.2mb.
my $url = 'https://www.gutenberg.org/dirs/GUTINDEX.ALL'; my $file = '/home/philip/APPLICATIONS/GUTINDEX.ALL'; say $url; my $browser = LWP::UserAgent->new(); my $response = $browser->get($url); open my $fp,">",$file || die "Error saving book $!\n"; print $fp $response->content(); close $fp;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: LWP file size
by hippo (Archbishop) on Jun 12, 2025 at 11:30 UTC | |
Re: LWP file size
by Corion (Patriarch) on Jun 12, 2025 at 10:18 UTC |