Mercurial > eagle-eye
comparison Ikariam.pm @ 106:31803acb9c5f
fixed typo again
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Wed, 29 Oct 2008 15:14:58 +0800 |
parents | b369fe3c1992 |
children | 279a000eb3b0 |
comparison
equal
deleted
inserted
replaced
105:c86e2182d3b8 | 106:31803acb9c5f |
---|---|
510 foreach (qw/homeland elsewhere/) { | 510 foreach (qw/homeland elsewhere/) { |
511 $self->{'military'}->{$_} = (); | 511 $self->{'military'}->{$_} = (); |
512 my $result = $extractor->{doc}->find(sprintf('//div[@id="%s"]//ul[@id="battleReports"]/li[@class="enroute"]', $_)); | 512 my $result = $extractor->{doc}->find(sprintf('//div[@id="%s"]//ul[@id="battleReports"]/li[@class="enroute"]', $_)); |
513 foreach my $div ( @$result ) { | 513 foreach my $div ( @$result ) { |
514 my $extractor = new Ikariam::Extractor(content => $div->toString(1)); | 514 my $extractor = new Ikariam::Extractor(content => $div->toString(1)); |
515 my $t = $extractor->find('//div[@class="report"]/a[1]/@href'); | 515 my $f = $extractor->find('//div[@class="report"]/a[1]/@href'); |
516 my $f = $extractor->find('//div[@class="report"]/a[2]/@href'); | 516 my $t = $extractor->find('//div[@class="report"]/a[2]/@href'); |
517 $f = $1 if($f =~ /\?view=island&cityId=(\d+)/); | 517 $f = $1 if($f =~ /\?view=island&cityId=(\d+)/); |
518 $t = $1 if($t =~ /\?view=island&cityId=(\d+)/); | 518 $t = $1 if($t =~ /\?view=island&cityId=(\d+)/); |
519 | 519 |
520 push @{$self->{'military'}->{$_}}, { from => $f, to => $t}; | 520 push @{$self->{'military'}->{$_}}, { from => $f, to => $t}; |
521 if($_ eq 'homeland') { | 521 if($_ eq 'homeland') { |