Today I was trying to switch some code of mine from old fashion interwiki to wikidata based. I found http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Wikidata#Getting_data page and based on that I wrote:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import wikipedia as pywikibot
if __name__ == "__main__":
try:
site = pywikibot.getSite(u'it', u'wikipedia')
page = pywikibot.Page(site, 'Fabio degli Abati Olivieri')
data = pywikibot.DataPage(page)
language_links = data.interwiki()
for page in language_links:
print page.title(asLink=True)
finally:
pywikibot.stopme()
The output was:
[[commons:fr:Fabio Olivieri]]
[[commons:de:Fabio Olivieri]]
[[commons:it:Fabio degli Abati Olivieri]]
Which seem to point to non existing language specific Commons sites instead of Wikipedias. I worked around this issue, but what is the source of this issue: Wikidata, Italian Wikipedia, pywikipediabot?
Jarek T.
User:jarekt