Loading searx/autocomplete.py +4 −3 Original line number Original line Diff line number Diff line Loading @@ -130,9 +130,10 @@ def duckduckgo(query, lang): # duckduckgo autocompleter # duckduckgo autocompleter url = 'https://ac.duckduckgo.com/ac/?{0}&type=list' url = 'https://ac.duckduckgo.com/ac/?{0}&type=list' resp = loads(get(url.format(urlencode(dict(q=query)))).text) resp = get(url.format(urlencode(dict(q=query)))) if len(resp) > 1: if resp.status_code == 200 and resp.text: return resp[1] res = loads(resp.text) return res[1] if len(res) == 2 else [] return [] return [] Loading searx/settings.yml +2 −0 Original line number Original line Diff line number Diff line Loading @@ -283,10 +283,12 @@ engines: - name : google - name : google engine : google engine : google shortcut : go shortcut : go weight : 5 - name : google images - name : google images engine : google_images engine : google_images shortcut : goi shortcut : goi disabled: True - name : google news - name : google news engine : google_news engine : google_news Loading Loading
searx/autocomplete.py +4 −3 Original line number Original line Diff line number Diff line Loading @@ -130,9 +130,10 @@ def duckduckgo(query, lang): # duckduckgo autocompleter # duckduckgo autocompleter url = 'https://ac.duckduckgo.com/ac/?{0}&type=list' url = 'https://ac.duckduckgo.com/ac/?{0}&type=list' resp = loads(get(url.format(urlencode(dict(q=query)))).text) resp = get(url.format(urlencode(dict(q=query)))) if len(resp) > 1: if resp.status_code == 200 and resp.text: return resp[1] res = loads(resp.text) return res[1] if len(res) == 2 else [] return [] return [] Loading
searx/settings.yml +2 −0 Original line number Original line Diff line number Diff line Loading @@ -283,10 +283,12 @@ engines: - name : google - name : google engine : google engine : google shortcut : go shortcut : go weight : 5 - name : google images - name : google images engine : google_images engine : google_images shortcut : goi shortcut : goi disabled: True - name : google news - name : google news engine : google_news engine : google_news Loading