summaryrefslogtreecommitdiff
path: root/searx/plugins/https_rewrite.py
diff options
context:
space:
mode:
authordalf <alex@al-f.net>2016-10-22 14:01:53 +0200
committerAlexandre Flament <alex@al-f.net>2016-11-02 14:22:16 +0100
commitfbb080f3588ad43bf896a569257f3a95e1181d7b (patch)
tree8852a7af03c4e9bafe65885fae89417d47da7685 /searx/plugins/https_rewrite.py
parent67e11c42b973932c8f568d80a0f25bfd7fc150ab (diff)
downloadsearxng-fbb080f3588ad43bf896a569257f3a95e1181d7b.tar.gz
searxng-fbb080f3588ad43bf896a569257f3a95e1181d7b.zip
Change plugin API :
- pre_search(request, search) - post_search(request, search) - on_result(request, search, result) with - request is the Flask request - search a searx.Search instance - result a searx result as usual
Diffstat (limited to 'searx/plugins/https_rewrite.py')
-rw-r--r--searx/plugins/https_rewrite.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/searx/plugins/https_rewrite.py b/searx/plugins/https_rewrite.py
index 8a9fcd4ad..8b4c9784e 100644
--- a/searx/plugins/https_rewrite.py
+++ b/searx/plugins/https_rewrite.py
@@ -220,8 +220,7 @@ def https_url_rewrite(result):
return result
-def on_result(request, ctx):
- result = ctx['result']
+def on_result(request, search, result):
if result['parsed_url'].scheme == 'http':
https_url_rewrite(result)
return True