summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-05-28 15:21:01 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2020-05-28 15:21:01 +0200
commit57c7b90edd30ad0d24231a7e338c770c09de2dd4 (patch)
treeb57048aa43343ad60bc760eeda61dfa4be779e9a
parent151038255810ed972187ee5d7921e3f044557665 (diff)
[fix] gigablast does no longer support *supported_languages_url*
Since there are zero results, we can remove it: $ make engines.languages fetch languages .. ... fetched 0 languages from engine gigablast Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
-rw-r--r--searx/engines/gigablast.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/searx/engines/gigablast.py b/searx/engines/gigablast.py
index 607bbfcb3..a71dd1161 100644
--- a/searx/engines/gigablast.py
+++ b/searx/engines/gigablast.py
@@ -41,8 +41,6 @@ url_xpath = './/url'
title_xpath = './/title'
content_xpath = './/sum'
-supported_languages_url = 'https://gigablast.com/search?&rxikd=1'
-
extra_param = '' # gigablast requires a random extra parameter
# which can be extracted from the source code of the search page
@@ -108,21 +106,3 @@ def response(resp):
# return results
return results
-
-
-# get supported languages from their site
-def _fetch_supported_languages(resp):
- supported_languages = []
- dom = fromstring(resp.text)
- links = eval_xpath(dom, '//span[@id="menu2"]/a')
- for link in links:
- href = eval_xpath(link, './@href')[0].split('lang%3A')
- if len(href) == 2:
- code = href[1].split('_')
- if len(code) == 2:
- code = code[0] + '-' + code[1].upper()
- else:
- code = code[0]
- supported_languages.append(code)
-
- return supported_languages