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] no more redirect ++ explicitly specify search language to avoid googles ip based heuristics
Adam Tauber6d55642ab4bb
diff --git a/searx/engines/google.py b/searx/engines/google.pyindex dbca205a1..313932200 100644--- a/searx/engines/google.py+++ b/searx/engines/google.py@@ -90,7 +90,7 @@ url_map = 'https://www.openstreetmap.org/'\search_path = '/search'search_url = ('https://{hostname}' +search_path +- '?{query}&start={offset}&gbv=1&gws_rd=ssl')+ '?{query}&start={offset}&gws_rd=cr&gbv=1&lr={lang}&ei=x')# other URLsmap_hostname_start = 'maps.google.'@@ -160,6 +160,7 @@ def request(query, params):if params['language'] == 'all':language = 'en'country = 'US'+ url_lang = ''else:language_array = params['language'].lower().split('_')if len(language_array) == 2:@@ -167,6 +168,7 @@ def request(query, params):else:country = 'US'language = language_array[0] + ',' + language_array[0] + '-' + country+ url_lang = 'lang_' + language_array[0]if use_locale_domain:google_hostname = country_to_hostname.get(country.upper(), default_hostname)@@ -175,7 +177,8 @@ def request(query, params):params['url'] = search_url.format(offset=offset,query=urlencode({'q': query}),- hostname=google_hostname)+ hostname=google_hostname,+ lang=url_lang)params['headers']['Accept-Language'] = languageparams['headers']['Accept'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'