in reply to Re: Re: Re: A tool that logs and then parses the returned HTML.
in thread A tool that logs and then parses the returned HTML.
#d:\Perl\bin\perl.exe use HTTP::Request::Common ; use LWP::UserAgent; use LWP 5.64; my $browser = LWP::UserAgent->new; $browser->credentials( 'www.mysite:port', 'real name', 'user' => 'passwd' ); my $url = 'http://www.site/mylogpage'; my $response = $browser->get($url); die "Error: ", $response->header('WWW-Authenticate') || 'Error accessing', # ('WWW-Authenticate' is the realm-name) "\n ", $response->status_line, "\n at $url\n Aborting" unless $response->is_success; $content = $response->as_string; some_function($content);
|
|---|