SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] never pass bangs to autocomplete suggestions
Marc Abonce Seguin40272b0044a2
diff --git a/searx/autocomplete.py b/searx/autocomplete.pyindex f8a45b3ec..ff8958500 100644--- a/searx/autocomplete.py+++ b/searx/autocomplete.py@@ -16,6 +16,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.'''+import sysfrom lxml import etreefrom json import loadsfrom searx import settings@@ -26,6 +27,9 @@ from searx.engines import (from searx.poolrequests import get as http_getfrom searx.url_utils import urlencode+if sys.version_info[0] == 3:+ unicode = str+def get(*args, **kwargs):if 'timeout' not in kwargs:diff --git a/searx/webapp.py b/searx/webapp.pyindex 8290b6822..dd4c84098 100644--- a/searx/webapp.py+++ b/searx/webapp.py@@ -636,8 +636,11 @@ def autocompleter():# parse searx specific autocompleter results like !bangraw_results = searx_bang(raw_text_query)- # normal autocompletion results only appear if max 3 inner results returned- if len(raw_results) <= 3 and completer:+ # normal autocompletion results only appear if no inner results returned+ # and there is a query part besides the engine and language bangs+ if len(raw_results) == 0 and completer and (len(raw_text_query.query_parts) > 1 or+ (len(raw_text_query.languages) == 0 and+ not raw_text_query.specific)):# get language from cookielanguage = request.preferences.get_value('language')if not language or language == 'all':