summaryrefslogtreecommitdiff
path: root/searx/engines/google_images.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-07-26 00:22:05 +0200
committerAdam Tauber <asciimoo@gmail.com>2016-07-26 00:28:48 +0200
commit350a84520d9da2499ffd5b0fbe6218692f2a330d (patch)
tree03dd22bea46a817084d782feef8df63f8cd2b375 /searx/engines/google_images.py
parent3a8d193d1f746165df35e573f18c7abee970feb0 (diff)
downloadsearxng-350a84520d9da2499ffd5b0fbe6218692f2a330d.tar.gz
searxng-350a84520d9da2499ffd5b0fbe6218692f2a330d.zip
[fix] time range detection
Diffstat (limited to 'searx/engines/google_images.py')
-rw-r--r--searx/engines/google_images.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py
index b687317c8..090d44704 100644
--- a/searx/engines/google_images.py
+++ b/searx/engines/google_images.py
@@ -11,7 +11,6 @@
"""
from urllib import urlencode
-from urlparse import parse_qs
from json import loads
from lxml import html
@@ -39,7 +38,7 @@ def request(query, params):
params['url'] = search_url.format(query=urlencode({'q': query}),
offset=offset,
safesearch=safesearch)
- if params['time_range']:
+ if params['time_range'] in time_range_dict:
params['url'] += time_range_search.format(range=time_range_dict[params['time_range']])
if safesearch and params['safesearch']: