diff options
author | marc <a01200356@itesm.mx> | 2016-12-13 23:51:15 -0600 |
---|---|---|
committer | marc <a01200356@itesm.mx> | 2016-12-13 23:51:15 -0600 |
commit | e0c270bd72f7b2a40222e3ed264e25d36cb0fc30 (patch) | |
tree | 2a0d67f6d5874350baf0ec6733e1e1241df2ad1f /searx/engines | |
parent | 1b46ecd21a15cdea4234a568e9ac973bb6b65b8a (diff) | |
download | searxng-e0c270bd72f7b2a40222e3ed264e25d36cb0fc30.tar.gz searxng-e0c270bd72f7b2a40222e3ed264e25d36cb0fc30.zip |
tests for language support in engines
Diffstat (limited to 'searx/engines')
-rw-r--r-- | searx/engines/.yandex.py.swp | bin | 0 -> 12288 bytes | |||
-rw-r--r-- | searx/engines/duckduckgo.py | 6 | ||||
-rw-r--r-- | searx/engines/subtitleseeker.py | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/searx/engines/.yandex.py.swp b/searx/engines/.yandex.py.swp Binary files differnew file mode 100644 index 000000000..ff2a8f648 --- /dev/null +++ b/searx/engines/.yandex.py.swp diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py index d37d2778b..9cf5fb339 100644 --- a/searx/engines/duckduckgo.py +++ b/searx/engines/duckduckgo.py @@ -53,14 +53,16 @@ def request(query, params): locale = None elif params['language'][:2] == 'ja': locale = 'jp-jp' + elif params['language'][:2] == 'sl': + locale = 'sl-sl' elif params['language'] == 'zh-TW': locale = 'tw-tzh' elif params['language'] == 'zh-HK': locale = 'hk-tzh' elif params['language'][-2:] == 'SA': - locale = 'xa' + params['language'].split('-')[0] + locale = 'xa-' + params['language'].split('-')[0] elif params['language'][-2:] == 'GB': - locale = 'uk' + params['language'].split('-')[0] + locale = 'uk-' + params['language'].split('-')[0] else: locale = params['language'].split('-') if len(locale) == 2: diff --git a/searx/engines/subtitleseeker.py b/searx/engines/subtitleseeker.py index f979d0141..77b010c3f 100644 --- a/searx/engines/subtitleseeker.py +++ b/searx/engines/subtitleseeker.py @@ -46,7 +46,7 @@ def response(resp): # dirty fix for languages named differenly in their site if resp.search_params['language'][:2] == 'fa': search_lang = 'Farsi' - elif resp.search_params['language'] == 'pt_BR': + elif resp.search_params['language'] == 'pt-BR': search_lang = 'Brazilian' elif resp.search_params['language'] != 'all': search_lang = [lc[3] |