SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Go to file
Markus Heiser e1f244b2d5 [pylint] webapp.py - fix all messages from pylint
No functional change, just some linting.

- fix messages from pylint (see below)
- log where general Exceptions are catched (broad-except)
- normalized various indentation
- To avoid clashes with common names, add prefix 'route_' to all @app.route
  decorated functions.

Fixed messages::

    searx/webapp.py:744:0: C0301: Line too long (146/120) (line-too-long)
    searx/webapp.py:756:0: C0301: Line too long (132/120) (line-too-long)
    searx/webapp.py:730:9: W0511: TODO, check if timezone is calculated right (fixme)
    searx/webapp.py:1:0: C0114: Missing module docstring (missing-module-docstring)
    searx/webapp.py:126:8: I1101: Module 'setproctitle' has no 'setthreadtitle' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
    searx/webapp.py:126:36: W0212: Access to a protected member _name of a client class (protected-access)
    searx/webapp.py:131:4: R1722: Consider using sys.exit() (consider-using-sys-exit)
    searx/webapp.py:141:4: R1722: Consider using sys.exit() (consider-using-sys-exit)
    searx/webapp.py:255:38: W0621: Redefining name 'request' from outer scope (line 32) (redefined-outer-name)
    searx/webapp.py:307:4: W0702: No exception type(s) specified (bare-except)
    searx/webapp.py:374:24: W0621: Redefining name 'theme' from outer scope (line 155) (redefined-outer-name)
    searx/webapp.py:420:8: R1705: Unnecessary "else" after "return" (no-else-return)
    searx/webapp.py:544:4: W0621: Redefining name 'preferences' from outer scope (line 917) (redefined-outer-name)
    searx/webapp.py:551:4: W0702: No exception type(s) specified (bare-except)
    searx/webapp.py:566:15: W0703: Catching too general exception Exception (broad-except)
    searx/webapp.py:613:4: R1705: Unnecessary "elif" after "return" (no-else-return)
    searx/webapp.py:690:8: W0621: Redefining name 'search' from outer scope (line 661) (redefined-outer-name)
    searx/webapp.py:661:0: R0914: Too many local variables (22/20) (too-many-locals)
    searx/webapp.py:674:8: R1705: Unnecessary "else" after "return" (no-else-return)
    searx/webapp.py:697:11: W0703: Catching too general exception Exception (broad-except)
    searx/webapp.py:748:4: R1705: Unnecessary "elif" after "return" (no-else-return)
    searx/webapp.py:661:0: R0911: Too many return statements (9/6) (too-many-return-statements)
    searx/webapp.py:661:0: R0912: Too many branches (29/12) (too-many-branches)
    searx/webapp.py:661:0: R0915: Too many statements (74/50) (too-many-statements)
    searx/webapp.py:931:4: W0621: Redefining name 'image_proxy' from outer scope (line 1072) (redefined-outer-name)
    searx/webapp.py:946:4: W0621: Redefining name 'stats' from outer scope (line 1132) (redefined-outer-name)
    searx/webapp.py:917:0: R0914: Too many local variables (34/20) (too-many-locals)
    searx/webapp.py:917:0: R0912: Too many branches (19/12) (too-many-branches)
    searx/webapp.py:917:0: R0915: Too many statements (65/50) (too-many-statements)
    searx/webapp.py:1063:44: W0621: Redefining name 'preferences' from outer scope (line 917) (redefined-outer-name)
    searx/webapp.py:1072:0: R0911: Too many return statements (9/6) (too-many-return-statements)
    searx/webapp.py:1151:4: C0103: Variable name "SORT_PARAMETERS" doesn't conform to '(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*)|([a-z]))$' pattern (invalid-name)
    searx/webapp.py:1297:0: R1721: Unnecessary use of a comprehension (unnecessary-comprehension)
    searx/webapp.py:1303:0: C0103: Argument name "e" doesn't conform to '(([a-z][a-zA-Z0-9_]{2,30})|(_[a-z0-9_]*))$' pattern (invalid-name)
    searx/webapp.py:1303:19: W0613: Unused argument 'e' (unused-argument)
    searx/webapp.py:1338:23: W0621: Redefining name 'app' from outer scope (line 162) (redefined-outer-name)
    searx/webapp.py:1318:0: R0903: Too few public methods (1/2) (too-few-public-methods)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-05-27 12:30:56 +02:00
