summaryrefslogtreecommitdiff
path: root/searx/engines/deviantart.py
diff options
context:
space:
mode:
authorNoémi Ványi <sitbackandwait@gmail.com>2016-12-11 16:41:14 +0100
committerNoémi Ványi <sitbackandwait@gmail.com>2016-12-11 16:58:31 +0100
commitb034356825420507c9fb7ee2dc100676a88cf6c7 (patch)
tree82f90b1e406ffda0276d2918b1b86c3589e50012 /searx/engines/deviantart.py
parentc59c76e6ee14f0417ad55ecf0f888f62f34f1f6d (diff)
downloadsearxng-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/deviantart.py')
-rw-r--r--searx/engines/deviantart.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/engines/deviantart.py b/searx/engines/deviantart.py
index d893fc7fe..a24b75b8a 100644
--- a/searx/engines/deviantart.py
+++ b/searx/engines/deviantart.py
@@ -34,6 +34,9 @@ time_range_dict = {'day': 11,
# 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) * 24
params['url'] = search_url.format(offset=offset,