Thread LWP::UserAgent & redirection
(2 answers)
Opened by conray at 2011-02-06 21:14
Erledigt!
Habs endlich rausgefunden: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 my $request = HTTP::Request->new('HEAD', $link); $request->header('Accept' => 'text/html'); my $response = $ua->request($request); if ($response->is_success) { my $url = $response->request()->uri(); logger( "### Found new URL: " . $url ); push(@urls, $url); } mfg conray |