From fd65c1292179fb082e965a1ee6a88b9298a54fc1 Mon Sep 17 00:00:00 2001 From: marc Date: Wed, 1 Mar 2017 17:11:51 -0600 Subject: make search language handling less strict languages.py can change, so users may query on a language that is not on the list anymore, even if it is still recognized by a few engines. also made no and nb the same because they seem to return the same, though most engines will only support one or the other. --- searx/engines/bing.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'searx/engines/bing.py') diff --git a/searx/engines/bing.py b/searx/engines/bing.py index 15c8ee611..4e7ead82d 100644 --- a/searx/engines/bing.py +++ b/searx/engines/bing.py @@ -94,6 +94,8 @@ def _fetch_supported_languages(resp): options = dom.xpath('//div[@id="limit-languages"]//input') for option in options: code = option.xpath('./@id')[0].replace('_', '-') + if code == 'nb': + code = 'no' supported_languages.append(code) return supported_languages -- cgit v1.2.3