|
.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
| None | __init__ (self, "PluginCfg" plg_cfg) |
| bool | on_result (self, "SXNG_Request" request, "SearchWithPlugins" search, "Result" result) |
| Public Member Functions inherited from searx.plugins._core.Plugin | |
| None | __init__ (self, "PluginCfg" plg_cfg) |
| int | __hash__ (self) |
| __eq__ (self, typing.Any other) | |
| bool | init (self, "flask.Flask" app) |
| bool | pre_search (self, SXNG_Request request, "SearchWithPlugins" search) |
| None|Sequence[Result] | post_search (self, SXNG_Request request, "SearchWithPlugins" search) |
Public Attributes | |
| info | |
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 = "" |
Avoid paywalls by redirecting to open-access.
Definition at line 45 of file oa_doi_rewrite.py.
| None searx.plugins.oa_doi_rewrite.SXNGPlugin.__init__ | ( | self, | |
| "PluginCfg" | plg_cfg ) |
Definition at line 50 of file oa_doi_rewrite.py.
References __init__().
Referenced by __init__().
| bool searx.plugins.oa_doi_rewrite.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 59 of file oa_doi_rewrite.py.
| searx.plugins.oa_doi_rewrite.SXNGPlugin.info |
Definition at line 52 of file oa_doi_rewrite.py.