http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10670
Revision: 10670 Author: shizhao Date: 2012-11-07 15:21:00 +0000 (Wed, 07 Nov 2012) Log Message: ----------- update wikidata family
Modified Paths: -------------- trunk/pywikipedia/families/wikidata_family.py
Modified: trunk/pywikipedia/families/wikidata_family.py =================================================================== --- trunk/pywikipedia/families/wikidata_family.py 2012-11-07 13:21:02 UTC (rev 10669) +++ trunk/pywikipedia/families/wikidata_family.py 2012-11-07 15:21:00 UTC (rev 10670) @@ -4,42 +4,53 @@
import family
-# The Wikidata +# The Wikidata family # user-config.py: usernames['wikidata']['wikidata'] = 'User name'
class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'wikidata' - self.langs = { 'wikidata': 'wikidata.org', } -#http://wikidata-test-repo.wikimedia.de/w/api.php?action=query&meta=sitei... +#https://wikidata.org/w/api.php?action=query&meta=siteinfo&siprop=nam... self.namespaces[4] = { - '_default': u'Wikidata-test', + '_default': [u'Wikidata', 'Project'], } self.namespaces[5] = { - '_default': u'Wikidata-test talk', + '_default': [u'Wikidata talk', 'Project talk'], } - self.namespaces[102] = { + self.namespaces[120] = { '_default': u'Property', } - self.namespaces[103] = { + self.namespaces[121] = { '_default': u'Property talk', } - self.namespaces[104] = { + self.namespaces[122] = { '_default': u'Query', } - self.namespaces[105] = { + self.namespaces[123] = { '_default': u'Query talk', } + self.namespaces[710] = { + '_default': u'TimedText', + } + self.namespaces[711] = { + '_default': u'TimedText talk', + } + self.namespaces[1198] = { + '_default': u'Translations', + } + self.namespaces[1199] = { + '_default': u'Translations talk', + } self.cross_projects = [ 'wikipedia', 'wiktionary', 'wikibooks', 'wikiquote', 'wikisource', 'wikinews', 'wikiversity', 'meta', 'test', 'incubator', 'commons', 'species', 'mediawiki' ] -#I checked and https was not supported but i think it will -# if family.config.SSL_connection: -# def protocol(self, code): -# return 'https' + + if family.config.SSL_connection: + def protocol(self, code): + return 'https'
pywikipedia-svn@lists.wikimedia.org