When one fetches a page which forces gzip compression with curl you get just random mess, unless you specify the
Code: Select all
--compressedNow I'm wondering is there anything like the --compressed flag for Perl's LWP module? I am aware of the
Code: Select all
'Accept-Encoding' => 'gzip'Code: Select all
LWP::UserAgent->get Code: Select all
our @gz_headers = (
'User-Agent' => 'test',
'Accept-Encoding' => 'gzip',
);
my $title = $ARGV[0];
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
my $qry = $ua->get("http://anidb.net/perl-bin/animedb.pl?show=animelist&adb.search=$title&do.search=search", @gz_headers);
Thanks in advance.

