Bugs item #3601826, was opened at 2013-01-22 15:02
Message generated for change (Tracker Item Submitted) made by beta16
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=360182…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Luca Rabinelli (beta16)
Assigned to: Nobody/Anonymous (nobody)
Summary: WikiData: DataPage.get() return wrong item
Initial Comment:
Hi!
page = pywikibot.DataPage(site, 'Univers') returns Q2 correctly but
page = pywikibot.DataPage(site, 'Q2') returns Q404776 because label is
"Q2"
API wbgetentities can be call by item ID or by sites+titles
(
https://www.wikidata.org/w/api.php) so I think also Data.Page.get() can be call
with 1 parameter -> by item ID: pywikibot.DataPage('Q2') -> return
item Q2, label "Univers"
with 2 parameters -> by sites+titles: pywikibot.DataPage(site, 'Q2') ->
return item Q404776, label "Q2"
od define two methods "ByID" and "BySitesTitles".
I hope I explained clearly.
Pywikipedia [http] trunk/pywikipedia (r10965, 2013/01/21, 09:12:28, OUTDATED)
Python 2.7.1 (r271:86832, Jan 4 2011, 13:57:14)
[GCC 4.5.2]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=360182…