$self->user_agent->delay(2/60);
}
+sub fullint ($) { int (shift =~ y/0-9//cdr) }
+
sub _parse_tree{
my ($self, $tree) = @_;
my $found = 0;
my $result_count = $tree->find('h2')->as_text;
if (defined $result_count && $result_count ne 'No Torrents Found') {
$result_count =~ s/orrents.*//;
- $result_count =~ y/0-9//cd;
- $self->approximate_result_count(int $result_count);
+ $self->approximate_result_count(fullint $result_count);
}
for my $node (@potential_results) {
$verified = int ($span->as_text =~ m,^\d+,) when 'v';
$age = $span->as_text when 'a';
$size = $span->as_text when 's';
- $seeders = int $span->as_text when 'u';
- $leechers = int $span->as_text when 'd';
+ $seeders = fullint $span->as_text when 'u';
+ $leechers = fullint $span->as_text when 'd';
}
}