Revision: 8148 Author: xqt Date: 2010-05-06 05:46:59 +0000 (Thu, 06 May 2010)
Log Message: ----------- distinguish parameter from module name, bugfix for r7988
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2010-05-05 15:26:49 UTC (rev 8147) +++ trunk/pywikipedia/wikipedia.py 2010-05-06 05:46:59 UTC (rev 8148) @@ -5683,8 +5683,7 @@
self._getUserDataOld(text, sysop = sysop, force = force)
- - def search(self, query, number = 10, namespaces = None): + def search(self, key, number = 10, namespaces = None): """ Yield search results for query. Use API when enabled use_api and version >= 1.11, @@ -5695,7 +5694,7 @@ params = { 'action': 'query', 'list': 'search', - 'srsearch': q, + 'srsearch': key, 'srlimit': number } if namespaces: @@ -5716,7 +5715,7 @@ else: #Yield search results (using Special:Search page) for query. throttle = True - path = self.search_address(urllib.quote_plus(query.encode('utf-8')), + path = self.search_address(urllib.quote_plus(key.encode('utf-8')), n=number, ns=namespaces) get_throttle() html = self.getUrl(path)
pywikipedia-svn@lists.wikimedia.org