[fix] wikipedia autocompleter url param

This commit is contained in:
Adam Tauber 2014-11-04 19:53:42 +01:00
parent ee8cabf496
commit b422788eb4

View File

@ -69,7 +69,7 @@ def wikipedia(query):
# wikipedia autocompleter
url = 'https://en.wikipedia.org/w/api.php?action=opensearch&{0}&limit=10&namespace=0&format=json' # noqa
resp = loads(get(url.format(urlencode(dict(q=query)))).text)
resp = loads(get(url.format(urlencode(dict(search=query)))).text)
if len(resp) > 1:
return resp[1]
return []