.github Update data-update.yml 2021-05-01 10:21:27 +02:00
dockerfiles [mod] docker-entrypoint.sh - add script to make test.sh (shellcheck) 2021-05-17 12:02:24 +02:00
docs [fix] webapp.py - running without installation is not supported 2021-05-26 21:17:19 +02:00
examples Fix whitespaces 2016-07-11 18:52:37 +07:00
searx [pylint] webapp.py - fix all messages from pylint 2021-05-27 12:30:56 +02:00
searx_extra [pylint] tag PYLINT_FILES by comment `# lint: pylint` 2021-04-26 20:18:20 +02:00
tests [fix] unit test: don't load /etc/searx/settings.yml 2021-05-18 17:23:21 +02:00
utils [fix] typo: 'interactiv' --> 'interactive' 2021-04-28 16:29:03 +02:00
.config.sh [filtron.sh] make filtron rule file configurable 2021-04-28 12:48:49 +02:00
.coveragerc [mod] use github actions instead of travis 2020-11-17 15:09:06 +01:00
.dir-locals.el [emacs] don't use tabs, except in makefile-gmake-mode 2021-05-17 21:26:20 +02:00
.dockerignore [enh] update documentation about docker 2020-07-22 14:58:04 +02:00
.gitattributes [enh] add simple theme (WIP) 2017-08-06 16:04:21 +02:00
.gitignore [enh] Add onions category with Ahmia, Not Evil and Torch 2020-10-25 17:59:05 -07:00
.pylintrc [mod] pylint: add extension-pkg-whitelist=lxml.etree 2020-11-02 15:55:19 +01:00
AUTHORS.rst [brand] searxng -- fix links to issue tracker & WEB-GUI 2021-04-25 14:25:08 +02:00
CHANGELOG.rst [brand] searxng -- fix links to issue tracker & WEB-GUI 2021-04-25 14:25:08 +02:00
CONTRIBUTING.md [brand] searxng -- fix links to issue tracker & WEB-GUI 2021-04-25 14:25:08 +02:00
Dockerfile [brand] Dockerfile default INSTANCE_NAME=searxng 2021-05-17 12:02:24 +02:00
LICENSE [fix] full AGPLv3+ license according to #382 2015-07-04 18:23:54 +02:00
Makefile [mod] docker-entrypoint.sh - add script to make test.sh (shellcheck) 2021-05-17 12:02:24 +02:00
PULL_REQUEST_TEMPLATE.md Add PR template and contribution guidelines 2020-07-10 17:10:02 +02:00
README.rst [brand] README.rst fix img.shields.io and searxng.github.io URLs 2021-04-26 15:47:56 +02:00
babel.cfg [enh] babel.cfg added 2014-01-22 00:15:42 +01:00
manage [docker] multiarch support: linux/amd64,linux/arm64,linux/arm/v7 2021-04-28 14:40:00 +02:00
requirements-dev.txt Bump sphinx from 4.0.1 to 4.0.2 2021-05-21 08:31:50 +02:00
requirements.txt Bump pygments from 2.8.1 to 2.9.0 2021-05-15 07:47:03 +00:00
setup.py Add searx_extra package 2021-03-04 11:59:14 +01:00

README.rst

.. SPDX-License-Identifier: AGPL-3.0-or-later

.. figure:: https://raw.githubusercontent.com/searxng/searxng/master/searx/static/themes/oscar/img/logo_searx_a.png
   :target: https://searxng.github.io/searxng/
   :alt: searXNG
   :width: 100%
   :align: center

-------

|searx install|
|searx homepage|
|searx wiki|
|AGPL License|
|Issues|
|commits|

Privacy-respecting, hackable `metasearch engine`_

.. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine

.. |searx install| image:: https://img.shields.io/badge/-install-blue
   :target: https://searxng.github.io/searxng/admin/installation.html

.. |searx homepage| image:: https://img.shields.io/badge/-homepage-blue
   :target: https://searxng.github.io/searxng

.. |searx wiki| image:: https://img.shields.io/badge/-wiki-blue
   :target: https://github.com/searxng/searxng/wiki

.. |AGPL License|  image:: https://img.shields.io/badge/license-AGPL-blue.svg
   :target: https://github.com/searxng/searxng/blob/master/LICENSE

.. |Issues| image:: https://img.shields.io/github/issues/searxng/searxng?color=yellow&label=issues
   :target: https://github.com/searxng/searxng/issues

.. |PR| image:: https://img.shields.io/github/issues-pr-raw/searxng/searxng?color=yellow&label=PR
   :target: https://github.com/searxng/searxng/pulls

.. |commits| image:: https://img.shields.io/github/commit-activity/y/searxng/searxng?color=yellow&label=commits
   :target: https://github.com/searxng/searxng/commits/master


If you are looking for running instances, ready to use, then visit searx.space_.

Otherwise jump to the user_, admin_ and developer_ handbooks you will find on
our homepage_.

.. _searx.space: https://searx.space
.. _user: https://searxng.github.io/searxng/user
.. _admin: https://searxng.github.io/searxng/admin
.. _developer: https://searxng.github.io/searxng/dev
.. _homepage: https://searxng.github.io/searxng