http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11725
Revision: 11725 Author: xqt Date: 2013-07-07 17:48:18 +0000 (Sun, 07 Jul 2013) Log Message: ----------- fix for Page.site
Modified Paths: -------------- branches/rewrite/scripts/featured.py
Modified: branches/rewrite/scripts/featured.py =================================================================== --- branches/rewrite/scripts/featured.py 2013-07-07 17:27:02 UTC (rev 11724) +++ branches/rewrite/scripts/featured.py 2013-07-07 17:48:18 UTC (rev 11725) @@ -71,7 +71,7 @@
def BACK(site, name, hide): - p = pywikibot.Page(site, name, defaultNamespace=10) + p = pywikibot.Page(site, name, ns=10) return [page for page in p.getReferences(follow_redirects=False, onlyTemplateInclusion=True)]
@@ -346,7 +346,7 @@ articles.append(p) # Article talk (like in English) elif p.namespace() == 1 and site.lang != 'el': - articles.append(pywikibot.Page(p.site(), + articles.append(pywikibot.Page(p.site, p.title(withNamespace=False))) pywikibot.output( '\03{lightred}** wikipedia:%s has %i %s articles\03{default}' @@ -663,7 +663,6 @@ pywikibot.output('\nQuitting program...') finally: if not nocache: - return pickle.dump(cache, file(filename, "wb"))
pywikipedia-svn@lists.wikimedia.org