mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
fix(google_cs): Don't throw error when the result count overflow
This commit is contained in:
parent
80d79a85aa
commit
7db1b382b8
1 changed files with 1 additions and 8 deletions
|
@ -164,7 +164,7 @@ def request(query, params):
|
|||
start = (params['pageno'] * number_of_results) + 1
|
||||
|
||||
if start > MAX_SEARCH_RESULT:
|
||||
raise PageTooLargeException
|
||||
return params
|
||||
|
||||
query = {
|
||||
'key': api_key,
|
||||
|
@ -232,10 +232,3 @@ def _convert_result(search, search_type=''):
|
|||
out['url'] = search['image']['contextLink']
|
||||
|
||||
return out
|
||||
|
||||
|
||||
class PageTooLargeException(SearxEngineAPIException):
|
||||
"""Requested page size is over Google's maximum limit"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__('Page size too large')
|
||||
|
|
Loading…
Add table
Reference in a new issue