Revision: 8224 Author: xqt Date: 2010-05-27 10:42:12 +0000 (Thu, 27 May 2010)
Log Message: ----------- revert r8194: category names may contain project namespace in its title like Category:Wikipedia:myCategoryName
Modified Paths: -------------- trunk/pywikipedia/featured.py
Modified: trunk/pywikipedia/featured.py =================================================================== --- trunk/pywikipedia/featured.py 2010-05-27 01:17:22 UTC (rev 8223) +++ trunk/pywikipedia/featured.py 2010-05-27 10:42:12 UTC (rev 8224) @@ -54,11 +54,13 @@ import wikipedia, catlib, config
def CAT(site,name): - cat = catlib.Category(site, name) + name = site.namespace(14) + ':' + name + cat=catlib.Category(site, name) return cat.articles()
def BACK(site,name): - p = wikipedia.Page(site, name, defaultNamespace=10) + name = site.namespace(10) + ':' + name + p=wikipedia.Page(site, name) return [page for page in p.getReferences(follow_redirects = False, onlyTemplateInclusion=True)]
msg = {
pywikipedia-svn@lists.wikimedia.org