summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-06-15 04:43:15 -0400
committerAdam Tauber <asciimoo@gmail.com>2015-06-15 04:43:15 -0400
commitc9b8c7f8deffce93b920273171a4f8f9d6339ea7 (patch)
tree8ff700730767bd681cdeb0d6bd2b8993d2c412eb /searx/engines
parent1b77befe1fb1dbf82f99db69f857d21a7f0fdd6e (diff)
parent0a1a3e7371df02580ad923fa0a4c1f4a7c08d759 (diff)
Merge pull request #370 from Cqoicebordel/fix_vimeo
Fix vimeo
Diffstat (limited to 'searx/engines')
-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)