Revision: 7084
Author: alexsh
Date: 2009-07-23 16:51:23 +0000 (Thu, 23 Jul 2009)
Log Message:
-----------
Modified Paths:
--------------
branches/rewrite/pywikibot/login.py
Modified: branches/rewrite/pywikibot/login.py
===================================================================
--- branches/rewrite/pywikibot/login.py 2009-07-20 18:57:37 UTC (rev 7083)
+++ branches/rewrite/pywikibot/login.py 2009-07-23 16:51:23 UTC (rev 7084)
@@ -140,7 +140,7 @@
The argument data is the raw data, as returned by getCookie().
"""
- # THIS IS OVERRIDDEN IN data/api.py
+ # THIS IS OVERRIDDEN IN data/api.py
filename = config.datafilepath('pywikibot.lwp')
logger.debug(u"Storing cookies to %s" % filename)
f = open(filename, 'w')
Revision: 7083
Author: russblau
Date: 2009-07-20 18:57:37 +0000 (Mon, 20 Jul 2009)
Log Message:
-----------
Larger preloads now work and seem to be more efficient
Modified Paths:
--------------
branches/rewrite/scripts/category_redirect.py
Modified: branches/rewrite/scripts/category_redirect.py
===================================================================
--- branches/rewrite/scripts/category_redirect.py 2009-07-20 18:48:08 UTC (rev 7082)
+++ branches/rewrite/scripts/category_redirect.py 2009-07-20 18:57:37 UTC (rev 7083)
@@ -400,7 +400,8 @@
# with an appropriate template
comment = pywikibot.translate(self.site.lang, self.redir_comment)
for page in pagegenerators.PreloadingGenerator(
- self.site.allpages(namespace=14, filterredir=True)
+ self.site.allpages(namespace=14, filterredir=True),
+ step=250
):
# generator yields all hard redirect pages in namespace 14
if page.isCategoryRedirect():
@@ -457,7 +458,7 @@
pywikibot.output(u"")
pywikibot.output(u"Preloading %s category redirect pages"
% len(catpages))
- for cat in pagegenerators.PreloadingGenerator(catpages):
+ for cat in pagegenerators.PreloadingGenerator(catpages, step=250):
catdata = cat.categoryinfo
if "size" in catdata and int(catdata['size']):
# save those categories that have contents
@@ -511,7 +512,7 @@
pywikibot.output(u"")
pywikibot.output(u"Checking %s destination categories" % len(destmap))
- for dest in pagegenerators.PreloadingGenerator(destmap):
+ for dest in pagegenerators.PreloadingGenerator(destmap, step=250):
if not dest.exists():
for d in destmap[dest]:
problems.append("# %s redirects to %s"