summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-19 23:04:09 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-19 23:04:09 +0100
commitf6f9af457720bae6fd148f08feeb8ea043f32bd4 (patch)
treea014811c34ef7f207d3669a5733fcfb0f630cae4
parent4f4cb1caca37c28cd8a8e58e259d41569d3290a7 (diff)
downloadsearxng-f6f9af457720bae6fd148f08feeb8ea043f32bd4.tar.gz
searxng-f6f9af457720bae6fd148f08feeb8ea043f32bd4.zip
[mod] favicon mods
-rw-r--r--searx/webapp.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 52398801e..2a0ce1d8e 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -38,6 +38,11 @@ app = Flask(__name__)
app.secret_key = settings['server']['secret_key']
+#TODO configurable via settings.yml
+favicons = ['wikipedia', 'youtube', 'vimeo', 'soundcloud',
+ 'twitter', 'stackoverflow', 'github']
+
+
opensearch_xml = '''<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>searx</ShortName>
@@ -136,7 +141,7 @@ def index():
result['pretty_url'] = result['url']
for engine in result['engines']:
- if engine in ['wikipedia', 'youtube', 'vimeo', 'soundcloud', 'twitter', 'stackoverflow', 'github']:
+ if engine in favicons:
result['favicon'] = engine
if request_data.get('format') == 'json':
@@ -168,7 +173,7 @@ def index():
,q=request_data['q']
,selected_categories=selected_categories
,number_of_results=len(results)+len(featured_results)
- ,featured_results=featured_results
+ ,featured_results=featured_results
,suggestions=suggestions
)