summaryrefslogtreecommitdiff
path: root/searx/engines/dailymotion.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-20 02:31:20 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-20 02:31:20 +0100
commitb2492c94f422e18cb8954ec983134f4fa5c7cdc0 (patch)
tree969ea30e5dc642d896fa7b744571110ebfe13e7a /searx/engines/dailymotion.py
parent692c0bf5f0b353bfbb46aaee1af54afb164dedbc (diff)
downloadsearxng-b2492c94f422e18cb8954ec983134f4fa5c7cdc0.tar.gz
searxng-b2492c94f422e18cb8954ec983134f4fa5c7cdc0.zip
[fix] pep/flake8 compatibility
Diffstat (limited to 'searx/engines/dailymotion.py')
-rw-r--r--searx/engines/dailymotion.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/searx/engines/dailymotion.py b/searx/engines/dailymotion.py
index 7e0c922a9..510dbbfae 100644
--- a/searx/engines/dailymotion.py
+++ b/searx/engines/dailymotion.py
@@ -6,7 +6,10 @@ categories = ['videos']
locale = 'en_US'
# see http://www.dailymotion.com/doc/api/obj-video.html
-search_url = 'https://api.dailymotion.com/videos?fields=title,description,duration,url,thumbnail_360_url&sort=relevance&limit=25&page=1&{query}'
+search_url = 'https://api.dailymotion.com/videos?fields=title,description,duration,url,thumbnail_360_url&sort=relevance&limit=25&page=1&{query}' # noqa
+
+# TODO use video result template
+content_tpl = '<a href="{0}" title="{0}" ><img src="{1}" /></a><br />'
def request(query, params):
@@ -25,7 +28,7 @@ def response(resp):
title = res['title']
url = res['url']
if res['thumbnail_360_url']:
- content = '<a href="{0}" title="{0}" ><img src="{1}" /></a><br />'.format(url, res['thumbnail_360_url'])
+ content = content_tpl.format(url, res['thumbnail_360_url'])
else:
content = ''
if res['description']: