Thanks you so much, now i have all the urls of a file from my wiki using this method.
sub getFileArchive {
mw_connect_maybe();
my $filename = shift;
my $query = {
action => 'query',
prop => 'imageinfo',
titles => $filename,
iilimit => 4,
iiprop => 'url',
};
my $result = $mediawiki->api($query);
my ($pageID,$page) = each (%{$result->{query}->{pages}});
if (defined($page->{imageinfo})) {
while (my $urlFile = pop(@{$page->{imageinfo}}))
{
my $host = $urlFile->{url};
print "$host\n";
}
}
}
Logged in with user "WikiAdmin".
http://localhost/wiki/images/archive/0/07/20120609160413%21Toilamduoc.png
http://localhost/wiki/images/0/07/Toilamduoc.png
But now how i can download these files, the method
dowload seem to be not able to download the files from the archive?
Thanks.