mirror of
https://github.com/searxng/searxng.git
synced 2026-05-30 22:54:11 +02:00
[mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTION
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
committed by
Markus Heiser
parent
707d6270c8
commit
8205f170ff
@@ -107,7 +107,7 @@ def request(query, params):
|
||||
def response(resp):
|
||||
# get the base URL for the language in which request was made
|
||||
language = locale_to_lang_code(resp.search_params['language'])
|
||||
base_url = get_lang_urls(language)['base']
|
||||
url = get_lang_urls(language)['base']
|
||||
|
||||
results = []
|
||||
|
||||
@@ -116,7 +116,7 @@ def response(resp):
|
||||
# parse results
|
||||
for result in dom.xpath(xpath_results):
|
||||
link = result.xpath(xpath_link)[0]
|
||||
href = urljoin(base_url, link.attrib.get('href'))
|
||||
href = urljoin(url, link.attrib.get('href'))
|
||||
title = extract_text(link)
|
||||
content = extract_text(result.xpath(xpath_content))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user