Ver código fonte

[fix] wikipedia autocompleter url param

Adam Tauber 10 anos atrás
pai
commit
b422788eb4
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      searx/autocomplete.py

+ 1
- 1
searx/autocomplete.py Ver arquivo

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