|
@@ -23,7 +23,7 @@ if __name__ == "__main__":
|
23
|
23
|
path.append(realpath(dirname(realpath(__file__))+'/../'))
|
24
|
24
|
|
25
|
25
|
from flask import Flask, request, render_template, url_for, Response, make_response
|
26
|
|
-from searx.engines import search, categories
|
|
26
|
+from searx.engines import search, categories, get_engines_stats
|
27
|
27
|
from searx import settings
|
28
|
28
|
import json
|
29
|
29
|
|
|
@@ -105,6 +105,12 @@ def about():
|
105
|
105
|
global categories
|
106
|
106
|
return render('about.html', categs=categories.items())
|
107
|
107
|
|
|
108
|
+@app.route('/stats', methods=['GET'])
|
|
109
|
+def stats():
|
|
110
|
+ global categories
|
|
111
|
+ stats = get_engines_stats()
|
|
112
|
+ return render('stats.html', stats=stats)
|
|
113
|
+
|
108
|
114
|
@app.route('/opensearch.xml', methods=['GET'])
|
109
|
115
|
def opensearch():
|
110
|
116
|
global opensearch_xml
|