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] handle /sorry redirects
Adam Tauber1613c6319eed
diff --git a/searx/engines/google.py b/searx/engines/google.pyindex de2717d81..363b7fb6f 100644--- a/searx/engines/google.py+++ b/searx/engines/google.py@@ -9,6 +9,7 @@# @parse url, title, content, suggestionimport re+from flask_babel import gettextfrom lxml import html, etreefrom searx.engines.xpath import extract_text, extract_urlfrom searx import logger@@ -209,6 +210,9 @@ def response(resp):if resp_url.netloc == 'sorry.google.com' or resp_url.path == '/sorry/IndexRedirect':raise RuntimeWarning('sorry.google.com')+ if resp_url.path.startswith('/sorry'):+ raise RuntimeWarning(gettext('CAPTCHA required'))+# which hostname ?google_hostname = resp.search_params.get('google_hostname')google_url = "https://" + google_hostname