summaryrefslogtreecommitdiff
path: root/searx/engines/vimeo.py
diff options
context:
space:
mode:
authorCqoicebordel <Cqoicebordel@users.noreply.github.com>2015-06-12 19:53:38 +0200
committerCqoicebordel <Cqoicebordel@users.noreply.github.com>2015-06-12 19:53:38 +0200
commitab273e2faaa0ad157443ffe0b09194fad17ad743 (patch)
treeca90cb996eb191acd044afad271bb0d9b511e8dc /searx/engines/vimeo.py
parentf2cbefeb54164fb659c5901269d0210ad682861c (diff)
downloadsearxng-ab273e2faaa0ad157443ffe0b09194fad17ad743.tar.gz
searxng-ab273e2faaa0ad157443ffe0b09194fad17ad743.zip
Fix Vimeo engine.
Solve #368
Diffstat (limited to 'searx/engines/vimeo.py')
-rw-r--r--searx/engines/vimeo.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/searx/engines/vimeo.py b/searx/engines/vimeo.py
index 0dcc65b7c..517ac1c44 100644
--- a/searx/engines/vimeo.py
+++ b/searx/engines/vimeo.py
@@ -27,11 +27,11 @@ base_url = 'https://vimeo.com'
search_url = base_url + '/search/page:{pageno}?{query}'
# specific xpath variables
-results_xpath = '//div[@id="browse_content"]/ol/li'
-url_xpath = './a/@href'
-title_xpath = './a/div[@class="data"]/p[@class="title"]'
-content_xpath = './a/img/@src'
-publishedDate_xpath = './/p[@class="meta"]//attribute::datetime'
+results_xpath = '//div[contains(@class,"results_grid")]/ul/li'
+url_xpath = './/a/@href'
+title_xpath = './/span[@class="title"]'
+thumbnail_xpath = './/img[@class="js-clip_thumbnail_image"]/@src'
+publishedDate_xpath = './/time/attribute::datetime'
embedded_url = '<iframe data-src="//player.vimeo.com/video{videoid}" ' +\
'width="540" height="304" frameborder="0" ' +\
@@ -58,7 +58,7 @@ def response(resp):
videoid = result.xpath(url_xpath)[0]
url = base_url + videoid
title = p.unescape(extract_text(result.xpath(title_xpath)))
- thumbnail = extract_text(result.xpath(content_xpath)[0])
+ thumbnail = extract_text(result.xpath(thumbnail_xpath)[0])
publishedDate = parser.parse(extract_text(result.xpath(publishedDate_xpath)[0]))
embedded = embedded_url.format(videoid=videoid)