From aa227180e2e7b720d932d75d6fc86fb7417ef158 Mon Sep 17 00:00:00 2001 From: Noemi Vanyi Date: Sat, 27 Aug 2016 16:45:25 +0200 Subject: remove self info answers from pages after first one --- searx/plugins/self_info.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'searx') diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py index 75cbae0de..438274c41 100644 --- a/searx/plugins/self_info.py +++ b/searx/plugins/self_info.py @@ -29,6 +29,8 @@ p = re.compile('.*user[ -]agent.*', re.IGNORECASE) # request: flask request object # ctx: the whole local context of the pre search hook def post_search(request, ctx): + if ctx['search'].pageno > 1: + return True if ctx['search'].query == 'ip': x_forwarded_for = request.headers.getlist("X-Forwarded-For") if x_forwarded_for: -- cgit v1.2.3-54-g00ecf