Skip to content

Commit

Permalink
Sleep 10 seconds when we cannot get response
Browse files Browse the repository at this point in the history
  • Loading branch information
katkad committed Oct 14, 2015
1 parent f134440 commit 58b1f2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scraper.pl
Expand Up @@ -22,6 +22,7 @@ sub get
$resp = WWW::Mechanize::get (@_);
last if $resp->is_success;
warn $resp->request->uri.': '.$resp->status_line;
sleep 10;
}

return $resp;
Expand All @@ -30,7 +31,7 @@ sub get
sub new
{
my $self = WWW::Mechanize::new (@_);
$self->timeout (300);
$self->timeout (60);
return bless $self;
}

Expand Down

0 comments on commit 58b1f2f

Please sign in to comment.