mirror of
https://github.com/searxng/searxng.git
synced 2024-11-23 11:21:00 +00:00
[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>
This commit is contained in:
parent
1510382558
commit
57c7b90edd
1 changed files with 0 additions and 20 deletions
|
@ -41,8 +41,6 @@ url_xpath = './/url'
|
||||||
title_xpath = './/title'
|
title_xpath = './/title'
|
||||||
content_xpath = './/sum'
|
content_xpath = './/sum'
|
||||||
|
|
||||||
supported_languages_url = 'https://gigablast.com/search?&rxikd=1'
|
|
||||||
|
|
||||||
extra_param = '' # gigablast requires a random extra parameter
|
extra_param = '' # gigablast requires a random extra parameter
|
||||||
# which can be extracted from the source code of the search page
|
# which can be extracted from the source code of the search page
|
||||||
|
|
||||||
|
@ -108,21 +106,3 @@ def response(resp):
|
||||||
|
|
||||||
# return results
|
# return results
|
||||||
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
|
|
||||||
|
|
Loading…
Reference in a new issue