SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] google answers: normalize space of the answers.
Markus Heiser05e90f2e5704
diff --git a/searx/engines/google.py b/searx/engines/google.pyindex 284209523..25adfe4b5 100644--- a/searx/engines/google.py+++ b/searx/engines/google.py@@ -311,9 +311,10 @@ def response(resp):dom = html.fromstring(resp.text)# results --> answer- answer = eval_xpath(dom, '//div[contains(@class, "LGOjhe")]//text()')- if answer:- results.append({'answer': ' '.join(answer)})+ answer_list = eval_xpath(dom, '//div[contains(@class, "LGOjhe")]')+ if answer_list:+ answer_list = [_.xpath("normalize-space()") for _ in answer_list]+ results.append({'answer': ' '.join(answer_list)})else:logger.debug("did not find 'answer'")