# HG changeset patch # User "Rex Tsai " # Date 1225428454 -28800 # Node ID bfa78302cf09eb06b749a58710a2a28ed9449a0d # Parent 9b8aa30a532c4b6b8db161b8dcdf4743658d287b ignore some combat reports, which is not finished. diff -r 9b8aa30a532c -r bfa78302cf09 Ikariam.pm --- 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.