summaryrefslogtreecommitdiff
path: root/searx/engines/wolframalpha_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/wolframalpha_api.py')
-rw-r--r--searx/engines/wolframalpha_api.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/searx/engines/wolframalpha_api.py b/searx/engines/wolframalpha_api.py
index d4127be4c..540d81351 100644
--- a/searx/engines/wolframalpha_api.py
+++ b/searx/engines/wolframalpha_api.py
@@ -52,12 +52,13 @@ def response(resp):
if search_results.xpath(failure_xpath):
return []
- # parse answer
- answer = search_results.xpath(answer_xpath)
- if answer:
- answer = replace_pua_chars(answer[0].text)
+ # parse answers
+ answers = search_results.xpath(answer_xpath)
+ if answers:
+ for answer in answers:
+ answer = replace_pua_chars(answer.text)
- results.append({'answer': answer})
+ results.append({'answer': answer})
# TODO: append a result with title and link, like in the no api version