瀏覽代碼

- recoll.py: guard access to nres parameter, unpatched recoll-webui

frankdelange 6 年之前
父節點
當前提交
5c8c85276d
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      searx/engines/recoll.py

+ 2
- 1
searx/engines/recoll.py 查看文件

@@ -79,6 +79,7 @@ def response(resp):
79 79
 
80 80
         results.append(item)
81 81
 
82
-    results.append({'number_of_results': response_json['nres']})
82
+    if 'nres' in response_json:
83
+        results.append({'number_of_results': response_json['nres']})
83 84
 
84 85
     return results