diff Ikariam.pm @ 7:2040ccc95670

implemented scores collection.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Wed, 08 Oct 2008 02:50:19 +0800
parents 2975a94aa7a2
children e4b3168d0319
line wrap: on
line diff
--- a/Ikariam.pm	Wed Oct 08 01:52:18 2008 +0800
+++ b/Ikariam.pm	Wed Oct 08 02:50:19 2008 +0800
@@ -3,7 +3,7 @@
 use Class::DBI::AutoLoader (
     dsn       => 'dbi:SQLite:dbname=ikariam.sqlite',
     options   => { RaiseError => 1 },
-    tables    => ['cities', 'islands', 'users'],
+    tables    => ['cities', 'island', 'users'],
     use_base  => 'Class::DBI::SQLite',
     namespace => 'Ikariam',
 );
@@ -12,7 +12,8 @@
 
 use Data::Dumper;
 use LWP;
-# use LWP::Debug qw(+ -conns);
+# use LWP::Debug qw(+ -conns -trace -debug);
+use LWP::Debug qw(+trace);
 use HTTP::Cookies;
 use WWW::Mechanize;
 use HTML::TagParser;
@@ -43,7 +44,7 @@
     my $user = shift || '';
     my $offset = shift || 0;
 
-    my $res = $self->{mech}->post(sprintf("http://%s/index.php?view=worldmap_iso", $self->{server}), [
+    my $res = $self->{mech}->post(sprintf("http://%s/index.php", $self->{server}), [
         highscoreType => $type,
         offset => $offset,
         searchUser => $user,