Commit Graph

20 Commits (ba8959ad7c18ce4165d29b7a472d845bd96f4735)

Author SHA1 Message Date
Markus Heiser ba8959ad7c [fix] typos / reported by @kianmeng in searx PR-3366
[PR-3366] https://github.com/searx/searx/pull/3366

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Alexandre Flament 41ae5aea2b [fix] disabling all engines in a category makes the bang search in general
with this commit, there is no result
2 years ago
Markus Heiser 3d96a9839a [format.python] initial formatting of the python code
This patch was generated by black [1]::

    make format.python

[1] https://github.com/psf/black

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser df351937f4 [fix] typo in searx.webadapter.parse_lang
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Adam Tauber 44f4a9d49a [enh] add ability to send engine data to subsequent requests 3 years ago
Alexandre Flament 3f8ebf70b1 [fix] pylint: use "raise ... from ..." 3 years ago
Alexandre Flament eda8934f15 [mod] searx.search.EngineRef: remove from_bang parameter
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.
3 years ago
Alexandre Flament 995ba2f406 [mod] searx.search.SearchQuery: remove categories parameter
The categories parameter is useless in the constructor:
it is always the categories from the EngineRef.

The categories becomes a property.
3 years ago
Alexandre Flament e28b56e262 [fix] webadapter: fix locked categories 4 years ago
Noémi Ványi 33e139cae6 Let admins lock user preferences 4 years ago
Alexandre Flament d5950079cf [fix] fix searx.webadapter
* Fix "?q=test&engines=wikipedia": fix exception
* Fix "?q=test&engines=wikipedia&categories=images": now the engines from images category are included.
* Fix parse_timeout: make sure a value is always returned
* Various typing fixes (searx.webadapter, searx.search.SearchQuery)
4 years ago
Alexandre Flament 507896c115 [mod] preferences.py: check language setting with a regex instead of match_language 4 years ago
Alexandre Flament f2f3300bde [mod] more typing 4 years ago
Alexandre Flament 485a502b88 [mod] add typing and __slots__ 4 years ago
Alexandre Flament 678699beaf [mod] searx/webadapter.py: add get_selected_categories share common code with get_search_query_from_webapp
Update searx/webapp.py to use get_selected_categories
Close #2142
4 years ago
Alexandre Flament d5b5e48f04 [mod] searx/webadapter.py: each web parameter has a dedicated function (parse_pageno, page_lang,....). 4 years ago
Alexandre Flament 691d12726b [mod] check the engine tokens in searx/webadapter.py instead of searx/search.py 4 years ago
Alexandre Flament eecfff2689 [mod] check time_range parameter in searx/webadapter.py 4 years ago
Alexandre Flament 2929495112 [mod] add searx.search.EngineRef
was previously a Dict with two or three keys: name, category, from_bang
make clear that this is a engine reference (see tests/unit/test_search.py for example)
all variables using this class are renamed accordingly.
4 years ago
Alexandre Flament 2dbc0de0cd [mod] add searx/webadapter.py
* move searx.search.get_search_query_from_webapp to searx.webadapter
* move searx.query.SearchQuery to searx.search
4 years ago