diff Ikariam.pm @ 240:937fc672df56

count by Ally's score
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Fri, 07 Nov 2008 15:01:11 +0800
parents 978a949602e5
children 5f6f845bbb1d
line wrap: on
line diff
--- a/Ikariam.pm	Fri Nov 07 11:46:03 2008 +0800
+++ b/Ikariam.pm	Fri Nov 07 15:01:11 2008 +0800
@@ -140,6 +140,10 @@
     $ally{'id'} = $allyId;
     $ally{'name'} = $extractor->find("//table[\@id='allyinfo']/tr[1]/td[2]/text()");
     $ally{'members'} = $extractor->find("//table[\@id='allyinfo']/tr[2]/td[2]/text()");
+    $ally{'score'} = $extractor->find("//table[\@id='allyinfo']/tr[4]/td[2]/text()");
+    $ally{'score'} =~ s/\d+ \(([\d,]+)\)/$1/;
+    $ally{'score'} =~ s/,//g;
+
     $ally{'url'} = $extractor->find("//table[\@id='allyinfo']/tr[5]/td[2]/text()");
     delete($ally{'url'}) if($ally{'url'} eq '-');