diff options
author | asciimoo <asciimoo@gmail.com> | 2014-01-30 00:01:42 +0100 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2014-01-30 00:01:42 +0100 |
commit | 5d54c7d5001f8a06321f05174b13a5d839ac5240 (patch) | |
tree | 6f4ec09719d97a226a4d68d1ba663b1ab01b3278 /searx/engines/dailymotion.py | |
parent | 39ac89e44289f55813522d360fce1f1a137ac161 (diff) | |
download | searxng-5d54c7d5001f8a06321f05174b13a5d839ac5240.tar.gz searxng-5d54c7d5001f8a06321f05174b13a5d839ac5240.zip |
[enh] paging support for dailymotion
Diffstat (limited to 'searx/engines/dailymotion.py')
-rw-r--r-- | searx/engines/dailymotion.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/searx/engines/dailymotion.py b/searx/engines/dailymotion.py index 510dbbfae..04f77af80 100644 --- a/searx/engines/dailymotion.py +++ b/searx/engines/dailymotion.py @@ -6,16 +6,18 @@ categories = ['videos'] locale = 'en_US' # see http://www.dailymotion.com/doc/api/obj-video.html -search_url = 'https://api.dailymotion.com/videos?fields=title,description,duration,url,thumbnail_360_url&sort=relevance&limit=25&page=1&{query}' # noqa +search_url = 'https://api.dailymotion.com/videos?fields=title,description,duration,url,thumbnail_360_url&sort=relevance&limit=25&page={pageno}&{query}' # noqa # TODO use video result template content_tpl = '<a href="{0}" title="{0}" ><img src="{1}" /></a><br />' +paging = True + def request(query, params): - global search_url params['url'] = search_url.format( - query=urlencode({'search': query, 'localization': locale})) + query=urlencode({'search': query, 'localization': locale}), + pageno=params['pageno']) return params |