This:
import wikipedia s = wikipedia.getSite("pl", "wikipedia") for i in s.search(u"Lech Wałęsa"): print i
results in:
Traceback (most recent call last): File "search.py", line 5, in <module> for i in s.search(u"Lech Wałęsa"): File "/home/admini/saper/wikipedia/pywikipedia/wikipedia.py", line 5698, in search 'srsearch': q, NameError: global name 'q' is not defined
Fix:
Index: wikipedia.py =================================================================== --- wikipedia.py (revision 8147) +++ wikipedia.py (working copy) @@ -5684,7 +5684,7 @@ self._getUserDataOld(text, sysop = sysop, force = force)
- def search(self, query, number = 10, namespaces = None): + def search(self, q, number = 10, namespaces = None): """ Yield search results for query. Use API when enabled use_api and version >= 1.11,
Can I have a commit bit to fix all those funny things from time to time?