Bugs item #3605408, was opened at 2013-02-20 03:39 Message generated for change (Comment added) made by xqt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605408...
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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: update items in wikidata
Initial Comment: I want to add new lang to an item in wikidata I use this code it says page is updated but it doesn't change page!
dataSite=wikipedia.getSite('wikidata','wikidata') data = pywikibot.DataPage(dataSite, 'Q1234') lang='fa' fa_title='تست'
data.setitem(summary,items={'type': u'item', 'label': lang, 'value': fa_title}) data.setitem(summary,items={'type': u'sitelink', 'site': lang, 'title': fa_title})
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2013-02-20 23:49
Message: you may also use
data = wikipedia.DataPage(1234)
for creating the repository Page
or
site = wikipedia.getSite() data = wikipedia.DataPage(site.data_repository(), "Q1234")
----------------------------------------------------------------------
Comment By: Amir (amird) Date: 2013-02-20 04:03
Message: you must run it in this way: site=wikipedia.getSite('fa',fam='wikipedia') page=wikipedia.Page(site,'تست') data=wikipedia.DataPage(page) data.setitem(summary,items={'type': u'item', 'label': lang, 'value': fa_title}) data.setitem(summary,items={'type': u'sitelink', 'site': lang, 'title': fa_title})
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3605408...