mirror of
https://github.com/searxng/searxng.git
synced 2025-12-23 12:10:00 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user