Page MenuHomePhabricator

Site.interwiki_prefix() never worked
Open, MediumPublicBUG REPORT

Description

Steps to replicate the issue:

>>> import pywikibot
>>> site = pywikibot(Site)
>>> site.interwiki_prefix(site)
KeyError: "There is no interwiki prefix to 'wikipedia:de'"
>>> wh = s.interwiki('wikihow')
>>> site.interwiki_prefix(wh)
KeyError: "There is no interwiki prefix to 'wikihow:en'"

What happens?:
I've checked several sites and always got that KeyError

What should have happened instead?:
An interwiki prefix should be returned from a given url. Refer siteinfo['interwikimap']:
https://de.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap

Event Timeline

Xqt triaged this task as Medium priority.Jul 9 2022, 4:09 PM
Xqt updated the task description. (Show Details)