diff options
author | Noémi Ványi <sitbackandwait@gmail.com> | 2016-12-11 16:41:14 +0100 |
---|---|---|
committer | Noémi Ványi <sitbackandwait@gmail.com> | 2016-12-11 16:58:31 +0100 |
commit | b034356825420507c9fb7ee2dc100676a88cf6c7 (patch) | |
tree | 82f90b1e406ffda0276d2918b1b86c3589e50012 /searx/engines/yahoo.py | |
parent | c59c76e6ee14f0417ad55ecf0f888f62f34f1f6d (diff) | |
download | searxng-b034356825420507c9fb7ee2dc100676a88cf6c7.tar.gz searxng-b034356825420507c9fb7ee2dc100676a88cf6c7.zip |
add year filter to engines with time range support && tests
Following engines does not support "Last year":
* Bing News
* DeviantArt
* DuckDuckGo
* Yahoo
* YouTube (noapi)
Diffstat (limited to 'searx/engines/yahoo.py')
-rw-r--r-- | searx/engines/yahoo.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py index 8e24a283e..2bb34b83d 100644 --- a/searx/engines/yahoo.py +++ b/searx/engines/yahoo.py @@ -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) |