Skip to content

Commit

Permalink
endless testing added
Browse files Browse the repository at this point in the history
  • Loading branch information
sergot committed Jul 24, 2014
1 parent 920c1b9 commit 1e9af27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crawler.p6
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ my $content = $c.get($start_url).content;

my @urls = get-urls($content);

for @urls -> $url {
while my $url = @urls.shift {
print "trying: $url ... ";
try {
$c.get(~$url);
$content = $c.get(~$url).content;
CATCH {
say '[NOT OK]';
}
default {
say '[OK]';
@urls.push: get-urls($content) if $content ~~ Str;
}
}
}
Expand Down

0 comments on commit 1e9af27

Please sign in to comment.