add year filter to engines with time range support && tests

Following engines does not support "Last year":
 * Bing News
 * DeviantArt
 * DuckDuckGo
 * Yahoo
 * YouTube (noapi)
This commit is contained in:
Noémi Ványi 2016-12-11 16:41:14 +01:00
parent c59c76e6ee
commit b034356825
9 changed files with 43 additions and 2 deletions

View file

@ -77,6 +77,9 @@ def _get_language(params):
# do search-request
def request(query, params):
if params['time_range'] and params['time_range'] not in time_range_dict:
return params
offset = (params['pageno'] - 1) * 10 + 1
language = _get_language(params)