7 Jun 2012 10:01
MW API: Query to list all links on the provided page doesn't return link to files
volekp <volekp <at> telesun.imag.fr>
2012-06-07 08:01:02 GMT
2012-06-07 08:01:02 GMT
Hi, I have a problem with MediaWiki API when trying to get links of all files (images, pdfs, etc ..) which are included in given page. With the MW API I can get the all other links but no links to media files. Ex.: I have a MW with Main Page, which contains following links (all links are working when click on them): .. [[File:Test.txt]] [[Test Page]] [[www.google.com]] .. I use Perl interface to MediaWiki API. Variable $page contents the hash with properties of 'Main Page'. my $query = { action => 'query', prop => 'links', titles => $page->{title}, pllimit => 50, }; my $mw_links = $mediawiki->api($query); but when I write out the content of $mw_links->{query}->{pages}->{$page->{pageid}}->{links}, I get only the titles of the two following links: Test Page(Continue reading)
RSS Feed