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
[enh] better search language selection from query
asciimoo7c031a3ea639
diff --git a/searx/search.py b/searx/search.pyindex 09ec14f05..79a82f0b1 100644--- a/searx/search.py+++ b/searx/search.py@@ -79,11 +79,20 @@ class Search(object):modified = Falseif query_parts[0].startswith(':'):lang = query_parts[0][1:]- if lang in (x[0] for x in language_codes):- self.lang = lang- modified = True++ for lc in language_codes:+ lang_id, lang_name, country = map(str.lower, lc)+ if lang == lang_id\+ or lang_id.startswith(lang)\+ or lang == lang_name\+ or lang == country:+ self.lang = lang+ modified = True+ break+elif query_parts[0].startswith('!'):prefix = query_parts[0][1:].replace('_', ' ')+if prefix in engine_shortcuts\and not engine_shortcuts[prefix] in self.blocked_engines:modified = True