on master help sign in
Make wolframalpha_noapi.py flake8 compliant
commit5ed8f4da80ecd119173d7db871256be8484a9ecb authora01200356 <a01200356@itesm.mx> dateTue 29 Dec 2015, 21:37 (11 years ago) parentd827fc4
1 file changed+4−4
searx/engines/wolframalpha_noapi.py+4−4
searx/engines/wolframalpha_noapi.py+4−4
@@ -3,7 +3,7 @@
33# @website http://www.wolframalpha.com/
44#
55# @using-api no
6−# @results HTML, JS
6+# @results HTML
77# @stable no
88# @parse answer
99
@@ -26,7 +26,7 @@ def request(query, params):
2626# get response from search-request
2727def response(resp):
2828 results = []
29−
29+
3030 # the answer is inside a js function
3131 # answer can be located in different 'pods', although by default it should be in pod_0200
3232 possible_locations = ['pod_0200\.push(.*)\n',
@@ -44,10 +44,10 @@ def response(resp):
4444 return results
4545
4646 # extract answer from json
47− answer = line[line.find('{') : line.rfind('}')+1]
47+ answer = line[line.find('{'):line.rfind('}')+1]
4848 answer = json.loads(answer.encode('unicode-escape'))
4949 answer = answer['stringified'].decode('unicode-escape')
5050
5151 results.append({'answer': answer})
52−
52+
5353 return results