mirror of
https://github.com/searxng/searxng.git
synced 2024-12-23 09:46:31 +00:00
[enh] paging support for google images
This commit is contained in:
parent
89b676ea6f
commit
8b4d445c42
1 changed files with 4 additions and 2 deletions
|
@ -6,11 +6,13 @@ 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}' # noqa
|
||||
search_url = url + 'ajax/services/search/images?v=1.0&start={offset}&rsz=large&safe=off&filter=off&{query}' # noqa
|
||||
|
||||
|
||||
def request(query, params):
|
||||
params['url'] = search_url.format(query=urlencode({'q': query}))
|
||||
offset = (params['pageno'] - 1) * 8
|
||||
params['url'] = search_url.format(query=urlencode({'q': query}),
|
||||
offset=offset)
|
||||
return params
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue