diff Ikariam.pm @ 96:65c102183458

saved the status of inactivity player
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Wed, 29 Oct 2008 01:03:04 +0800
parents bcd2e32cfabb
children 34749e907405
line wrap: on
line diff
--- a/Ikariam.pm	Mon Oct 27 12:14:11 2008 +0800
+++ b/Ikariam.pm	Wed Oct 29 01:03:04 2008 +0800
@@ -91,7 +91,7 @@
 use Data::Dumper;
 use LWP;
 # use LWP::Debug qw(+ -conns -trace -debug);
-use LWP::Debug qw(+trace);
+# use LWP::Debug qw(+trace);
 use HTTP::Cookies;
 use WWW::Mechanize;
 use HTML::TagParser;
@@ -296,6 +296,9 @@
             if(defined(($extractor->find(sprintf('//li[@id="cityLocation%s"]//span[@class="vacation"]', $i)))[0])) {
                 $info{'status'} = 'v';
             }
+            if(defined(($extractor->find(sprintf('//li[@id="cityLocation%s"]//span[@class="inactivity"]', $i)))[0])) {
+                $info{'status'} = 'i';
+            }
             push @cities, \%info;
         } else {
             # TODO: delete the old city.