Yes I do have family = 'commons' in my user-config.py. I had it set
like that for few years now, but I never run into this issue until I
started using interwikis from wikidata.
Thanks for fixing this.
Jarek T.
User:jarekt
From: pywikipedia-l-bounces(a)lists.wikimedia.org
[mailto:pywikipedia-l-bounces@lists.wikimedia.org] On Behalf Of Amir
Ladsgroup
Sent: Wednesday, March 06, 2013 3:15 AM
To: Pywikipedia discussion list
Subject: Re: [Pywikipedia-l] interlanguage links from Wikidata
fixed in r11181
I tested it and it was ok but test it again and inform me :)
Best
On Wed, Mar 6, 2013 at 10:54 AM, <info(a)gno.de> wrote:
This is really a bug in the current implementation of Page.title(). I
guess you have
family = 'commons'
in your user-config.py
If you change it to 'wikipedia' (as a work-around) it will work as
expected. But this must be fixed.
Greetings
xqt
----- Original Nachricht ----
Von: "Tuszynski, Jaroslaw W." <JAROSLAW.W.TUSZYNSKI(a)saic.com>
An: Pywikipedia discussion list <pywikipedia-l(a)lists.wikimedia.org>
Datum: 04.03.2013 18:34
Betreff: [Pywikipedia-l] interlanguage links from Wikidata
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_dat
a
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
--------------------------------
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
--
Amir