summaryrefslogtreecommitdiff
path: root/searx/engines/google_images.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-20 02:31:20 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-20 02:31:20 +0100
commitb2492c94f422e18cb8954ec983134f4fa5c7cdc0 (patch)
tree969ea30e5dc642d896fa7b744571110ebfe13e7a /searx/engines/google_images.py
parent692c0bf5f0b353bfbb46aaee1af54afb164dedbc (diff)
downloadsearxng-b2492c94f422e18cb8954ec983134f4fa5c7cdc0.tar.gz
searxng-b2492c94f422e18cb8954ec983134f4fa5c7cdc0.zip
[fix] pep/flake8 compatibility
Diffstat (limited to 'searx/engines/google_images.py')
-rw-r--r--searx/engines/google_images.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py
index d828a9c4b..57e749265 100644
--- a/searx/engines/google_images.py
+++ b/searx/engines/google_images.py
@@ -6,12 +6,14 @@ from json import loads
categories = ['images']
url = 'https://ajax.googleapis.com/'
-search_url = url + 'ajax/services/search/images?v=1.0&start=0&rsz=large&safe=off&filter=off&{query}'
+search_url = url + 'ajax/services/search/images?v=1.0&start=0&rsz=large&safe=off&filter=off&{query}' # noqa
+
def request(query, params):
params['url'] = search_url.format(query=urlencode({'q': query}))
return params
+
def response(resp):
results = []
search_res = loads(resp.text)
@@ -24,5 +26,9 @@ def response(resp):
title = result['title']
if not result['url']:
continue
- results.append({'url': href, 'title': title, 'content': '', 'img_src': result['url'], 'template': 'images.html'})
+ results.append({'url': href,
+ 'title': title,
+ 'content': '',
+ 'img_src': result['url'],
+ 'template': 'images.html'})
return results