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
improve https rewrite code
Thomas Pointhuberbb126da0fb49
diff --git a/searx/https_rewrite.py b/searx/https_rewrite.pyindex 814eda2de..18405d87a 100644--- a/searx/https_rewrite.py+++ b/searx/https_rewrite.py@@ -137,3 +137,5 @@ def load_https_rules(rules_path):# append rulesethttps_rules.append(ruleset)++ print(' * {n} https-rules loaded'.format(n=len(https_rules)))diff --git a/searx/webapp.py b/searx/webapp.pyindex d9dc5f710..25c99d94c 100644--- a/searx/webapp.py+++ b/searx/webapp.py@@ -224,10 +224,14 @@ def index():# process rulesfor rule in rules:- # TODO, precompile rule- p = re.compile(rule[0])- # rewrite url if possible- new_result_url = p.sub(rule[1], result['url'])+ try:+ # TODO, precompile rule+ p = re.compile(rule[0])++ # rewrite url if possible+ new_result_url = p.sub(rule[1], result['url'])+ except:+ break# parse new urlnew_parsed_url = urlparse(new_result_url)