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
Improving Wolfram Alpha search hit content
Lorenzo J. Lucchinia8907224a1c4
diff --git a/searx/engines/wolframalpha_api.py b/searx/engines/wolframalpha_api.pyindex 0e38051d1..e743c8f56 100644--- a/searx/engines/wolframalpha_api.py+++ b/searx/engines/wolframalpha_api.py@@ -18,7 +18,6 @@ api_key = '' # defined in settings.yml# xpath variablesfailure_xpath = '/queryresult[attribute::success="false"]'-answer_xpath = '//pod[attribute::primary="true"]/subpod/plaintext'input_xpath = '//pod[starts-with(attribute::id, "Input")]/subpod/plaintext'pods_xpath = '//pod'subpods_xpath = './subpod'@@ -76,11 +75,11 @@ def response(resp):try:infobox_title = search_results.xpath(input_xpath)[0].textexcept:- infobox_title = None+ infobox_title = ""pods = search_results.xpath(pods_xpath)- result = ""result_chunks = []+ result_content = ""for pod in pods:pod_id = pod.xpath(pod_id_xpath)[0]pod_title = pod.xpath(pod_title_xpath)[0]@@ -97,8 +96,9 @@ def response(resp):if content and pod_id not in image_pods:- if pod_is_result:- result = content+ if pod_is_result or not result_content:+ if pod_id != "Input":+ result_content = "%s: %s" % (pod_title, content)# if no input pod was found, title is first plaintext podif not infobox_title:@@ -115,6 +115,8 @@ def response(resp):if not result_chunks:return []+ title = "Wolfram|Alpha (%s)" % infobox_title+# append infoboxresults.append({'infobox': infobox_title,'attributes': result_chunks,@@ -122,7 +124,7 @@ def response(resp):# append link to siteresults.append({'url': resp.request.headers['Referer'].decode('utf8'),- 'title': infobox_title + ' - Wolfram|Alpha',- 'content': result})+ 'title': title,+ 'content': result_content})return results