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
[upd] wikipedia engine: return an empty result on query with illegal characters
Alexandre Flament7d6e69e2f9c1
diff --git a/searx/engines/wikipedia.py b/searx/engines/wikipedia.pyindex c8e589e64..2adfefa69 100644--- a/searx/engines/wikipedia.py+++ b/searx/engines/wikipedia.py@@ -56,6 +56,17 @@ def request(query, params):def response(resp):if resp.status_code == 404:return []++ if resp.status_code == 400:+ try:+ api_result = loads(resp.text)+ except:+ pass+ else:+ if api_result['type'] == 'https://mediawiki.org/wiki/HyperSwitch/errors/bad_request' \+ and api_result['detail'] == 'title-invalid-characters':+ return []+raise_for_httperror(resp)results = []