diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2023-11-13 19:12:50 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2023-12-03 13:47:17 +0100 |
commit | 2274d55d5a4dea76b645e3495673545fea0fe529 (patch) | |
tree | 9bf3508dea187862996b6a44552182bc8c35e76e /searx/search | |
parent | 1e0813fd3a217fd5f012e17f8fc1386a0a16bf5b (diff) |
[mod] add option max_page
Related: https://github.com/searxng/searxng/issues/2982
Closes: https://github.com/searxng/searxng/issues/2972
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/search')
-rw-r--r-- | searx/search/processors/abstract.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/searx/search/processors/abstract.py b/searx/search/processors/abstract.py index 0cabec97..baa031a0 100644 --- a/searx/search/processors/abstract.py +++ b/searx/search/processors/abstract.py @@ -150,6 +150,11 @@ class EngineProcessor(ABC): if search_query.pageno > 1 and not self.engine.paging: return None + # if max page is reached, skip + max_page = self.engine.max_page or settings['search']['max_page'] + if max_page and max_page < search_query.pageno: + return None + # if time_range is not supported, skip if search_query.time_range and not self.engine.time_range_support: return None |