diff options
author | a01200356 <a01200356@itesm.mx> | 2015-12-26 22:26:59 -0600 |
---|---|---|
committer | a01200356 <a01200356@itesm.mx> | 2015-12-26 22:26:59 -0600 |
commit | 922565c8a9f1061c8f6bcfa2ea8a11667d111c7c (patch) | |
tree | 59faf0ecdb2ef0317ddf877e21614a791a47dc9b /searx | |
parent | 4578575c284584a58cce0acd85f86bef2f49d77f (diff) | |
download | searxng-922565c8a9f1061c8f6bcfa2ea8a11667d111c7c.tar.gz searxng-922565c8a9f1061c8f6bcfa2ea8a11667d111c7c.zip |
Returns answer rather than results.
More appropriate in this case because it will always give just one
answer.
Diffstat (limited to 'searx')
-rw-r--r-- | searx/engines/wolframalpha_api.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/searx/engines/wolframalpha_api.py b/searx/engines/wolframalpha_api.py index 1cf908b62..8390e91f9 100644 --- a/searx/engines/wolframalpha_api.py +++ b/searx/engines/wolframalpha_api.py @@ -18,16 +18,12 @@ base_url = 'http://api.wolframalpha.com/v2/query' search_url = base_url + '?appid={api_key}&{query}&format=plaintext' site_url = 'http://wolframalpha.com/input/?{query}' -#embedded_url = '<iframe width="540" height="304" ' +\ -# 'data-src="//www.youtube-nocookie.com/embed/{videoid}" ' +\ -# 'frameborder="0" allowfullscreen></iframe>' - # do search-request def request(query, params): params['url'] = search_url.format(query=urlencode({'input': query}), api_key=api_key) - # need this for url in response + need this for url in response global my_query my_query = query @@ -63,8 +59,9 @@ def response(resp): result_url = site_url.format(query=urlencode({'i': my_query})) # append result + # TODO: shouldn't it bind the source too? results.append({'url': result_url, - 'title': result}) + 'answer': result}) # return results return results |