Dear Monks,
I'm trying to retrieve a web page with LWP::UserAgent. With most of the websites (http://www.bokstas.lt), it returns me the HTML string of the page. However, when I'm trying to retrieve one website (http://www.finasta.lt), I get an empty string and get no error. The website I'm trying to retrive has a long whitespace trace in the beginning. Has anyone encountered a problem when retrieving such content? My retrieve function is below:
sub retrieve_url() { my $ua = LWP::UserAgent->new; my $response = $ua->get(shift); if ($response->is_success) { return $response->content; } else { die $response->status_line; } }
Any help will be appreciated.
In reply to Retrieviing HTML with LWP::UserAgent by Heidegger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |