From 54ff27a51600bdbf850fd8c3093b4f117fffc678 Mon Sep 17 00:00:00 2001 From: lookshe Date: Wed, 21 Sep 2011 15:02:58 +0200 Subject: changed detection of disambiguation --- wiki.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki.pl b/wiki.pl index 9f66204..b41a341 100644 --- a/wiki.pl +++ b/wiki.pl @@ -44,11 +44,11 @@ if ($url !~ m/Special:Search/) { my $table = $res->{'table'}; my $isDis = 0; - if ($$table[1] !~ m/$ARGV[0]/i && $#$table == 1) { + if ($#$table > 0) { foreach (@$img) { #print "$_\n"; # if ($_ =~ m/^http:\/\/upload\.wikimedia\.org\/wikipedia\/commons\/thumb\/.*\/.*\/Disambig/) { - if ($_ =~ m/Disambig/) { + if ($_ =~ m/Disambig/i) { $isDis = 1; last; } -- cgit v1.2.3