浏览代码

Make wolframalpha_noapi.py flake8 compliant

a01200356 9 年前
父节点
当前提交
5ed8f4da80
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4
    4
      searx/engines/wolframalpha_noapi.py

+ 4
- 4
searx/engines/wolframalpha_noapi.py 查看文件

3
 # @website     http://www.wolframalpha.com/
3
 # @website     http://www.wolframalpha.com/
4
 #
4
 #
5
 # @using-api   no
5
 # @using-api   no
6
-# @results     HTML, JS
6
+# @results     HTML
7
 # @stable      no
7
 # @stable      no
8
 # @parse       answer
8
 # @parse       answer
9
 
9
 
26
 # get response from search-request
26
 # get response from search-request
27
 def response(resp):
27
 def response(resp):
28
     results = []
28
     results = []
29
-    
29
+
30
     # the answer is inside a js function
30
     # the answer is inside a js function
31
     # answer can be located in different 'pods', although by default it should be in pod_0200
31
     # answer can be located in different 'pods', although by default it should be in pod_0200
32
     possible_locations = ['pod_0200\.push(.*)\n',
32
     possible_locations = ['pod_0200\.push(.*)\n',
44
         return results
44
         return results
45
 
45
 
46
     # extract answer from json
46
     # extract answer from json
47
-    answer = line[line.find('{') : line.rfind('}')+1]
47
+    answer = line[line.find('{'):line.rfind('}')+1]
48
     answer = json.loads(answer.encode('unicode-escape'))
48
     answer = json.loads(answer.encode('unicode-escape'))
49
     answer = answer['stringified'].decode('unicode-escape')
49
     answer = answer['stringified'].decode('unicode-escape')
50
 
50
 
51
     results.append({'answer': answer})
51
     results.append({'answer': answer})
52
-    
52
+
53
     return results
53
     return results