on master help sign in
[mod] vimeo engine mods
commit0eb3cdf66405eea67cbcdf903644090bad747d89 authorasciimoo <asciimoo@gmail.com> dateSat 11 Jan 2014, 11:14 (13 years ago) parent6f8daea
1 file changed+8−5
searx/engines/vimeo.py+8−5
searx/engines/vimeo.py+8−5
@@ -5,9 +5,13 @@ from lxml import html
55
66base_url = 'http://vimeo.com'
77search_url = base_url + '/search?{query}'
8+url_xpath = None
9+content_xpath = None
10+title_xpath = None
11+results_xpath = ''
812
9−# the cookie set by vime contains all the following values, but only __utma seems to be requiered
10−Cookie = {
13+# the cookie set by vimeo contains all the following values, but only __utma seems to be requiered
14+cookie = {
1115 #'vuid':'918282893.1027205400'
1216 # 'ab_bs':'%7B%223%22%3A279%7D'
1317 '__utma':'00000000.000#0000000.0000000000.0000000000.0000000000.0'
@@ -19,14 +23,13 @@ Cookie = {
1923
2024def request(query, params):
2125 params['url'] = search_url.format(query=urlencode({'q' :query}))
22− print params['url']
23− params['cookies'] = Cookie
26+ params['cookies'] = cookie
2427 return params
2528
2629def response(resp):
2730 results = []
2831 dom = html.fromstring(resp.text)
29−
32+
3033 p = HTMLParser()
3134
3235 for result in dom.xpath(results_xpath):