[Pywikipedia-l] SVN: [6297] trunk/pywikipedia/wikipedia.py

siebrand at svn.wikimedia.org siebrand at svn.wikimedia.org
Tue Jan 27 08:49:46 UTC 2009


Revision: 6297
Author:   siebrand
Date:     2009-01-27 08:49:45 +0000 (Tue, 27 Jan 2009)

Log Message:
-----------
[ 2485186 ] Support includeredirects="only" for Site().allpages. Contributed by Murph

Modified Paths:
--------------
    trunk/pywikipedia/wikipedia.py

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2009-01-27 08:45:11 UTC (rev 6296)
+++ trunk/pywikipedia/wikipedia.py	2009-01-27 08:49:45 UTC (rev 6297)
@@ -5403,9 +5403,11 @@
             api_url = self.api_address()
             startEncoded = urllib.quote(start.encode(self.encoding()))
             api_url += 'action=query&format=xml&list=allpages&apfrom=%s&aplimit=%i&apnamespace=%i' % (startEncoded, config.special_page_limit, namespace)
-            # TODO: support includeredirects="only" like in the old method
+
             if not includeredirects:
                 api_url += '&apfilterredir=nonredirects'
+            elif includeredirects == 'only':
+                api_url += '&apfilterredir=redirects'
 
             if throttle:
                 get_throttle()





More information about the Pywikipedia-l mailing list