comparison Ikariam.pm @ 147:7f9109a50679

trying to fixed report
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sat, 01 Nov 2008 01:33:53 +0800
parents 00a21f73e906
children b23077d597b0
comparison
equal deleted inserted replaced
146:00a21f73e906 147:7f9109a50679
575 575
576 $report{attacker} = $extractor->find('//div[@id="troopsReport"]//table[@id="result"]//th[@class="attackers"]'); 576 $report{attacker} = $extractor->find('//div[@id="troopsReport"]//table[@id="result"]//th[@class="attackers"]');
577 $report{defender} = $extractor->find('//div[@id="troopsReport"]//table[@id="result"]//th[@class="defenders"]'); 577 $report{defender} = $extractor->find('//div[@id="troopsReport"]//table[@id="result"]//th[@class="defenders"]');
578 $report{winner} = $extractor->find('//div[@id="troopsReport"]//table[@id="result"]//td[@class="winner"]'); 578 $report{winner} = $extractor->find('//div[@id="troopsReport"]//table[@id="result"]//td[@class="winner"]');
579 579
580 # $report{targetCity} = $extractor->find('//div[@id="troopsReport"]/div/h3/a/text()'); 580 $report{targetCity} = $extractor->find('//div[@id="troopsReport"]/div/h3/a/text()');
581 # my $href = $extractor->find('//div[@id="troopsReport"]/div/h3/a/@href'); 581 my $href = $extractor->find('//div[@id="troopsReport"]/div/h3/a/@href');
582 $report{targetCity} = $extractor->find('//td[@class="battle"]/a/text()'); 582 # $report{targetCity} = $extractor->find('//td[@class="battle"]/a/text()');
583 my $href = $extractor->find('//td[@class="battle"]/a/@href'); 583 # my $href = $extractor->find('//td[@class="battle"]/a/@href');
584 if($href =~ /index\.php\?view=island&id=(\d+)&selectCity=(\d+)/) { 584 if($href =~ /index\.php\?view=island&id=(\d+)&selectCity=(\d+)/) {
585 $report{island} = $1; 585 $report{island} = $1;
586 $report{city} = $2; 586 $report{city} = $2;
587 } else { 587 } else {
588 warn ("can not read combat reprot $combatId"); 588 warn ("can not read combat reprot $combatId");