On Sat, Oct 25, 2008 at 10:27 PM, <filnik(a)svn.wikimedia.org> wrote:
Revision: 6020
Author: filnik
Date: 2008-10-25 20:27:59 +0000 (Sat, 25 Oct 2008)
Log Message:
-----------
Little bugfix in getTemplates(), it returned only the first 10 templates, now all
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2008-10-25 16:16:12 UTC (rev 6019)
+++ trunk/pywikipedia/wikipedia.py 2008-10-25 20:27:59 UTC (rev 6020)
@@ -921,11 +921,15 @@
It works through the APIs.
If no templates found, returns None.
+
+ Note: It returns "only" the first 5000 templates, if there
+ are more, they won't be returned, sorry.
"""
params = {
'action' :'query',
'prop' :'templates',
'titles' :self.title(),
+ 'tllimit' :5000
}
data = query.GetData(params,
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Haven't tested it, but it probably only works for flagged bots. Non
flagged bots have a limit of 500. A proper query-continue should be
used.
Bryan