in reply to Problem saving webpage content into a file
Update: In according to Corion's answer you can gunzip this way:use LWP::Simple; my $url = 'http://www.nasdaq.com/earnings/earnings-calendar.aspx?date= +2014-Oct-02'; my $html = LWP::UserAgent->new; my $response = $html->get($url); if ($response->is_success) { print "$response->content\n"; } else { warn("Can't get $url -- " . $response->status_line); }
my $uncomp_content; gunzip \$response->content => \$uncomp_content;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem saving webpage content into a file
by Corion (Patriarch) on Oct 06, 2014 at 12:52 UTC |