We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Infinite scroll: answer are repeated on each page
How to reproduce : search for ["user agent"](https://searx.me/?q=user+agent) with Infinite scroll activated.

Should the answer be disabled except the first page ? or should Infinite Scroll hide the answer ?

I vote for the first option : disabled answers except on the first page on the server side. 


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `searx/plugins/self_info.py`
Content:
```
1 '''
2 searx is free software: you can redistribute it and/or modify
3 it under the terms of the GNU Affero General Public License as published by
4 the Free Software Foundation, either version 3 of the License, or
5 (at your option) any later version.
6 
7 searx is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 GNU Affero General Public License for more details.
11 
12 You should have received a copy of the GNU Affero General Public License
13 along with searx. If not, see < http://www.gnu.org/licenses/ >.
14 
15 (C) 2015 by Adam Tauber, <asciimoo@gmail.com>
16 '''
17 from flask_babel import gettext
18 import re
19 name = "Self Informations"
20 description = gettext('Displays your IP if the query is "ip" and your user agent if the query contains "user agent".')
21 default_on = True
22 
23 
24 # Self User Agent regex
25 p = re.compile('.*user[ -]agent.*', re.IGNORECASE)
26 
27 
28 # attach callback to the post search hook
29 #  request: flask request object
30 #  ctx: the whole local context of the pre search hook
31 def post_search(request, ctx):
32     if ctx['search'].query == 'ip':
33         x_forwarded_for = request.headers.getlist("X-Forwarded-For")
34         if x_forwarded_for:
35             ip = x_forwarded_for[0]
36         else:
37             ip = request.remote_addr
38         ctx['search'].result_container.answers.clear()
39         ctx['search'].result_container.answers.add(ip)
40     elif p.match(ctx['search'].query):
41         ua = request.user_agent
42         ctx['search'].result_container.answers.clear()
43         ctx['search'].result_container.answers.add(ua)
44     return True
45
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py
--- a/searx/plugins/self_info.py
+++ b/searx/plugins/self_info.py
@@ -29,6 +29,8 @@
 #  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:

{"golden_diff": "diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py\n--- a/searx/plugins/self_info.py\n+++ b/searx/plugins/self_info.py\n@@ -29,6 +29,8 @@\n #  request: flask request object\n #  ctx: the whole local context of the pre search hook\n def post_search(request, ctx):\n+    if ctx['search'].pageno > 1:\n+        return True\n     if ctx['search'].query == 'ip':\n         x_forwarded_for = request.headers.getlist(\"X-Forwarded-For\")\n         if x_forwarded_for:\n", "issue": "Infinite scroll: answer are repeated on each page\nHow to reproduce : search for [\"user agent\"](https://searx.me/?q=user+agent) with Infinite scroll activated.\n\nShould the answer be disabled except the first page ? or should Infinite Scroll hide the answer ?\n\nI vote for the first option : disabled answers except on the first page on the server side. \n\n", "before_files": [{"content": "'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with searx. If not, see < http://www.gnu.org/licenses/ >.\n\n(C) 2015 by Adam Tauber, <asciimoo@gmail.com>\n'''\nfrom flask_babel import gettext\nimport re\nname = \"Self Informations\"\ndescription = gettext('Displays your IP if the query is \"ip\" and your user agent if the query contains \"user agent\".')\ndefault_on = True\n\n\n# Self User Agent regex\np = re.compile('.*user[ -]agent.*', re.IGNORECASE)\n\n\n# attach callback to the post search hook\n#  request: flask request object\n#  ctx: the whole local context of the pre search hook\ndef post_search(request, ctx):\n    if ctx['search'].query == 'ip':\n        x_forwarded_for = request.headers.getlist(\"X-Forwarded-For\")\n        if x_forwarded_for:\n            ip = x_forwarded_for[0]\n        else:\n            ip = request.remote_addr\n        ctx['search'].result_container.answers.clear()\n        ctx['search'].result_container.answers.add(ip)\n    elif p.match(ctx['search'].query):\n        ua = request.user_agent\n        ctx['search'].result_container.answers.clear()\n        ctx['search'].result_container.answers.add(ua)\n    return True\n", "path": "searx/plugins/self_info.py"}], "after_files": [{"content": "'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with searx. If not, see < http://www.gnu.org/licenses/ >.\n\n(C) 2015 by Adam Tauber, <asciimoo@gmail.com>\n'''\nfrom flask_babel import gettext\nimport re\nname = \"Self Informations\"\ndescription = gettext('Displays your IP if the query is \"ip\" and your user agent if the query contains \"user agent\".')\ndefault_on = True\n\n\n# Self User Agent regex\np = re.compile('.*user[ -]agent.*', re.IGNORECASE)\n\n\n# attach callback to the post search hook\n#  request: flask request object\n#  ctx: the whole local context of the pre search hook\ndef post_search(request, ctx):\n    if ctx['search'].pageno > 1:\n        return True\n    if ctx['search'].query == 'ip':\n        x_forwarded_for = request.headers.getlist(\"X-Forwarded-For\")\n        if x_forwarded_for:\n            ip = x_forwarded_for[0]\n        else:\n            ip = request.remote_addr\n        ctx['search'].result_container.answers.clear()\n        ctx['search'].result_container.answers.add(ip)\n    elif p.match(ctx['search'].query):\n        ua = request.user_agent\n        ctx['search'].result_container.answers.clear()\n        ctx['search'].result_container.answers.add(ua)\n    return True\n", "path": "searx/plugins/self_info.py"}]}