From 7db1b382b8ba1a7deb08b1c8c2a07ddde807473b Mon Sep 17 00:00:00 2001 From: Manatsawin Hanmongkolchai Date: Sun, 9 Oct 2022 18:58:15 +0700 Subject: [PATCH] fix(google_cs): Don't throw error when the result count overflow --- searx/engines/google_cs.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/searx/engines/google_cs.py b/searx/engines/google_cs.py index 8666336d0..af7066ba5 100644 --- a/searx/engines/google_cs.py +++ b/searx/engines/google_cs.py @@ -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')