Leser: 18
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#my $content = $ua->get("http://download.serienjunkies.org/go-$1");#->content(); #my $tmp = $ua->request($content); #print $tmp->as_string; #my $res = $ua->request->$link; #print $res; # my $req1 = HTTP::Request->new(GET => $link); # $req1->header('Accept' => 'text/html'); # my $res1 = $ua->request($req1); # print $res1->as_string; my $request = HTTP::Request->new('GET', $link); my $response = $ua->request($request); print $response->header_as_string;#("Location"); #my $content = HTTP::Request->new(GET => $link); #my $res = $ua->request($content); #print $content."\n"; #my $res = $content->content(); #print $res."\n"; #push @urls, $url;
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); }