[mod] add option max_page to bing, brave, qwant, startpage & mojeek

[1] https://github.com/searxng/searxng/issues/2982#issuecomment-1808975780

Reported-by: @Damaj301damaj-lol [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2023-11-14 08:25:06 +01:00 committed by Markus Heiser
parent 2274d55d5a
commit 3829c253ff
5 changed files with 15 additions and 4 deletions

View file

@ -75,6 +75,10 @@ about = {
# engine dependent config
categories = []
paging = True
max_page = 5
"""5 pages maximum (``&p=5``): Trying to do more just results in an improper
redirect"""
qwant_categ = None
"""One of ``web-lite`` (or ``web``), ``news``, ``images`` or ``videos``"""
@ -112,10 +116,6 @@ def request(query, params):
args = {'q': query}
params['raise_for_httperror'] = False
# all qwant engines (incl qwant-lite) delivers only 5 pages maximum
if params['pageno'] > 5:
return None
if qwant_categ == 'web-lite':
url = web_lite_url + '?'