summaryrefslogtreecommitdiff
path: root/searx/results.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/results.py')
-rw-r--r--searx/results.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/results.py b/searx/results.py
index 5bf4e6b9e..fb7e816eb 100644
--- a/searx/results.py
+++ b/searx/results.py
@@ -309,10 +309,11 @@ class ResultContainer:
for res in results:
# FIXME : handle more than one category per engine
- res['category'] = engines[res['engine']].categories[0]
+ engine = engines[res['engine']]
+ res['category'] = engine.categories[0] if len(engine.categories) > 0 else ''
# FIXME : handle more than one category per engine
- category = engines[res['engine']].categories[0]\
+ category = res['category']\
+ ':' + res.get('template', '')\
+ ':' + ('img_src' if 'img_src' in res or 'thumbnail' in res else '')