| Commit message (Collapse) | Author | Age |
|\
| |
| | |
[fix] interface language zh_CN and zh_TW don't work
|
| | |
|
| |
| |
| |
| |
| | |
pybabel separates locales with underscores but we use hyphens
everywhere babel doesn't directly touch
|
|/
|
|
| |
based on @MarcAbonce commit on searx
|
|
|
|
|
|
|
| |
add a new function "init" call when the app starts.
The function can:
* return False to disable the plugin.
* modify the Flask app.
|
|\
| |
| | |
SearXNG: searx_extra
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If there is no write access, there is no need for global. Remove global
statement if there is no assignment.
global-variable-not-assigned:
Using global for names but no assignment is done Used when a variable is
defined through the "global" statement but no assignment to this variable is
done.
In Pylint 2.11 the global-variable-not-assigned checker now catches global
variables that are never reassigned in a local scope and catches (reassigned)
functions [1][2]
[1] https://pylint.pycqa.org/en/latest/whatsnew/2.11.html
[2] https://github.com/PyCQA/pylint/issues/1375
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|\
| |
| | |
debug mode: more readable logging
|
| |
| |
| |
| |
| | |
in debug mode, add some padding to make the output more readable
in procution mode, add the timestamp
|
|/
|
|
| |
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
| |
see #247
|
|
|
|
|
| |
move robot tests to tests.robot
manage calls "python -m tests.robot"
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pylint 2.10 added new default checks [1]:
redundant-u-string-prefix:
Emitted when the u prefix is added to a string
[1] https://pylint.pycqa.org/en/latest/whatsnew/2.10.html
[2] https://github.com/PyCQA/pylint/issues/4102
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
| |
pre_request already set the locale.
|
|
|
|
| |
There are detected from the searx/translations directory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In unit tests settings from
searx/settings.yml
and the user settings from:
unit/settings/test_settings.yml
are used. In the latter, settings can be activated that are needed in the unit
test but should not activated by default in production.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
| |
close #115
|
|
|
|
|
|
|
|
| |
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
|
|
|
|
| |
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
|
|
|
|
| |
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
|
|
|
|
| |
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
|
|
|
|
| |
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
|
|
|
|
| |
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a new environment variable SEARX_DISABLE_ETC_SETTINGS
to disable loading of /etc/searx/settings.yml
unit tests:
* set SEARX_DISABLE_ETC_SETTINGS to 1
* remove SEARX_SETTINGS_PATH if it exists
|
|
|
|
|
|
|
|
| |
tests/units/network/test_network.py requires a call to searx.network.network.initialize
Depending of the test order execution, this function was sometimes call in another test,
sometimes not.
This commit ensure there is a call to initialize()
|
|
|
|
|
|
|
|
|
| |
it prepares the new architecture change,
everything about multithreading in moved in the searx.search.* packages
previously the call to the "init" function of the engines was done in searx.engines:
* the network was not set (request not sent using the defined proxy)
* it requires to monkey patch the code to avoid HTTP requests during the tests
|
|
|
|
| |
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
settings.yml:
* outgoing.networks:
* can contains network definition
* propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections,
keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries
* retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time)
* local_addresses can be "192.168.0.1/24" (it supports IPv6)
* support_ipv4 & support_ipv6: both True by default
see https://github.com/searx/searx/pull/1034
* each engine can define a "network" section:
* either a full network description
* either reference an existing network
* all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
|
| |
|
|
|
|
|
| |
patch engine initialization to skip HTTP request
(engine_init function in searx.engines.initialize_engines)
|
| |
|
|\
| |
| | |
Add searx_extra package
|
| |
| |
| |
| |
| |
| | |
Split the utils directory into:
* searx_extra contains update scripts, standalone_searx.py
* utils contains the files to build and setup searx.
|
|/ |
|
|
|
|
|
| |
Based on duckduckgo bangs
Store bangs on a trie to allow autocomplete (not in this commit)
|
|
|
|
| |
query parts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of our interface locales include uppercase country codes,
which are separated by `_` instead of the more common `-`.
Also, a browser's `Accept-Language` header could be in lowercase.
This commit attempts to normalize those cases so a browser's
language+country codes can better match with our locales.
This solution assumes that our UI locales have nothing more than
language and optionally country. If we ever add a script specific
locale like `zh-Hant-TW` this would have to change to accomodate
that, but the idea would be pretty much the same as this fix.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
from_bang is True when the user query contains a bang.
In this case the category is also set to 'none'.
from_bang only usage was in searx.webadapter.parse_specific :
if from_bang is True, then the EngineRef category is ignored and force to 'none'.
This commit also removes the searx.webadapter.parse_sepecific function.
|
|
|
|
|
|
|
| |
The categories parameter is useless in the constructor:
it is always the categories from the EngineRef.
The categories becomes a property.
|
|
|
|
|
|
|
|
| |
see searx.search.processors.abstract.EngineProcessor
First the method searx call the get_params method.
If the return value is not None, then the searx call the method search.
|
| |
|
|
|
|
|
| |
typical use case: result_proxy can be defined in the user settings,
but are not defined the default settings.yml
|
|
|
|
| |
add an new API /stats/errors
|
| |
|