mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTION
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
707d6270c8
commit
8205f170ff
155 changed files with 166 additions and 258 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue