Mercurial > eagle-eye
diff Ikariam.pm @ 37:7d1e353520ca
just return empty users list, when the score link table is missed.
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Thu, 16 Oct 2008 21:40:14 +0800 |
parents | 91e387b51aa0 |
children | 5849b6fdc76c |
line wrap: on
line diff
--- a/Ikariam.pm Sat Oct 11 05:21:06 2008 +0800 +++ b/Ikariam.pm Thu Oct 16 21:40:14 2008 +0800 @@ -58,12 +58,13 @@ my $status = gunzip \$res->content => \$c or die "gunzip failed: $GunzipError\n"; + my %users; my $html = HTML::TagParser->new($c); + my ($table) = $html->getElementsByAttribute("class", "table01"); + return %users if(!defined($table)); - my ($table) = $html->getElementsByAttribute("class", "table01"); my @elems = getElementsByTagName($table, "tr"); - my %users; foreach my $elem (@elems) { my $e; my %user;