mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 18:42:33 +02:00
[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>
This commit is contained in:
parent
1e0813fd3a
commit
2274d55d5a
8 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue