summaryrefslogtreecommitdiff
path: root/searx/engines/xpath.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-05-17 15:04:55 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2021-05-17 15:04:55 +0200
commitffcebf5e1260ec6c468efce78ec3fbccb114ba3f (patch)
tree7df9d87e5f099518376ac3f1ef53643a78ff6fef /searx/engines/xpath.py
parent1970d28a60f9727f889362ff1ca2206e7210268b (diff)
[enh] xpath engine - add request parameter 'soft_max_redirects'
Make 'soft_max_redirects' configurable per Xpath engine:: - name : <engine-name> engine : xpath soft_max_redirects: 1 ... Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/xpath.py')
-rw-r--r--searx/engines/xpath.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py
index 612f69abd..b215c2ba1 100644
--- a/searx/engines/xpath.py
+++ b/searx/engines/xpath.py
@@ -14,6 +14,7 @@ suggestion_xpath = ''
results_xpath = ''
cached_xpath = ''
cached_url = ''
+soft_max_redirects = 0
# parameters for engines with paging support
#
@@ -33,6 +34,7 @@ def request(query, params):
params['url'] = search_url.format(**fp)
params['query'] = query
+ params['soft_max_redirects'] = soft_max_redirects
return params