WWW-Bookmark-Crawler
view release on metacpan or search on metacpan
}
push @t, $_[0] unless @t;
}
return @t;
}
sub crawl($) {
my $pkg = shift;
my $ua = LWP::UserAgent->new;
$ua->agent ("WWW::Bookmark::Crawler $VERSION");
$ua->proxy ($pkg->{HTTP_PROXY});
$ua->timeout($pkg->{TIMEOUT});
local $| = 1;
open (DB, ">".$pkg->{DBNAME}) or croak("cannot write to index file");
local $SIG{INT} = sub { close DB; exit };
for my $L (@{$pkg->{_LINKS}}){
my $request = GET ($L);
my $response = $ua->request($request);
$response->is_success or next;
( run in 1.329 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )