summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authormarc <a01200356@itesm.mx>2017-10-10 16:52:41 -0500
committermarc <a01200356@itesm.mx>2017-10-10 16:53:28 -0500
commit44085e31d0ccf140f307389bd42654f5ada8667f (patch)
treea1a67f94a2c86b80660e1274d2bf4d564dcdcc4b /searx/engines
parenta524dbb823e88482a762d56ac1ed352641f3f0c3 (diff)
downloadsearxng-44085e31d0ccf140f307389bd42654f5ada8667f.tar.gz
searxng-44085e31d0ccf140f307389bd42654f5ada8667f.zip
update engines_languages.json and languages.py
Also, fix fetch_languages.py so it can run on python3.
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/duckduckgo.py2
-rw-r--r--searx/engines/swisscows.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py
index 407d731f0..921e29f8b 100644
--- a/searx/engines/duckduckgo.py
+++ b/searx/engines/duckduckgo.py
@@ -134,4 +134,4 @@ def _fetch_supported_languages(resp):
regions_json = loads(response_page)
supported_languages = map((lambda x: x[3:] + '-' + x[:2].upper()), regions_json.keys())
- return supported_languages
+ return list(supported_languages)
diff --git a/searx/engines/swisscows.py b/searx/engines/swisscows.py
index e9c13ca24..00346a7d0 100644
--- a/searx/engines/swisscows.py
+++ b/searx/engines/swisscows.py
@@ -118,7 +118,7 @@ def _fetch_supported_languages(resp):
dom = fromstring(resp.text)
options = dom.xpath('//div[@id="regions-popup"]//ul/li/a')
for option in options:
- code = option.xpath('./@data-val')[0]
+ code = option.xpath('./@data-search-language')[0]
if code.startswith('nb-'):
code = code.replace('nb', 'no', 1)
supported_languages.append(code)