Venerable monks, if I use the following code to retrieve HTML from the following addresses (my browser displays them without a problem):
#! /usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $url_1 = 'http://www.springerlink.com/content/w63801m75p4hr012/'; my $url_2 = 'http://www.sciencedirect.com/science/article/pii/S1439179 +111001204'; my $browser = LWP::UserAgent->new; for my $url ( $url_1, $url_2 ) { my $response = $browser->get( $url ); my $html = $response->is_success ? $response->content : warn $response->status_line; }
I get:
403 Forbidden at monks_sample.pl line 15. 400 Bad Request at monks_sample.pl line 15.
Any ideas? Thanx!
In reply to LWP::UserAgent Bad and Forbidden requests by taioba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |