8525 Commits

Author SHA1 Message Date
searxng-bot
f630a24311 [l10n] update translations from Weblate
faf95be5a - 2025-04-03 - sakistzimas <sakistzimas@noreply.codeberg.org>
e42efee66 - 2025-04-02 - Juno Takano <jutty@noreply.codeberg.org>
c1fbb26c4 - 2025-04-02 - return42 <return42@noreply.codeberg.org>
562d21fb9 - 2025-04-02 - ghose <ghose@noreply.codeberg.org>
1ea9e67c5 - 2025-04-01 - return42 <return42@noreply.codeberg.org>
daaa0b41e - 2025-03-31 - wags07 <wags07@noreply.codeberg.org>
52635ec5f - 2025-03-31 - return42 <return42@noreply.codeberg.org>
589ad13f2 - 2025-03-31 - return42 <return42@noreply.codeberg.org>
1f063c96e - 2025-03-31 - return42 <return42@noreply.codeberg.org>
c001e606d - 2025-03-31 - return42 <return42@noreply.codeberg.org>
9bc14f1a0 - 2025-03-31 - wags07 <wags07@noreply.codeberg.org>
6a524ecb4 - 2025-03-31 - return42 <return42@noreply.codeberg.org>
508fe79c7 - 2025-03-31 - return42 <return42@noreply.codeberg.org>
8c8db80e7 - 2025-03-31 - return42 <return42@noreply.codeberg.org>
c9f551913 - 2025-03-31 - AndersNordh <andersnordh@noreply.codeberg.org>
6c56adc71 - 2025-03-31 - artens <artens@noreply.codeberg.org>
15526190b - 2025-03-31 - Linerly <linerly@noreply.codeberg.org>
2102783df - 2025-03-31 - AndersNordh <andersnordh@noreply.codeberg.org>
fee510d78 - 2025-03-30 - kratos <makesocialfoss32@keemail.me>
d5c9b970c - 2025-03-30 - Fjuro <fjuro@noreply.codeberg.org>
94259815b - 2025-03-30 - return42 <return42@noreply.codeberg.org>
a448cf7da - 2025-03-29 - Outbreak2096 <outbreak2096@noreply.codeberg.org>
0c3ef7929 - 2025-03-29 - Priit Jõerüüt <jrtcdbrg@noreply.codeberg.org>
ce2fbffe8 - 2025-03-29 - SomeTr <sometr@noreply.codeberg.org>
2025-04-04 10:21:19 +02:00
dependabot[bot]
4452358e87 Bump vite from 6.2.3 to 6.2.4 in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-03 09:25:43 +02:00
Markus Heiser
7546f88b1e [build] /static 2025-04-03 09:03:35 +02:00
Markus Heiser
d4c6c9401d [fix] client/simple: add missing "swiped-events" devDependencies (import)
In commit 1a3543d4b in PR-4284 [1] the swiped-events [2] were forgotten to be
migrated.  In this patch, the event library is added to the ``devDependencies``
and imported by::

    import "../../../node_modules/swiped-events/src/swiped-events.js

[1] https://github.com/searxng/searxng/pull/4284
[2] https://www.npmjs.com/package/swiped-events

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Reported-by: https://github.com/searxng/searxng/pull/4198#issuecomment-2770734321
2025-04-03 09:03:35 +02:00
Markus Heiser
e6308b8167 [fix] hardening against arguments of type None, where str or dict is expected
On a long-running server, the tracebacks below can be found (albeit rarely),
which indicate problems with NoneType where a string or another data type is
expected.

result.img_src::

    File "/usr/local/searxng/searxng-src/searx/templates/simple/result_templates/images.html", line 13, in top-level template code
      <img src="" data-src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}">{{- "" -}}
      ^
    File "/usr/local/searxng/searxng-src/searx/webapp.py", line 284, in image_proxify
      if url.startswith('//'):
         ^^^^^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'startswith'

result.content::

    File "/usr/local/searxng/searxng-src/searx/result_types/_base.py", line 105, in _normalize_text_fields
      result.content = WHITESPACE_REGEX.sub(" ", result.content).strip()
                       ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
    TypeError: expected string or bytes-like object, got 'NoneType'

html_to_text, when html_str is a NoneType::

    File "/usr/local/searxng/searxng-src/searx/engines/wikipedia.py", line 190, in response
      title = utils.html_to_text(api_result.get('titles', {}).get('display') or api_result.get('title'))
    File "/usr/local/searxng/searxng-src/searx/utils.py", line 158, in html_to_text
      html_str = html_str.replace('\n', ' ').replace('\r', ' ')
                 ^^^^^^^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'replace'

presearch engine, when json_resp is a NoneType::

    File "/usr/local/searxng/searxng-src/searx/engines/presearch.py", line 221, in response
      results = parse_search_query(json_resp.get('results'))
    File "/usr/local/searxng/searxng-src/searx/engines/presearch.py", line 161, in parse_search_query
      for item in json_results.get('specialSections', {}).get('topStoriesCompact', {}).get('data', []):
                  ^^^^^^^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'get'

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-01 11:13:47 +02:00
Zhijie He
08885d0614 [feat] add Quark autocomplete support
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-31 14:59:49 +02:00
Zhijie He
7b4612e862 [feat] engines: add Ollama engine 2025-03-30 14:25:58 +02:00
Bnyro
9ffa9fb730 [feat] engines: add reuters news engine 2025-03-30 13:56:09 +02:00
Tommaso Colella
5daa4f0460 [feat] engine: add engine for italian online newspaper "il post" 2025-03-30 13:45:06 +02:00
Zhijie He
33661cc5c3 [feat] engines: add Quark engine
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-30 13:20:35 +02:00
Zhijie He
b231cb4b59 [feat] engines: add Niconico videos engine
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-30 12:42:31 +02:00
naughtymommy42069
c8b419fcbb [feat] engine: add bitchute 2025-03-30 12:41:43 +02:00
Markus Heiser
237267ffbe [data] update searx.data - update_engine_descriptions.py 2025-03-30 09:54:03 +02:00
Markus Heiser
50f92779bd [refactor] migrate plugins from "module" to class SXNGPlugin
This patch brings two major changes:

- ``Result.filter_urls(..)`` to pass a filter function for URL fields
- The ``enabled_plugins:`` section in SearXNG's settings do no longer exists.

To understand plugin development compile documentation:

    $ make docs.clean docs.live

and read http://0.0.0.0:8000/dev/plugins/development.html

There is no longer a distinction between built-in and external plugin, all
plugins are registered via the settings in the ``plugins:`` section.

In SearXNG, plugins can be registered via a fully qualified class name.  A
configuration (`PluginCfg`) can be transferred to the plugin, e.g. to activate
it by default / *opt-in* or *opt-out* from user's point of view.

built-in plugins
================

The built-in plugins are all located in the namespace `searx.plugins`.

.. code:: yaml

    plugins:

      searx.plugins.calculator.SXNGPlugin:
        active: true

      searx.plugins.hash_plugin.SXNGPlugin:
        active: true

      searx.plugins.self_info.SXNGPlugin:
        active: true

      searx.plugins.tracker_url_remover.SXNGPlugin:
        active: true

      searx.plugins.unit_converter.SXNGPlugin:
        active: true

      searx.plugins.ahmia_filter.SXNGPlugin:
        active: true

      searx.plugins.hostnames.SXNGPlugin:
        active: true

      searx.plugins.oa_doi_rewrite.SXNGPlugin:
        active: false

      searx.plugins.tor_check.SXNGPlugin:
        active: false

external plugins
================

SearXNG supports *external plugins* / there is no need to install one, SearXNG
runs out of the box.

- Only show green hosted results: https://github.com/return42/tgwf-searx-plugins/

To get a developer installation in a SearXNG developer environment:

.. code:: sh

   $ git clone git@github.com:return42/tgwf-searx-plugins.git
   $ ./manage pyenv.cmd python -m \
         pip install -e tgwf-searx-plugins

To register the plugin in SearXNG add ``only_show_green_results.SXNGPlugin`` to
the ``plugins:``:

.. code:: yaml

    plugins:
      # ...
      only_show_green_results.SXNGPlugin:
        active: false

Result.filter_urls(..)
======================

The ``Result.filter_urls(..)`` can be used to filter and/or modify URL fields.
In the following example, the filter function ``my_url_filter``:

.. code:: python

   def my_url_filter(result, field_name, url_src) -> bool | str:
       if "google" in url_src:
           return False              # remove URL field from result
       if "facebook" in url_src:
           new_url = url_src.replace("facebook", "fb-dummy")
           return new_url            # return modified URL
       return True                   # leave URL in field unchanged

is applied to all URL fields in the :py:obj:`Plugin.on_result` hook:

.. code:: python

   class MyUrlFilter(Plugin):
       ...
       def on_result(self, request, search, result) -> bool:
           result.filter_urls(my_url_filter)
           return True

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-29 10:16:43 +01:00
return42
d36da0a6c3 [data] update searx.data - update_ahmia_blacklist.py 2025-03-29 09:49:27 +01:00
return42
d7ca257fcd [data] update searx.data - update_firefox_version.py 2025-03-29 09:48:39 +01:00
return42
98024d8518 [data] update searx.data - update_wikidata_units.py 2025-03-29 09:48:06 +01:00
return42
96d0854a50 [data] update searx.data - update_currencies.py 2025-03-29 09:47:33 +01:00
Aadniz
ecee73eafd [fix] presearch engine: Unexpected crash if duration not in videos 2025-03-28 16:26:39 +01:00
searxng-bot
1189b1906c [l10n] update translations from Weblate
9a0c9e142 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
8e06fb05a - 2025-03-27 - return42 <return42@noreply.codeberg.org>
8e683ef69 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
3588715a0 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
acf531db2 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
b4b09bdef - 2025-03-27 - return42 <return42@noreply.codeberg.org>
8bef57082 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
239bae388 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
ca6a6fc4f - 2025-03-27 - return42 <return42@noreply.codeberg.org>
2a19a52db - 2025-03-27 - return42 <return42@noreply.codeberg.org>
7b217fad1 - 2025-03-24 - Haraldher <haraldher@noreply.codeberg.org>
649d15f55 - 2025-03-24 - Haraldher <haraldher@noreply.codeberg.org>
2025-03-28 08:51:09 +01:00
dependabot[bot]
4a0ff84a40 [upd] pypi: Bump selenium from 4.29.0 to 4.30.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.29.0 to 4.30.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.29.0...selenium-4.30.0)

---
updated-dependencies:
- dependency-name: selenium
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 08:50:32 +01:00
dependabot[bot]
d02d432862 [upd] pypi: Bump yamllint from 1.36.2 to 1.37.0
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.36.2 to 1.37.0.
- [Release notes](https://github.com/adrienverge/yamllint/releases)
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.36.2...v1.37.0)

---
updated-dependencies:
- dependency-name: yamllint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 08:50:10 +01:00
dependabot[bot]
3c537f958f [upd] web-client (simple): Bump stylelint in /client/simple
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.16.0 to 16.17.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.16.0...16.17.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 08:49:44 +01:00
dependabot[bot]
a2ad1bed00 [upd] web-client (simple): Bump eslint in /client/simple
Bumps [eslint](https://github.com/eslint/eslint) from 9.22.0 to 9.23.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.22.0...v9.23.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 08:48:46 +01:00
Markus Heiser
f62f6194e3 [build] /static 2025-03-27 12:27:37 +01:00
Markus Heiser
68d871dea0 [fix] image deatils view: vertical overflow in results.image-detail-open
overflow-y: scroll
  If the information on the image exceeds the visible area in the detail view,
  there must be a way to access this information via scroll.

max-height: -17rem versus 7rem
  There are new fields in the lower area, so the height of the image (top) must
  be reduced

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-27 12:27:37 +01:00
Markus Heiser
150b2e21fd [fix] make docs -> ERROR: Unknown target name: "google: max 50 pages".
Fix the issues reported by sphinx build::

    docstring of searx.engines.google.max_page:1: ERROR: Unknown target name: "google: max 50 pages".
    docstring of searx.engines.google_images.max_page:1: ERROR: Unknown target name: "google: max 50 pages".
    docstring of searx.engines.google_scholar.max_page:1: ERROR: Unknown target name: "google: max 50 pages".

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-27 06:57:28 +01:00
Aadniz
02f5002a5f [fix] baidu engine: properly decoding HTML escape codes 2025-03-27 06:11:39 +01:00
Bnyro
4dfc47584d [refactor] duration strings: move parsing logic to utils.py 2025-03-25 16:48:44 +01:00
Bnyro
c28d35c7fc [fix] duckduckgo news: unescaped html sequences in description 2025-03-25 16:14:36 +01:00
dependabot[bot]
2ad987c711 Bump vite from 6.2.2 to 6.2.3 in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-25 16:04:41 +01:00
Markus Heiser
5986629c6b [fix] make data.traits - partial revert of commit 30a8204
The entries in the catalog of search languages are build up from the "Engine
Traits" [1] and which entries are included in the catalog is controlled qby two
threshold values [2].

If possible, the values should ensure that no languages or regions disappear
from the catalog of search languages [3].

The threshold values should have been adjusted in commit 30a8204:

- ``min_eng_per_region = 18``
- ``min_eng_per_lang = 22``

Because the threshold values were not adjusted, many entries were missing in the
search language catalog.  This bug has been fixed with this patch: the threshold
values have been adjusted and the catalog of search languages has been completed
again.

[1] https://docs.searxng.org/dev/engines/enginelib.html#module-searx.enginelib.traits
[2] 96a6e3dcb2/searxng_extra/update/update_engine_traits.py (L104-L105)
[3] https://github.com/searxng/searxng/blob/master/searx/sxng_locales.py

Closes: https://github.com/searxng/searxng/issues/4519
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-22 07:52:36 +01:00
dependabot[bot]
7e680d8e8e [upd] web-client (simple): Bump stylelint in /client/simple
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.15.0 to 16.16.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.15.0...16.16.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-21 11:43:46 +01:00
Ikko Eltociear Ashimine
2482646323 [fix] typo in doc-str: offical -> official 2025-03-21 11:05:54 +01:00
Markus Heiser
96a6e3dcb2 [fix] Results.url: don't normalize www.example.com to example.com
Hostname "www" in URL results can't be normalized to an empty string:

- https://www.tu-darmstadt.de/
- https://tu-darmstadt.de/

Reported-By: @Bnyro <bnyro@tutanota.com>
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-21 10:28:34 +01:00
searxng-bot
ef99cc472d [l10n] update translations from Weblate
efbb54229 - 2025-03-16 - gkkulik <gkkulik@noreply.codeberg.org>
f76dddd02 - 2025-03-15 - cc5efd7b0 <cc5efd7b0@noreply.codeberg.org>
2025-03-21 08:40:14 +01:00
dependabot[bot]
64b52d485b [upd] pypi: Bump yamllint from 1.36.0 to 1.36.2
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.36.0 to 1.36.2.
- [Release notes](https://github.com/adrienverge/yamllint/releases)
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.36.0...v1.36.2)

---
updated-dependencies:
- dependency-name: yamllint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-21 08:39:32 +01:00
dependabot[bot]
de6b027ec7 [upd] pypi: Bump tomli from 2.0.2 to 2.2.1
Bumps [tomli](https://github.com/hukkin/tomli) from 2.0.2 to 2.2.1.
- [Changelog](https://github.com/hukkin/tomli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hukkin/tomli/compare/2.0.2...2.2.1)

---
updated-dependencies:
- dependency-name: tomli
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-21 08:38:48 +01:00
dependabot[bot]
f687306a95 [upd] pypi: Bump pylint from 3.3.4 to 3.3.6
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.4 to 3.3.6.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.4...v3.3.6)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-21 08:38:16 +01:00
Bnyro
b75e56afe6 [fix] duckduckgo: answer sometimes contains faulty (duplicated) url 2025-03-21 07:48:30 +01:00
Bnyro
3668c7012e [fix] presearch videos: item description and duration are located in metadata field 2025-03-20 20:55:09 +01:00
Aadniz
556db857aa [fix] presearch engine: News and Videos formatted incorrectly 2025-03-20 20:44:43 +01:00
Tan Yong Sheng
40feede51e [fix] engine: core.ac.uk implement API v3 / v2 is no longer supported 2025-03-19 17:51:00 +01:00
Alexandre Flament
82b9e533b2 [fix] static.build: upgrade min. node version to 18.17
For sharp [1] dependency / this commit was cherry picked from PR #3157

[1] https://www.npmjs.com/package/sharp
2025-03-18 06:19:44 +01:00
Bnyro
babbe9e1ae [fix] duckduckgo: show proper source url of answers 2025-03-18 05:31:28 +01:00
Bnyro
885d02c8c3 [feat] engine: add selfh.st/icons for logos of common self-hosted programs 2025-03-17 20:23:54 +01:00
Bnyro
bbb2894b04 [engine] elasticsearch: add pagination support 2025-03-16 22:10:05 +01:00
Brock Vojkovic
84636ef49a
[feat] add docker healthcheck back (#4504) 2025-03-16 11:34:26 +01:00
Markus Heiser
a1d5add718 fixup! [fix] fix invalid escape error in Baidu Images & default config typo 2025-03-15 17:14:54 +01:00
Zhijie He
38caa49540 [fix] fix invalid escape error in Baidu Images & default config typo 2025-03-15 17:14:54 +01:00