diff options
author | asciimoo <asciimoo@gmail.com> | 2014-01-11 11:14:46 +0100 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2014-01-11 11:14:46 +0100 |
commit | 0eb3cdf66405eea67cbcdf903644090bad747d89 (patch) | |
tree | 42beba932a0d6d99035f8152b4ecf6d81d360017 /searx/engines/vimeo.py | |
parent | 6f8daea724238dc74b221f640616ee6f596868a4 (diff) | |
download | searxng-0eb3cdf66405eea67cbcdf903644090bad747d89.tar.gz searxng-0eb3cdf66405eea67cbcdf903644090bad747d89.zip |
[mod] vimeo engine mods
Diffstat (limited to 'searx/engines/vimeo.py')
-rw-r--r-- | searx/engines/vimeo.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/searx/engines/vimeo.py b/searx/engines/vimeo.py index 486c76d40..52c89ffdd 100644 --- a/searx/engines/vimeo.py +++ b/searx/engines/vimeo.py @@ -5,9 +5,13 @@ from lxml import html base_url = 'http://vimeo.com' search_url = base_url + '/search?{query}' +url_xpath = None +content_xpath = None +title_xpath = None +results_xpath = '' -# the cookie set by vime contains all the following values, but only __utma seems to be requiered -Cookie = { +# the cookie set by vimeo contains all the following values, but only __utma seems to be requiered +cookie = { #'vuid':'918282893.1027205400' # 'ab_bs':'%7B%223%22%3A279%7D' '__utma':'00000000.000#0000000.0000000000.0000000000.0000000000.0' @@ -19,14 +23,13 @@ Cookie = { def request(query, params): params['url'] = search_url.format(query=urlencode({'q' :query})) - print params['url'] - params['cookies'] = Cookie + params['cookies'] = cookie return params def response(resp): results = [] dom = html.fromstring(resp.text) - + p = HTMLParser() for result in dom.xpath(results_xpath): |