summaryrefslogtreecommitdiff
path: root/searx/engines/vimeo.py
diff options
context:
space:
mode:
authorpw3t <romain@berthor.fr>2014-01-12 18:31:57 +0100
committerpw3t <romain@berthor.fr>2014-01-16 22:03:43 +0100
commitcf8f444e8597bf527ef4bfc691b6d45d5704f77f (patch)
tree6ae1cff9ae2e888251df151f97d882a1fe9008a9 /searx/engines/vimeo.py
parentad72c16050932ac5c71e27e4199582b5de38b561 (diff)
downloadsearxng-cf8f444e8597bf527ef4bfc691b6d45d5704f77f.tar.gz
searxng-cf8f444e8597bf527ef4bfc691b6d45d5704f77f.zip
[ehn] Add a 'featured result feature'm putting on top of the reasults ddg definitions and wikipedia (ugly html / css)
[ehn] Add a templates for videos, so the thumbnails all have the same side
Diffstat (limited to 'searx/engines/vimeo.py')
-rw-r--r--searx/engines/vimeo.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/searx/engines/vimeo.py b/searx/engines/vimeo.py
index 52c89ffdd..35bc3d50a 100644
--- a/searx/engines/vimeo.py
+++ b/searx/engines/vimeo.py
@@ -35,7 +35,11 @@ def response(resp):
for result in dom.xpath(results_xpath):
url = base_url + result.xpath(url_xpath)[0]
title = p.unescape(extract_text(result.xpath(title_xpath)))
- content = '<a href="{0}"> <img src="{2}"/> </a>'.format(url, title, extract_text(result.xpath(content_xpath)[0]))
- results.append({'url': url, 'title': title, 'content': content})
-
+ thumbnail = extract_text(result.xpath(content_xpath)[0])
+ content = '<a href="{0}"> <img src="{2}"/> </a>'.format(url, title, thumbnail)
+ results.append({'url': url
+ , 'title': title
+ , 'content': content
+ , 'template':'videos.html'
+ , 'thumbnail': thumbnail})
return results