.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
None | __init__ (self, "PluginCfg" plg_cfg) |
bool | init (self, "flask.Flask" app) |
bool | on_result (self, "SXNG_Request" request, "SearchWithPlugins" search, "Result" result) |
bool|str | filter_url_field (cls, "Result|LegacyResult" result, str field_name, str url_src) |
Public Member Functions inherited from searx.plugins._core.Plugin | |
None | __init__ (self, "PluginCfg" plg_cfg) |
int | __hash__ (self) |
__eq__ (self, typing.Any other) | |
bool | pre_search (self, SXNG_Request request, "SearchWithPlugins" search) |
None|Sequence[Result] | post_search (self, SXNG_Request request, "SearchWithPlugins" search) |
Public Attributes | |
info | |
filter_url_field |
Additional Inherited Members | |
Static Public Attributes inherited from searx.plugins._core.Plugin | |
str | id = "" |
typing | active .ClassVar[bool] |
list | keywords = [] |
logging | log .Logger |
str | fqn = "" |
Remove trackers arguments from the returned URL.
Definition at line 25 of file tracker_url_remover.py.
None searx.plugins.tracker_url_remover.SXNGPlugin.__init__ | ( | self, | |
"PluginCfg" | plg_cfg ) |
Definition at line 30 of file tracker_url_remover.py.
References __init__().
Referenced by __init__().
bool | str searx.plugins.tracker_url_remover.SXNGPlugin.filter_url_field | ( | cls, | |
"Result|LegacyResult" | result, | ||
str | field_name, | ||
str | url_src ) |
Returns bool ``True`` to use URL unchanged (``False`` to ignore URL). If URL should be modified, the returned string is the new URL to use.
Definition at line 50 of file tracker_url_remover.py.
bool searx.plugins.tracker_url_remover.SXNGPlugin.init | ( | self, | |
"flask.Flask" | app ) |
Initialization of the plugin, the return value decides whether this plugin is active or not. Initialization only takes place once, at the time the WEB application is set up. The base method always returns ``True``, the method can be overwritten in the inheritances, - ``True`` plugin is active - ``False`` plugin is inactive
Reimplemented from searx.plugins._core.Plugin.
Definition at line 40 of file tracker_url_remover.py.
Referenced by searx.sqlitedb.SQLiteAppl.connect(), and searx.sqlitedb.SQLiteAppl.DB().
bool searx.plugins.tracker_url_remover.SXNGPlugin.on_result | ( | self, | |
"SXNG_Request" | request, | ||
"SearchWithPlugins" | search, | ||
"Result" | result ) |
Runs for each result of each engine and returns a boolean: - ``True`` to keep the result - ``False`` to remove the result from the result list The ``result`` can be modified to the needs. .. hint:: If :py:obj:`Result.url <searx.result_types._base.Result.url>` is modified, :py:obj:`Result.parsed_url <searx.result_types._base.Result.parsed_url>` must be changed accordingly: .. code:: python result["parsed_url"] = urlparse(result["url"])
Reimplemented from searx.plugins._core.Plugin.
Definition at line 44 of file tracker_url_remover.py.
searx.plugins.tracker_url_remover.SXNGPlugin.filter_url_field |
Definition at line 46 of file tracker_url_remover.py.
searx.plugins.tracker_url_remover.SXNGPlugin.info |
Definition at line 33 of file tracker_url_remover.py.