diff --git a/searx/engines/mediawiki.py b/searx/engines/mediawiki.py index d4b3fd843..19b4406b5 100644 --- a/searx/engines/mediawiki.py +++ b/searx/engines/mediawiki.py @@ -14,5 +14,13 @@ def request(query, params): def response(resp): search_results = loads(resp.text) res = search_results.get('query', {}).get('search', []) + return [{'url': url + 'wiki/' + quote(result['title'].replace(' ', '_').encode('utf-8')), 'title': result['title']} for result in res[:int(number_of_results)]] + + if not len(res): + return results + for result in res[:int(number_of_results)]: + results.append({'url': url + 'wiki/' + quote(result['title'].replace(' ', '_').encode('utf-8')), 'title': result['title'], 'favicon':'wikipedia'}) + return results + diff --git a/searx/static/img/icon_soundcloud.png b/searx/static/img/icon_soundcloud.png new file mode 100644 index 000000000..4130bea1b Binary files /dev/null and b/searx/static/img/icon_soundcloud.png differ diff --git a/searx/static/img/icon_twitter.png b/searx/static/img/icon_twitter.png new file mode 100644 index 000000000..b4a71699a Binary files /dev/null and b/searx/static/img/icon_twitter.png differ diff --git a/searx/static/img/icon_vimeo.png b/searx/static/img/icon_vimeo.png new file mode 100644 index 000000000..4fe4336da Binary files /dev/null and b/searx/static/img/icon_vimeo.png differ diff --git a/searx/static/img/icon_youtube.png b/searx/static/img/icon_youtube.png new file mode 100644 index 000000000..977887dbb Binary files /dev/null and b/searx/static/img/icon_youtube.png differ diff --git a/searx/templates/result_templates/default.html b/searx/templates/result_templates/default.html index 3f2d0f360..14f527361 100644 --- a/searx/templates/result_templates/default.html +++ b/searx/templates/result_templates/default.html @@ -2,7 +2,7 @@ {% if result['favicon'] %}