Mercurial > eagle-eye
diff Ikariam.pm @ 143:bfa78302cf09
ignore some combat reports, which is not finished.
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Fri, 31 Oct 2008 12:47:34 +0800 |
parents | 3756298f8e4b |
children | aad08889ddb3 00a21f73e906 |
line wrap: on
line diff
--- a/Ikariam.pm Fri Oct 31 10:53:14 2008 +0800 +++ b/Ikariam.pm Fri Oct 31 12:47:34 2008 +0800 @@ -586,7 +586,9 @@ $report{island} = $1; $report{city} = $2; } else { - die ($href); + warn ("can not read combat reprot $combatId"); + warn ($href); + return undef; } $report{gold} = $extractor->find('//div[@id="troopsReport"]//ul[@class="resources"]/li[@class="gold"]'); $report{wood} = $extractor->find('//div[@id="troopsReport"]//ul[@class="resources"]/li[@class="wood"]'); @@ -631,6 +633,9 @@ $report->set('time', time); $report->update(); + } else { + # for some reason, we can not read the report. + next; } } else { # we have found the report we like to know, exit the function.