In page.py in the Page object we have the following function:
https://git.wikimedia.org/blob/pywikibot%2Fcore.git/aba68924c8221f111fa28ebda34ea11c19f7d57f/pywikibot%2Fpage.py#L1113
def interwiki(self, expand=True): """Iterate interwiki links in the page text, excluding language links. @param expand: if True (default), include interwiki links found in templates transcluded onto this page; if False, only iterate interwiki links found in this page's own wikitext @type expand: bool @return: a generator that yields Link objects """ # This function does not exist in the API, so it has to be # implemented by screen-scraping
The MediaWiki api now has the function "iwlinks" (https://www.mediawiki.org/wiki/API:Iwlinks) that seems to do what we need. See for example https://commons.wikimedia.org/w/api.php?action=query&prop=iwlinks&titles=Creator:Antonio_Ponce&format=json
The interwiki() function should be reimplemented using the api.
Version: core-(2.0)
Severity: enhancement