diff options
Diffstat (limited to 'searx/engines/google.py')
-rw-r--r-- | searx/engines/google.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/searx/engines/google.py b/searx/engines/google.py index c9253c9bf..b90c7adc5 100644 --- a/searx/engines/google.py +++ b/searx/engines/google.py @@ -5,12 +5,16 @@ from json import loads categories = ['general'] +paging = True + url = 'https://ajax.googleapis.com/' -search_url = url + 'ajax/services/search/web?v=1.0&start=0&rsz=large&safe=off&filter=off&{query}' # noqa +search_url = url + 'ajax/services/search/web?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(offset=offset, + query=urlencode({'q': query})) return params |