on master help sign in
[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>

commit57c7b90edd30ad0d24231a7e338c770c09de2dd4 authorMarkus Heiser <markus.heiser@darmarit.de> dateThu 28 May 2020, 15:21 (6 years ago) parent1510382
1 file changed−20
searx/engines/gigablast.py−20
searx/engines/gigablast.py−20
@@ -41,8 +41,6 @@ url_xpath = './/url'
4141title_xpath = './/title'
4242content_xpath = './/sum'
4343
44−supported_languages_url = 'https://gigablast.com/search?&rxikd=1'
45−
4644extra_param = '' # gigablast requires a random extra parameter
4745# which can be extracted from the source code of the search page
4846
@@ -108,21 +106,3 @@ def response(resp):
108106
109107 # return results
110108 return results
111−
112−
113−# get supported languages from their site
114−def _fetch_supported_languages(resp):
115− supported_languages = []
116− dom = fromstring(resp.text)
117− links = eval_xpath(dom, '//span[@id="menu2"]/a')
118− for link in links:
119− href = eval_xpath(link, './@href')[0].split('lang%3A')
120− if len(href) == 2:
121− code = href[1].split('_')
122− if len(code) == 2:
123− code = code[0] + '-' + code[1].upper()
124− else:
125− code = code[0]
126− supported_languages.append(code)
127−
128− return supported_languages