From cf8f444e8597bf527ef4bfc691b6d45d5704f77f Mon Sep 17 00:00:00 2001 From: pw3t Date: Sun, 12 Jan 2014 18:31:57 +0100 Subject: [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 --- searx/engines/vimeo.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'searx/engines/vimeo.py') 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 = ' '.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 = ' '.format(url, title, thumbnail) + results.append({'url': url + , 'title': title + , 'content': content + , 'template':'videos.html' + , 'thumbnail': thumbnail}) return results -- cgit v1.2.3-54-g00ecf