Compare commits

...

365 Commits

Author SHA1 Message Date
Markus Heiser
a05aa81d79 [fix] broken link in the doc-strings of the json engine
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-30 14:29:23 +01:00
Markus Heiser
f4250b6d40 [doc] adds the missing documentation of the server.method settings.
TL;DR; For all the issues that comes with HTTP POST I recommend instance
maintainers to switch to GET and lock the property in the preferences:

```yaml
server:
  method: GET

preferences:
  lock:
    - method
```

We don't want this in the defaults of the SearXNG distributions for the pros vs
cons listed in this discussion:

- https://github.com/searxng/searxng/pull/3619
2025-01-30 14:24:38 +01:00
return42
738906358b [data] update searx.data - update_currencies.py 2025-01-29 06:23:04 +01:00
return42
fc8938c968 [data] update searx.data - update_ahmia_blacklist.py 2025-01-29 06:07:28 +01:00
return42
3b9e06fbd2 [data] update searx.data - update_wikidata_units.py 2025-01-29 06:06:50 +01:00
return42
4934922156 [data] update searx.data - update_engine_traits.py 2025-01-29 06:05:58 +01:00
return42
bee39e4ec0 [data] update searx.data - update_engine_descriptions.py 2025-01-29 06:04:54 +01:00
Markus Heiser
3f4e0b0859 [fix] gettext can't work with f-strings (i10n)
``str.format`` is the pythonic way of handling strings returned by
gettext.gettext that retain interpolation tokens.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-29 06:04:09 +01:00
Markus Heiser
a235c54f8c [mod] rudimentary implementation of a MainResult type
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-29 05:04:41 +01:00
Markus Heiser
df3344e5d5 [fix] JSON & CSV format return error 500
For CSV and JSON output, the LegacyResult and the Result objects needs to be
converted to a python dictionary.

Closes: https://github.com/searxng/searxng/issues/4244
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-29 05:04:41 +01:00
Markus Heiser
906b9e7d4c [fix] hostnames plugin: AttributeError: 'NoneType' object has no attribute 'netloc'
Closes: https://github.com/searxng/searxng/issues/4245
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-28 16:28:12 +01:00
Markus Heiser
36a1ef1239 [refactor] typification of SearXNG / EngineResults
In [1] and [2] we discussed the need of a Result.results property and how we can
avoid unclear code.  This patch implements a class for the reslut-lists of
engines::

    searx.result_types.EngineResults

A simple example for the usage in engine development::

    from searx.result_types import EngineResults
    ...
    def response(resp) -> EngineResults:
        res = EngineResults()
        ...
        res.add( res.types.Answer(answer="lorem ipsum ..", url="https://example.org") )
        ...
        return res

[1] https://github.com/searxng/searxng/pull/4183#pullrequestreview-257400034
[2] https://github.com/searxng/searxng/pull/4183#issuecomment-2614301580
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-28 07:07:08 +01:00
Markus Heiser
edfbf1e118 [refactor] typification of SearXNG (initial) / result items (part 1)
Typification of SearXNG
=======================

This patch introduces the typing of the results.  The why and how is described
in the documentation, please generate the documentation ..

    $ make docs.clean docs.live

and read the following articles in the "Developer documentation":

- result types --> http://0.0.0.0:8000/dev/result_types/index.html

The result types are available from the `searx.result_types` module.  The
following have been implemented so far:

- base result type: `searx.result_type.Result`
  --> http://0.0.0.0:8000/dev/result_types/base_result.html

- answer results
  --> http://0.0.0.0:8000/dev/result_types/answer.html

including the type for translations (inspired by #3925).  For all other
types (which still need to be set up in subsequent PRs), template documentation
has been created for the transition period.

Doc of the fields used in Templates
===================================

The template documentation is the basis for the typing and is the first complete
documentation of the results (needed for engine development).  It is the
"working paper" (the plan) with which further typifications can be implemented
in subsequent PRs.

- https://github.com/searxng/searxng/issues/357

Answer Templates
================

With the new (sub) types for `Answer`, the templates for the answers have also
been revised, `Translation` are now displayed with collapsible entries (inspired
by #3925).

    !en-de dog

Plugins & Answerer
==================

The implementation for `Plugin` and `Answer` has been revised, see
documentation:

- Plugin: http://0.0.0.0:8000/dev/plugins/index.html
- Answerer: http://0.0.0.0:8000/dev/answerers/index.html

With `AnswerStorage` and `AnswerStorage` to manage those items (in follow up
PRs, `ArticleStorage`, `InfoStorage` and .. will be implemented)

Autocomplete
============

The autocompletion had a bug where the results from `Answer` had not been shown
in the past.  To test activate autocompletion and try search terms for which we
have answerers

- statistics: type `min 1 2 3` .. in the completion list you should find an
  entry like `[de] min(1, 2, 3) = 1`

- random: type `random uuid` .. in the completion list, the first item is a
  random UUID

Extended Types
==============

SearXNG extends e.g. the request and response types of flask and httpx, a module
has been set up for type extensions:

- Extended Types
  --> http://0.0.0.0:8000/dev/extended_types.html

Unit-Tests
==========

The unit tests have been completely revised.  In the previous implementation,
the runtime (the global variables such as `searx.settings`) was not initialized
before each test, so the runtime environment with which a test ran was always
determined by the tests that ran before it.  This was also the reason why we
sometimes had to observe non-deterministic errors in the tests in the past:

- https://github.com/searxng/searxng/issues/2988 is one example for the Runtime
  issues, with non-deterministic behavior ..

- https://github.com/searxng/searxng/pull/3650
- https://github.com/searxng/searxng/pull/3654
- https://github.com/searxng/searxng/pull/3642#issuecomment-2226884469
- https://github.com/searxng/searxng/pull/3746#issuecomment-2300965005

Why msgspec.Struct
==================

We have already discussed typing based on e.g. `TypeDict` or `dataclass` in the past:

- https://github.com/searxng/searxng/pull/1562/files
- https://gist.github.com/dalf/972eb05e7a9bee161487132a7de244d2
- https://github.com/searxng/searxng/pull/1412/files
- https://github.com/searxng/searxng/pull/1356

In my opinion, TypeDict is unsuitable because the objects are still dictionaries
and not instances of classes / the `dataclass` are classes but ...

The `msgspec.Struct` combine the advantages of typing, runtime behaviour and
also offer the option of (fast) serializing (incl. type check) the objects.

Currently not possible but conceivable with `msgspec`: Outsourcing the engines
into separate processes, what possibilities this opens up in the future is left
to the imagination!

Internally, we have already defined that it is desirable to decouple the
development of the engines from the development of the SearXNG core / The
serialization of the `Result` objects is a prerequisite for this.

HINT: The threads listed above were the template for this PR, even though the
implementation here is based on msgspec.  They should also be an inspiration for
the following PRs of typification, as the models and implementations can provide
a good direction.

Why just one commit?
====================

I tried to create several (thematically separated) commits, but gave up at some
point ... there are too many things to tackle at once / The comprehensibility of
the commits would not be improved by a thematic separation. On the contrary, we
would have to make multiple changes at the same places and the goal of a change
would be vaguely recognizable in the fog of the commits.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-28 07:07:08 +01:00
Bnyro
9079d0cac0 [refactor] translation engines: common interface 2025-01-28 07:07:08 +01:00
Denperidge
70f1b65008 [feat] engines: add NixOS Wiki
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-01-26 20:12:19 +01:00
Markus Heiser
06f6ee4e36 [build] /static 2025-01-26 13:34:52 +01:00
Markus Heiser
9beff8212b [refactor] results.js: wait one second before loading full high-res image
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-26 13:34:52 +01:00
Bnyro
cf4e183790 [refactor] results.js: cancel image loading after next one selected 2025-01-26 13:34:52 +01:00
Bnyro
c1fcee9d9f [docs] settings_search.rst: add missing autocompletion providers 2025-01-26 08:38:29 +01:00
Bnyro
176079977d [chore] autocomplete.py: order autocompletion engines alphabetically 2025-01-25 12:12:46 +01:00
Zhijie He
f3f13519ff
[feat] autocompletion: add baidu search autocompleter (#4227) 2025-01-25 11:59:10 +01:00
dependabot[bot]
04a6ab12fb [upd] npm: Bump less from 4.2.1 to 4.2.2 in /searx/static/themes/simple
Bumps [less](https://github.com/less/less.js) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/less/less.js/releases)
- [Changelog](https://github.com/less/less.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/less/less.js/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-24 20:24:52 +01:00
searxng-bot
edf6d96625 [l10n] update translations from Weblate
8a0e2e2d6 - 2025-01-21 - return42 <return42@users.noreply.translate.codeberg.org>
b70a88fec - 2025-01-19 - rajeeban <rajeeban@users.noreply.translate.codeberg.org>
2025-01-24 09:52:04 +01:00
dependabot[bot]
fa50324dae [upd] pypi: Bump selenium from 4.27.1 to 4.28.1
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.27.1 to 4.28.1.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-24 09:48:34 +01:00
Markus Heiser
bee2677929 [build] /static 2025-01-21 22:55:45 +01:00
Markus Heiser
e7081bb2c1 [update] make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-21 16:12:27 +01:00
dependabot[bot]
1fde000499 [upd] pypi: Bump pygments from 2.18.0 to 2.19.1
Bumps [pygments](https://github.com/pygments/pygments) from 2.18.0 to 2.19.1.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.18.0...2.19.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 16:12:27 +01:00
Bnyro
8731e37796 [build] /static 2025-01-20 18:46:31 +01:00
Bnyro
e92d1bc6af [fix] results.js: back button not working after closing image result manually 2025-01-20 18:46:31 +01:00
Bnyro
f766faca3f [feat] engines: add ipernity (images) 2025-01-20 17:22:32 +01:00
dependabot[bot]
c020a964e4 [upd] npm: Bump eslint in /searx/static/themes/simple
Bumps [eslint](https://github.com/eslint/eslint) from 9.17.0 to 9.18.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.17.0...v9.18.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-01-20 16:53:12 +01:00
dependabot[bot]
46b16e6ff1 [upd] npm: Bump stylelint-config-standard in /searx/static/themes/simple
Bumps [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) from 36.0.1 to 37.0.0.
- [Release notes](https://github.com/stylelint/stylelint-config-standard/releases)
- [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint-config-standard/compare/36.0.1...37.0.0)

---
updated-dependencies:
- dependency-name: stylelint-config-standard
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 16:52:21 +01:00
Markus Heiser
98c66c0ae6 [build] /static 2025-01-20 16:41:00 +01:00
Markus Heiser
c06ec65b2a [fix] LESS sourcemaps broken in less-plugin-clean-css v1.6.0
The ``less-plugin-clean-css`` lacks some maintenance: the sourcemaps are broken
since v1.6.0 (08/2024) [1]

- [1] https://github.com/less/less-plugin-clean-css/issues/42

Closes: https://github.com/searxng/searxng/issues/4143

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-20 16:41:00 +01:00
Markus Heiser
e581921c92 [fix] engine brave: remove date from the content string
Related: https://github.com/searxng/searxng/issues/4211#issuecomment-2601941440
Closes: https://github.com/searxng/searxng/issues/4006

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-20 16:40:36 +01:00
Markus Heiser
073d9549a0 [build] /static 2025-01-20 13:52:43 +01:00
Markus Heiser
601ffcb8a3 [mod] add swipe events to the image gallery (gesture control)
Adds [1] to the searxng.min.js and horizontal swipe events to the image gallery.

[1] https://www.npmjs.com/package/swiped-events

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-20 13:52:43 +01:00
Markus Heiser
d9115b8d48 [build] /static 2025-01-20 13:29:26 +01:00
Bnyro
c760ad0808 [feat] image results: dismiss image viewer on back button press on mobile devices 2025-01-20 13:29:26 +01:00
Bnyro
2f087a3a22 [feat] public domain image archive: automatically obtain algolia api key 2025-01-20 12:56:15 +01:00
Denperidge
3333d9f385 [feat] engines: public domain image archive 2025-01-20 12:56:15 +01:00
Popolon
1a885b70ce
[feat] wikidata: add mastodon, peertube and Lemmy accounts to infobox
Co-authored-by: Popolon <popolon@popolon.org>
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-01-20 11:19:56 +01:00
searxng-bot
a576f69c12 [l10n] update translations from Weblate
09c56a561 - 2025-01-16 - tentsbet <tentsbet@users.noreply.translate.codeberg.org>
219fff972 - 2025-01-14 - hirushaadi <hirushaadi@users.noreply.translate.codeberg.org>
2b4b64e60 - 2025-01-14 - return42 <return42@users.noreply.translate.codeberg.org>
6a359da17 - 2025-01-14 - return42 <return42@users.noreply.translate.codeberg.org>
2025-01-17 08:13:57 +01:00
DanielMowitz
272e39893d [feat]: engines: add astrophysical data system 2025-01-16 20:27:55 +01:00
Markus Heiser
41159fed32 [build] /static 2025-01-16 10:51:33 +01:00
Markus Heiser
b1507f188e [fix] gallery view overlaps category bar
Closes: https://github.com/searxng/searxng/issues/4190

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-16 10:51:33 +01:00
Markus Heiser
1668ff5e64 [fix] theme simple: image viewer hides autocomplete suggestions
Closes: https://github.com/searxng/searxng/issues/3509
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-16 10:51:33 +01:00
Markus Heiser
f03ab00155 [fix] broken mobile view (from #4154)
Related:
- https://github.com/searxng/searxng/pull/4154#issuecomment-2591881963

Closes: https://github.com/searxng/searxng/issues/4187

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-16 10:51:33 +01:00
Markus Heiser
15d0e274b3 [fix] build workflows of the themes
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-16 10:51:33 +01:00
Markus Heiser
e4f8f0483f [mod] slightly improve make node.clean themes.all
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-14 15:22:23 +01:00
Bnyro
5a1a43ef74 [build] /static 2025-01-14 15:22:23 +01:00
Bnyro
94b6adf03d [chore] stylelint: fix reported errors 2025-01-14 15:22:23 +01:00
Bnyro
337a6db064 [upd] stylelint: use less-compatible configuration and update rules 2025-01-14 15:22:23 +01:00
Markus Heiser
9d834c0722 [fix] issues reported by sytlelint
"Unexpected vendor-prefixed":
   -webkit-transform & -ms-transform [3]
   -webkit-animation [2]
   @-webkit-keyframes [1]

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/animation
[3] https://developer.mozilla.org/en-US/docs/Web/CSS/transform

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-14 15:22:23 +01:00
Markus Heiser
0abad23daa [upd] migrate .eslintrc.json to eslint.config.mjs
The migration was done by the following steps, firts prepare the node enviroment
an open a bash in this environment::

    $ make clean nvm.nodejs
    ...
    $ ./manage nvm.bash
    $ which npx
    searxng/.nvm/versions/node/v23.5.0/bin/npx

In this environment the migration command from [1] is started::

    $ npx @eslint/migrate-config .eslintrc.json
    Need to install the following packages:
    @eslint/migrate-config@1.3.5
    Migrating .eslintrc.json

    Wrote new config to ./eslint.config.mjs

    You will need to install the following packages to use the new config:
    - globals
    - @eslint/js
    - @eslint/eslintrc

    You can install them using the following command:

    npm install globals @eslint/js @eslint/eslintrc -D

    The following messages were generated during migration:
    - The 'node' environment is used, so switching sourceType to 'commonjs'.

[1] https://eslint.org/docs/latest/use/configure/migration-guide#migrate-your-config-file

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-14 15:22:23 +01:00
Markus Heiser
943c8fb85b [upd] update npm dependencies (package.json) and .tool-versions
To avoid issue like [1], versions from now on are pinned in::

    searx/static/themes/simple/package-lock.json

To test nodejs v23 or newer is needed (will be installed by nvm).  To drop a
possibly existing installation::

    $ make clean

Install nodejs in nvm::

    $ make nvm.nodejs
    INFO:  install (update) NVM at searxng/.nvm
    ...
    Now using node v23.5.0 (npm v10.9.2)
    Creating default alias: default -> v23.5 (-> v23.5.0)
    INFO:  Node.js is installed at searxng/.nvm/versions/node/v23.5.0/bin/node
    INFO:  Node.js is version v23.5.0
    INFO:  npm is installed at searxng/.nvm/versions/node/v23.5.0/bin/npm
    INFO:  npm is version 10.9.2
    INFO:  NVM is installed at searxng/.nvm

To test npm checks and builds:

    $ make static.build.commit

Related:

[1] https://github.com/searxng/searxng/issues/4143

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-14 15:22:23 +01:00
Lucki
35c80268bf [json_engine] Fix R0912 (too-many-branches) 2025-01-14 14:07:35 +01:00
Lucki
3942b311ac [json_engine] Add unit test 2025-01-14 14:07:35 +01:00
Lucki
64d954b350 [json_engine] mirror xpath functionality 2025-01-14 14:07:35 +01:00
Lucki
591d9c2505 [json_engine] document existing options 2025-01-14 14:07:35 +01:00
Markus Heiser
09cce18518 [data] update searx.data - make data.all
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-13 08:02:01 +01:00
searxng-bot
94a0b415ef [l10n] update translations from Weblate
8f8f92dc0 - 2025-01-10 - hirushaadi <hirushaadi@users.noreply.translate.codeberg.org>
d4ae2e4ba - 2025-01-08 - Harshith-10 <harshith-10@users.noreply.translate.codeberg.org>
05848d0bb - 2025-01-08 - return42 <return42@users.noreply.translate.codeberg.org>
151cde7fc - 2025-01-08 - return42 <return42@users.noreply.translate.codeberg.org>
43ba79c99 - 2025-01-06 - return42 <return42@users.noreply.translate.codeberg.org>
2025-01-10 08:13:22 +01:00
Markus Heiser
6dab7fe78b Revert "[l10n ga] trigger weblate.push.translations (another try)"
This reverts commit e352926187.
2025-01-06 17:12:16 +01:00
Markus Heiser
e352926187 [l10n ga] trigger weblate.push.translations (another try)
Related:

- https://github.com/searxng/searxng/issues/4117

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 16:59:20 +01:00
Markus Heiser
b0391fe718 reomve DUMMY from searxng.msg catalog
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 16:24:44 +01:00
Markus Heiser
91d3d38690 [l10n ga] trigger weblate.push.translations
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 16:16:04 +01:00
Markus Heiser
c5991865c8 [fix] l10n ga (Irish) messages.po is marked as fuzzy
$ ./manage pyenv.cmd pybabel compile --statistics -d searx/translations/

reports:

    catalog searx/translations/ga/LC_MESSAGES/messages.po is marked as fuzzy, skipping

This commit removes the ``fuzzy`` tag and BTW reverts commit 655e41f27

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 15:49:21 +01:00
Markus Heiser
655e41f274 [l10n ga] trigger weblate.push.translations
Related:

- https://github.com/searxng/searxng/issues/4117

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 14:54:41 +01:00
Aindriú Mac Giolla Eoin
d9343b6388 [l10n] adding new language Irish (ga) 2025-01-06 14:54:41 +01:00
Bnyro
0642c5434a [fix] dockerhub: switch to new api path
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 13:46:13 +01:00
Lucki
18c3e08837 Fix usage of api_key engine setting
The value of `params['api_key']` isn't read anywhere.
Writing directly into the header object solves this quite easily though.

> [Users can authenticate by including their API key either in a request URL by appending `?apikey=<API KEY>`, or by including the `X-API-Key: <API KEY>` header with the request.](https://wallhaven.cc/help/api)
2025-01-06 12:25:33 +01:00
Alexandre Flament
96c32549be [fix] requirements-dev.txt: remove autodoc_pydantic
Related to #3727
2025-01-05 09:31:03 +01:00
searxng-bot
a060c09854 [l10n] update translations from Weblate
3db237112 - 2024-12-31 - kratos <kratos@users.noreply.translate.codeberg.org>
2025-01-03 08:49:25 +01:00
Markus Heiser
c1bb0bebd4 [data] update searx.data - update_engine_traits.py
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-29 10:12:45 +01:00
Markus Heiser
af3f272b0b [fix] update_engine_traits.py: annas archive, bing-* and zlibrary engines
Github action Update data - update_engine_traits [1] had issues in annas
archive, bing-* and zlibrary engines:

    ./manage pyenv.cmd python ./searxng_extra/update/update_engine_traits.py

[1] https://github.com/searxng/searxng/actions/runs/12530827768/job/34953392587

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-29 10:12:45 +01:00
return42
05c82d3201 [data] update searx.data - update_engine_descriptions.py 2024-12-29 10:12:24 +01:00
return42
f0e9c3be8c [data] update searx.data - update_currencies.py 2024-12-29 10:11:38 +01:00
return42
428eaea2b7 [data] update searx.data - update_wikidata_units.py 2024-12-29 10:11:09 +01:00
return42
3d55008f23 [data] update searx.data - update_ahmia_blacklist.py 2024-12-29 10:10:38 +01:00
Markus Heiser
9e32cd2047 [fix] replaca inoffical msgspec-python313-pre by offical msgspec 0.19
inoffical msgspec-python313-pre was an inetrim solution from e710ebdf6

related:

- https://github.com/searxng/searxng/pull/4129
- https://github.com/jcrist/msgspec/issues/764#issuecomment-2561330165

closes:

- https://github.com/searxng/searxng/issues/4015

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-28 10:42:20 +01:00
dependabot[bot]
120a519c5c [upd] pypi: Bump pylint from 3.3.2 to 3.3.3
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.2...v3.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-28 09:05:21 +01:00
searxng-bot
402a09963e [l10n] update translations from Weblate
31b458aa4 - 2024-12-25 - return42 <return42@users.noreply.translate.codeberg.org>
fe7cc8706 - 2024-12-25 - return42 <return42@users.noreply.translate.codeberg.org>
7a585b545 - 2024-12-22 - alexgabi <alexgabi@users.noreply.translate.codeberg.org>
2e2fdbd16 - 2024-12-21 - xawos <xawos@users.noreply.translate.codeberg.org>
e2774bb44 - 2024-12-21 - ghose <ghose@users.noreply.translate.codeberg.org>
970bd5d86 - 2024-12-21 - xawos <xawos@users.noreply.translate.codeberg.org>
4c775384c - 2024-12-21 - xawos <xawos@users.noreply.translate.codeberg.org>
176f7df6e - 2024-12-21 - xawos <xawos@users.noreply.translate.codeberg.org>
a6a842d01 - 2024-12-20 - Amirkhandrend-Nicest-XII <Amirkhandrend-Nicest-XII@users.noreply.translate.codeberg.org>
2024-12-28 09:04:50 +01:00
Austin-Olacsi
73e395c8ce
[feat] engines: re-add alexandria.org 2024-12-25 13:13:18 +01:00
dependabot[bot]
19ecdd8aae Bump jinja2 from 3.1.4 to 3.1.5
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-25 08:03:43 +01:00
Markus Heiser
3749154660 [mod] add support for Python 3.13
Python 3.13 has been released [1]

- fasttext-predict supports py3.13 from version 0.9.2.3 [2]

[1] https://www.python.org/downloads/release/python-3130/
[2] https://github.com/searxng/fasttext-predict/commit/f2da9cd173

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-24 19:46:04 +01:00
Markus Heiser
e710ebdf67 [fix] temporary msgspec-python313-pre
Waitng for new release of msgspec for Python 3.13:

- https://github.com/jcrist/msgspec/issues/764#issuecomment-2466150924

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-24 19:35:54 +01:00
Markus Heiser
26097f444b [fix] engine google_video: google changed the layout of the HTML response
Closes: https://github.com/searxng/searxng/issues/4127
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-22 11:45:46 +01:00
dependabot[bot]
19ee529b78 [upd] pypi: Bump certifi from 2024.8.30 to 2024.12.14
Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.8.30 to 2024.12.14.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.08.30...2024.12.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-20 10:07:08 +01:00
searxng-bot
ce53d97327 [l10n] update translations from Weblate
979094524 - 2024-12-17 - Amirkhandrend-Nicest-XII <Amirkhandrend-Nicest-XII@users.noreply.translate.codeberg.org>
2024-12-20 08:16:12 +01:00
Markus Heiser
65c970bdf4 [build] /static 2024-12-16 11:39:38 +01:00
Bnyro
d4e3a5f2f2 [refactor] webapp.py: reuse get_client_settings() method to unify preference handling before render 2024-12-16 11:39:38 +01:00
Markus Heiser
1604a00b89 Revert "[weblate] add dummy string to trigger weblate.push.translations in CI"
This reverts commit 899edee5ec.
2024-12-16 09:27:19 +01:00
Markus Heiser
899edee5ec [weblate] add dummy string to trigger weblate.push.translations in CI
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-16 08:41:57 +01:00
Bnyro
523df1d7f4 [build] /static 2024-12-16 08:36:48 +01:00
Bnyro
c8e932647b [fix] settings: javascript crash when entering due to missing search form 2024-12-16 08:36:48 +01:00
Zhijie He
8d2c01e4ce [chore] cleanup 2024-12-16 08:32:35 +01:00
Zhijie He
12c27f416f [enh] add engine- prefix, replace blank space to - 2024-12-16 08:32:35 +01:00
Zhijie He
e90fa48018 [fix]: fix engine name may break some css style, contains "right", "left", "center" 2024-12-16 08:32:35 +01:00
dependabot[bot]
3742d558ac [upd] pypi: Bump pylint from 3.3.1 to 3.3.2
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.1...v3.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-14 08:33:35 +01:00
dependabot[bot]
db67efae6f [upd] pypi: Bump typer-slim from 0.14.0 to 0.15.1
Bumps [typer-slim](https://github.com/fastapi/typer) from 0.14.0 to 0.15.1.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.14.0...0.15.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-14 08:33:14 +01:00
dependabot[bot]
b8d2d2df8a [upd] pypi: Bump sphinxcontrib-programoutput from 0.17 to 0.18
Bumps [sphinxcontrib-programoutput](https://github.com/NextThought/sphinxcontrib-programoutput) from 0.17 to 0.18.
- [Changelog](https://github.com/OpenNTI/sphinxcontrib-programoutput/blob/master/CHANGES.rst)
- [Commits](https://github.com/NextThought/sphinxcontrib-programoutput/compare/0.17...0.18)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-14 08:31:39 +01:00
Markus Heiser
c60fe999cf Update data - locales
./searxng_extra/update/update_locales.py

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-13 18:45:14 +01:00
Markus Heiser
f952668fde [l10n] adding new language Tatar (tt)
$ ./manage pyenv.cmd bash
    $ pybabel init -i searx/translations/messages.pot -d searx/translations -l tt
    creating catalog searx/translations/tt/LC_MESSAGES/messages.po based on searx/translations/messages.pot

Closes: https://github.com/searxng/searxng/issues/4098

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-13 18:45:14 +01:00
searxng-bot
8791345869 [l10n] update translations from Weblate
941da8a11 - 2024-12-13 - Kita Ikuyo <searinminecraft@courvix.com>
7c9e8973a - 2024-12-12 - return42 <return42@users.noreply.translate.codeberg.org>
1ef3f3b6e - 2024-12-12 - OpenCode <OpenCode@users.noreply.translate.codeberg.org>
8edb4af3d - 2024-12-11 - KhietVo <KhietVo@users.noreply.translate.codeberg.org>
77469663d - 2024-12-11 - dansmachina <dansmachina@users.noreply.translate.codeberg.org>
be726d2c7 - 2024-12-09 - kkrawczyk <kkrawczyk@users.noreply.translate.codeberg.org>
dfb9dd20f - 2024-12-10 - artnay <artnay@users.noreply.translate.codeberg.org>
a1977736f - 2024-12-09 - return42 <return42@users.noreply.translate.codeberg.org>
e17d999d7 - 2024-12-07 - Eryk Michalak <gnu.ewm@protonmail.com>
2024-12-13 08:15:55 +01:00
Markus Heiser
0245e82bd2 [build] /static 2024-12-01 15:04:05 +01:00
Markus Heiser
8c3f0c3d52 [fix] if image load fails on client side, show default image
BTW: change icon color from red to gray

Closes:

- https://github.com/searxng/searxng/issues/4066

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-01 15:04:05 +01:00
Bnyro
4a8d333d5b [build] /static 2024-12-01 13:08:50 +01:00
Bnyro
a7537a6935 [feat] search: add url formatting preference 2024-12-01 13:08:50 +01:00
Bnyro
cae07b9bf8 [build] /static 2024-11-29 20:24:06 +01:00
Bnyro
365c4d0643 [chore] search.js: remove leftovers from shift to multiselect categories PR 2024-11-29 20:24:06 +01:00
Markus Heiser
bb04699b17 [fix] unit tests: call searx.search.initialize in test's setUp
Depending on the order the unit tests are executed, the searx.search module is
initalized or not, issue reported in [1]::

    Traceback (most recent call last):
      File "searxng/tests/unit/test_results.py", line 72, in test_result_merge_by_title
        self.container.extend('stract', [fake_result(engine='stract', title='short title')])
      File "searxng/searx/results.py", line 243, in extend
        histogram_observe(standard_result_count, 'engine', engine_name, 'result', 'count')
      File "searxng/searx/metrics/__init__.py", line 49, in histogram_observe
        histogram_storage.get(*args).observe(duration)
        ^^^^^^^^^^^^^^^^^^^^^
      AttributeError: 'NoneType' object has no attribute 'get'

To ensure that the searx.search module is initialized, the

- searx.engines.load_engines is replace by
- searx.search.initialize

[1] https://github.com/searxng/searxng/pull/3932#discussion_r1822406569

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-29 15:26:03 +01:00
Allen
6948689d2a [enh] use longest title and test get_ordered_results() 2024-11-29 15:26:03 +01:00
Bnyro
94aafc83a6 [build] /static 2024-11-29 15:05:00 +01:00
Bnyro
6a9b97cad2 [feat] search: shift/ctrl click a category to select multiple categories 2024-11-29 15:05:00 +01:00
return42
6ca89e1319 [data] update searx.data - update_engine_traits.py 2024-11-29 14:57:06 +01:00
Markus Heiser
605f38b352 [fix] update_currencies.py: github CI has longer timeouts
Github action Update data - update_currencies [1]:

    ./manage pyenv.cmd python ./searxng_extra/update/update_currencies.py

fails with ``httpcore.ReadTimeout`` / the default timeout is 3sec.

[1] https://github.com/searxng/searxng/actions/runs/12076864366/job/33703464399

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-29 14:50:17 +01:00
searxng-bot
2717ffd094 [l10n] update translations from Weblate
ba1cebf8b - 2024-11-25 - saledai <saledai@users.noreply.translate.codeberg.org>
25da337e5 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
8379976e0 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
fa080d132 - 2024-11-26 - ghose <ghose@users.noreply.translate.codeberg.org>
42ac0f2d2 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
bb9c1d4b3 - 2024-11-25 - Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
768be588f - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
13a63779a - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
649d5494b - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
7ce063699 - 2024-11-25 - saledai <saledai@users.noreply.translate.codeberg.org>
6f4ed2d9d - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
02a34ef99 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
de3ab1d94 - 2024-11-25 - AndersNordh <AndersNordh@users.noreply.translate.codeberg.org>
d18f56fa1 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
dff38e041 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
2e5c6694e - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
c9e9e0864 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
c625e848c - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
84a87ab05 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
28ebc3a97 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
b340f5ea8 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
e5fdd25ad - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
cf6b35d0a - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
da0ec01bc - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
7ca3c3051 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
adffd7987 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
d5c101710 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
f862cf05a - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
e7f4c00a8 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
2a25e9a1b - 2024-11-25 - Linerly <Linerly@users.noreply.translate.codeberg.org>
8cd81e701 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
80726a79a - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
ab7a56a81 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
ed44ff721 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
3b2b40d69 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
51926fb18 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
e823c2915 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
57b884908 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
525fcc395 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
fe2bf7267 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
d21ac5278 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
d18e3376b - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
a638f5ad5 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
c94c9b313 - 2024-11-25 - AndersNordh <AndersNordh@users.noreply.translate.codeberg.org>
aaa801da2 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
3b4961df8 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
6698f2069 - 2024-11-24 - return42 <return42@users.noreply.translate.codeberg.org>
73a117384 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
054d5cba4 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
1d3f21946 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
92ded48b1 - 2024-11-25 - return42 <return42@users.noreply.translate.codeberg.org>
d84b77ff9 - 2024-11-24 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
2ece96ac9 - 2024-11-24 - Priit Jõerüüt <jrtcdbrg@users.noreply.translate.codeberg.org>
2024-11-29 14:23:56 +01:00
dependabot[bot]
2fc131bfd6 [upd] pypi: Bump typer-slim from 0.13.1 to 0.14.0
Bumps [typer-slim](https://github.com/fastapi/typer) from 0.13.1 to 0.14.0.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.13.1...0.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-29 14:23:05 +01:00
Markus Heiser
540323a4b0 [mod] hardening xpath engine: ignore empty results
A SearXNG maintainer on Matrix reported a traceback::

    File "searxng-src/searx/engines/xpath.py", line 272, in response
      dom = html.fromstring(resp.text)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "searx-pyenv/lib/python3.11/site-packages/lxml/html/__init__.py", line 850, in fromstring
      doc = document_fromstring(html, parser=parser, base_url=base_url, **kw)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "searx-pyenv/lib/python3.11/site-packages/lxml/html/__init__.py", line 738, in document_fromstring
      raise etree.ParserError(
    lxml.etree.ParserError: Document is empty

I don't have an example to reproduce the issue, but the issue and this patch are
clearly recognizable even without an example.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-29 14:20:31 +01:00
dependabot[bot]
cf034488d5 [upd] pypi: Bump fasttext-predict from 0.9.2.2 to 0.9.2.4
Bumps [fasttext-predict](https://github.com/searxng/fasttext-predict) from 0.9.2.2 to 0.9.2.4.
- [Release notes](https://github.com/searxng/fasttext-predict/releases)
- [Commits](https://github.com/searxng/fasttext-predict/compare/v0.9.2.2...v0.9.2.4)

---
updated-dependencies:
- dependency-name: fasttext-predict
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-29 10:21:13 +01:00
dependabot[bot]
011cb672f1 [upd] pypi: Bump selenium from 4.26.1 to 4.27.1
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.26.1 to 4.27.1.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-29 10:20:53 +01:00
return42
32260a2738 [data] update searx.data - update_wikidata_units.py 2024-11-29 08:01:13 +01:00
return42
db60c91a94 [data] update searx.data - update_ahmia_blacklist.py 2024-11-29 08:00:56 +01:00
return42
2b9cc53082 [data] update searx.data - update_engine_descriptions.py 2024-11-29 07:59:55 +01:00
return42
a3d49d8d4f [data] update searx.data - update_firefox_version.py 2024-11-29 07:58:23 +01:00
Bnyro
0ca2520115 [feat] json/xpath engine: config option for method and body 2024-11-28 09:53:21 +01:00
Bnyro
5a9c1c6b5b [fix] crowdview engine: html tags in title and content 2024-11-28 06:19:55 +01:00
Markus Heiser
7b6b772e34 [fix] wikicommons engine: remove HTML tags from result items
BTW: humanize filesize (Bytes) to KB, MB, GB ..

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-28 06:05:45 +01:00
Markus Heiser
342d321196 [fix] google engine: remove <script> tags from result items
In some results, Google returns a <script> tag that must be removed before
extracting the content.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-27 13:49:45 +01:00
Austin-Olacsi
55481a6377 [fix] findthatmeme engine URLs have changed 2024-11-27 11:08:23 +01:00
Markus Heiser
78f5300830 [chore] drop sjp engine: WEB side has changed a long time ago
The WEB page (PL only) has changed and there is now also a kind of CAPTCHA.
There is currently no possibility to restore the function of this engine.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-26 15:45:02 +01:00
Markus Heiser
ac0c6cc2d1 [chore] remove invalid base_url from settings.yml engines
The engines do not have / do not need a property `base_url`, lets remove it from
the settings.yml

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-26 10:06:07 +01:00
Markus Heiser
36a6f9c95f [fix] engine: Library of Congress - image & thumb links
The properties `item.service_medium` and `item.thumb_gallery` are not given for
every result item.  It is more reliable to use the first (thumb) and
last (image) URL in the list of of URLs in `image_url`.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-26 09:36:59 +01:00
Bnyro
66f6495a22
[fix] duckduckgo extra: crashes and returns no results 2024-11-25 17:00:52 +01:00
Bnyro
5bf3fbc93b
[fix] openmetrics: value is None if there's no data 2024-11-25 16:57:03 +01:00
Bnyro
bad070b4bc [build] /static 2024-11-25 09:34:02 +01:00
Markus Heiser
cf8c36f351 [mod] add CSS (LESS) to xsl style to view rss in browser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-25 09:34:02 +01:00
Markus Heiser
5fbea0b62d [refactor] <type> element isn't a part of the RSS 2.0 spec [1]
[1] https://cyber.harvard.edu/rss/rss.html

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-25 09:34:02 +01:00
Bnyro
eb59b4604a [feat] rss: add xsl style to view rss in browser 2024-11-25 09:34:02 +01:00
Bnyro
98f9a380ed [chore] rss: rename from searx to SearXNG 2024-11-25 09:34:02 +01:00
Grant Lanham
68b4961b81 [test] add additional tests for preferences 2024-11-24 19:55:21 +01:00
Grant Lanham
c02268d56e [fix] remove unknown_params from preferences 2024-11-24 19:55:21 +01:00
Bnyro
8744dd3c71 [feat] metrics: support for open metrics 2024-11-24 14:25:49 +01:00
Markus Heiser
7927baf545 [upd] github CI: actions/cache@v3 to actions/cache@v4
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-24 14:07:07 +01:00
Bnyro
e4961142e3 [build] /static 2024-11-24 12:41:57 +01:00
Bnyro
f31a3a2053 [chore] *: fix typos detected by typos-cli 2024-11-24 12:41:57 +01:00
Markus Heiser
0253c10b52 [feat] engine: add adobe stock video and audio engines
The engine has been revised; there is now the option ``adobe_content_types``
with which it is possible to configure engines for video and audio from the
adobe stock.  BTW this patch adds documentation to the engine.

To test all three engines in one use a search term like::

    !asi !asv !asa sound

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-24 11:56:12 +01:00
Bnyro
f20a7632f1 [feat] engine: add adobe stock photos 2024-11-24 11:56:12 +01:00
Markus Heiser
0f9694c90b [clean] Internet Archive Scholar search API no longer exists
Engine was added in #2733 but the API does no longer exists. Related:

- https://github.com/searxng/searxng/issues/4038

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-23 17:59:38 +01:00
Markus Heiser
ccc4f30b20 [doc] update quantities on the intro page
The quantities on the intro page were partly out of date / example; we already
have 210 engines and not just 70. To avoid having to change the quantities
manually in the future, they are now calculated from the jinja context

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-23 16:33:08 +01:00
Markus Heiser
c4b874e9b0 [fix] engine Library of Congress: fix API URL loc.gov -> www.loc.gov
Avoid HTTP 404 and redirects. Requests to the JSON/YAML API use the base url [1]

    https://www.loc.gov/{endpoint}/?fo=json

[1] https://www.loc.gov/apis/json-and-yaml/requests/

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-23 13:02:24 +01:00
Markus Heiser
7c4e4ebd40 [log] warning with URL in case of 'raise_for_httperror'
In order to be able to implement error handling, it is necessary to know which
URL triggered the exception / the URL has not yet been logged.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-23 11:33:19 +01:00
searxng-bot
b8f1a329d3 [l10n] update translations from Weblate
6581d89b3 - 2024-11-21 - return42 <return42@users.noreply.translate.codeberg.org>
a342903eb - 2024-11-21 - return42 <return42@users.noreply.translate.codeberg.org>
61d3236b9 - 2024-11-21 - return42 <return42@users.noreply.translate.codeberg.org>
cd03e8cc5 - 2024-11-21 - return42 <return42@users.noreply.translate.codeberg.org>
a2399e23a - 2024-11-20 - tentsbet <tentsbet@users.noreply.translate.codeberg.org>
9a5bcc06d - 2024-11-17 - cherrad <cherrad@users.noreply.translate.codeberg.org>
4364e5ef8 - 2024-11-16 - DiamondBrain113 <DiamondBrain113@users.noreply.translate.codeberg.org>
e3a127ec8 - 2024-11-15 - KinoCineaste <KinoCineaste@users.noreply.translate.codeberg.org>
2024-11-22 10:02:42 +01:00
dependabot[bot]
67f7548573 [upd] pypi: Bump typer-slim from 0.13.0 to 0.13.1
Bumps [typer-slim](https://github.com/fastapi/typer) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.13.0...0.13.1)

---
updated-dependencies:
- dependency-name: typer-slim
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-22 09:59:26 +01:00
dependabot[bot]
f40fc2dd4f [upd] pypi: Bump setproctitle from 1.3.3 to 1.3.4
Bumps [setproctitle](https://github.com/dvarrazzo/py-setproctitle) from 1.3.3 to 1.3.4.
- [Changelog](https://github.com/dvarrazzo/py-setproctitle/blob/master/HISTORY.rst)
- [Commits](https://github.com/dvarrazzo/py-setproctitle/compare/version-1.3.3...version-1.3.4)

---
updated-dependencies:
- dependency-name: setproctitle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-22 09:58:19 +01:00
Markus Heiser
10d3af84b8 [fix] engine: duckduckgo - don't quote query string
The query string send to DDG must not be qouted.

The query string was URL-qouted in #4011, but the URL-qouted query string result
in unexpected *URL decoded* and other garbish results as reported in #4019
and #4020.  To test compare the results of a query like::

    !ddg Häuser und Straßen :de
    !ddg Häuser und Straßen :all
    !ddg 房屋和街道 :all
    !ddg 房屋和街道 :zh

Closed:

- [#4019] https://github.com/searxng/searxng/issues/4019
- [#4020] https://github.com/searxng/searxng/issues/4020

Related:

- [#4011] https://github.com/searxng/searxng/pull/4011

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-17 18:14:22 +01:00
dependabot[bot]
4b57bc3db1 [upd] pypi: Bump flask from 3.0.3 to 3.1.0
Bumps [flask](https://github.com/pallets/flask) from 3.0.3 to 3.1.0.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/3.0.3...3.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 13:23:24 +01:00
searxng-bot
a345cbbe51 [l10n] update translations from Weblate
0216898a3 - 2024-11-14 - KhietVo <KhietVo@users.noreply.translate.codeberg.org>
3293db4c8 - 2024-11-14 - return42 <return42@users.noreply.translate.codeberg.org>
574e0d683 - 2024-11-13 - lrnz2 <lrnz2@users.noreply.translate.codeberg.org>
a32d9d158 - 2024-11-08 - Aadniz <Aadniz@users.noreply.translate.codeberg.org>
2024-11-15 13:20:52 +01:00
Nicolas Dato
abd9b271bc [fix] engine: duckduckgo - only uses first word of the search terms
during the revision in PR #3955 the query string was accidentally converted into
a list of words, further the query must be quoted before POSTed in the ``data``
field, see ``urllib.parse.quote_plus`` [1]

[1] https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote_plus

Closed: #4009
Co-Authored-by: @return42
2024-11-14 09:33:54 +01:00
Leo Liu
dfaf5868e2 [fix] settings.yml - enabled_plugins: document to reflect default settings
Remove 'Autodetect search language', which is no longer valid, from settings,
and add 'Unit converter plugin', which is now default enabled, to settings.
2024-11-10 16:09:41 +01:00
Leo Liu
b173f3a8b9 Fix scheduler.lua 2024-11-10 15:53:58 +01:00
dependabot[bot]
2fbf15eccb [upd] pypi: Bump typer-slim from 0.12.5 to 0.13.0
Bumps [typer-slim](https://github.com/fastapi/typer) from 0.12.5 to 0.13.0.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.12.5...0.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-08 08:51:43 +01:00
searxng-bot
08c5f258d8 [l10n] update translations from Weblate
8d90a7e6d - 2024-11-06 - sahussawud <sahussawud@users.noreply.translate.codeberg.org>
41ee8bb0d - 2024-11-02 - laaknor <laaknor@users.noreply.translate.codeberg.org>
c1a30afab - 2024-11-02 - return42 <return42@users.noreply.translate.codeberg.org>
627ab7a8e - 2024-11-01 - zarlin <zarlin@users.noreply.translate.codeberg.org>
2024-11-08 08:45:07 +01:00
dependabot[bot]
cd384a8a60 [upd] pypi: Bump selenium from 4.25.0 to 4.26.1
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.25.0 to 4.26.1.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-06 10:01:13 +01:00
Markus Heiser
c4055e449f [fix] issues reported by make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-06 08:16:21 +01:00
Markus Heiser
2fdbf2622b [mod] lint github YAML config files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-06 08:16:21 +01:00
Bnyro
b07c0ae39f [fix] annas archive: crash when no thumbnail, differing results, paging 2024-11-01 12:49:33 +01:00
Markus Heiser
56e3d72a76 [fix] CI: remove target test.coverage from python's test matrix
The test.coverage cause a lot of failed CI jobs for reasons that cannot be
explained.  As we do not monitor the coverage anyway, it is superfluous to run
this job, especially as it only has a disruptive effect on the CI.

BTW and the CI action upload-artifact@v3 is deprecated [1]

[1] https://github.com/actions/upload-artifact?tab=readme-ov-file#actionsupload-artifact

Related: https://github.com/searxng/searxng/issues/3983
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-01 10:14:57 +01:00
searxng-bot
cc148a76b0 [l10n] update translations from Weblate
a4cdaaa26 - 2024-10-30 - Juno Takano <jutty@users.noreply.translate.codeberg.org>
46bad3a79 - 2024-10-29 - saltsnorter <saltsnorter@users.noreply.translate.codeberg.org>
6a4096da9 - 2024-10-27 - Eryk Michalak <gnu.ewm@protonmail.com>
64815d956 - 2024-10-28 - ljansen <ljansen@users.noreply.translate.codeberg.org>
851ae554d - 2024-10-26 - return42 <return42@users.noreply.translate.codeberg.org>
24f16d5e3 - 2024-10-26 - return42 <return42@users.noreply.translate.codeberg.org>
8278d1cb9 - 2024-10-26 - Atul_Eterno <Atul_Eterno@users.noreply.translate.codeberg.org>
2024-11-01 08:30:38 +01:00
uply23333
fa108c140f [fix] google: display every result when keyword is contained in content field 2024-10-31 13:21:32 +01:00
Markus Heiser
fa4dfd4efe [fix] favicons: msgspec.ValidationError: Expected Path, got str - at $.favicons.cache.db_url
Closes: https://github.com/searxng/searxng/issues/3975
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-29 18:22:22 +01:00
Markus Heiser
b183e620d8 [refactor] engine: duckduckgo - https://html.duckduckgo.com/html
The entire source code of the duckduckgo engine has been reengineered and
purified.

1. DDG used the URL https://html.duckduckgo.com/html for no-JS requests whose
   response is also easier to parse than the previous
   https://lite.duckduckgo.com/lite/ URL

2. the bot detection of DDG has so far caused problems and often led to a
   CAPTCHA, this can be circumvented using `'Sec-Fetch-Mode'] = “navigate”`

Closes: https://github.com/searxng/searxng/issues/3927
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-29 14:56:27 +01:00
Markus Heiser
f63f97c56c Revert "Fix for broken docker builds"
This reverts commit 4ef1c706f8.
2024-10-29 13:50:38 +01:00
Markus Heiser
163031c394 Revert "[fix] typo in Dockerfile"
This reverts commit 038a2ff6bd.
2024-10-29 13:50:38 +01:00
Markus Heiser
3e5621e1af [refactor] replace pydantic by msgspec
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-29 13:50:38 +01:00
return42
e392892578 [data] update searx.data - update_firefox_version.py 2024-10-29 09:30:40 +01:00
return42
68ed8245da [data] update searx.data - update_ahmia_blacklist.py 2024-10-29 09:29:58 +01:00
return42
2d748d1d74 [data] update searx.data - update_currencies.py 2024-10-29 09:29:18 +01:00
return42
2985ece0ca [data] update searx.data - update_wikidata_units.py 2024-10-29 09:28:58 +01:00
return42
adc38c5800 [data] update searx.data - update_engine_traits.py 2024-10-29 09:28:28 +01:00
return42
a084436ff4 [data] update searx.data - update_engine_descriptions.py 2024-10-29 09:17:30 +01:00
Markus Heiser
b176323e89 [fix] calculator: use locale from UI (not from selected language)
Closes: https://github.com/searxng/searxng/issues/3956
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-28 15:53:57 +01:00
Markus Heiser
da28f5280b [fix] limiter: don't hard code settings folder to /etc/searxng
The location of the local settings depends on environment ``SEARXNG_SETTINGS_PATH``
and can be different from ``/etc/searxng``.  Issue was reported on Matrix [1].

To get the location function ``searx.settings_loader.get_user_cfg_folder()``
should be used.

[1] https://matrix.to/#/!vxScbLNEAmRvOraXBn:matrix.org/$_eLS0JpE9oVEWsiGJkqJnWcFWEeZClIMGDK6cWv_Q4g?via=matrix.org&via=tchncs.de&via=envs.net

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-28 12:51:05 +01:00
dependabot[bot]
543ab92fde [upd] pypi: Bump pallets-sphinx-themes from 2.2.0 to 2.3.0
Bumps [pallets-sphinx-themes](https://github.com/pallets/pallets-sphinx-themes) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/pallets/pallets-sphinx-themes/releases)
- [Changelog](https://github.com/pallets/pallets-sphinx-themes/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/pallets-sphinx-themes/compare/2.2.0...2.3.0)

---
updated-dependencies:
- dependency-name: pallets-sphinx-themes
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-27 10:48:26 +01:00
Markus Heiser
e08ff05fff [fix] add missing tomli to the requirements.txt
Package ``tomli`` is needed for py < 3.11, BTW remove the no longer needed
pytomlpp package.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-26 15:59:42 +02:00
Markus Heiser
a3921b5ed7 [mod] add test to check compat.py module
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-26 15:59:42 +02:00
Markus Heiser
ae496e9dd0 [build] /static 2024-10-26 08:34:21 +02:00
JJ
9b01e3c9d6 [mod] shrink new favicons in search results 2024-10-26 08:34:21 +02:00
searxng-bot
446ee2dd25 [l10n] update translations from Weblate
21c063bf1 - 2024-10-20 - Priit Jõerüüt <jrtcdbrg@users.noreply.translate.codeberg.org>
2024-10-26 07:29:54 +02:00
Markus Heiser
b14d885f23 [fix] favicons: don't hard code settings folder to /etc/searxng
The location of the local settings depends on environment ``SEARXNG_SETTINGS_PATH``
and can be different from ``/etc/searxng``.  Issue was reported on Matrix [1].

To get the location function ``searx.settings_loader.get_user_cfg_folder()``
should be used.

[1] https://matrix.to/#/!vxScbLNEAmRvOraXBn:matrix.org/$5xNMYvONGB-mPt2B3ttoL27QncRFhkjGkO-TISdmP08?via=matrix.org&via=tchncs.de&via=envs.net

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-23 05:29:15 +02:00
Markus Heiser
050451347b [fix] engine: duckduckgo - CAPTCHA detection
The previous implementation could not distinguish a CAPTCHA response from an
ordinary result list.  In the previous implementation a CAPTCHA was taken as a
result list where no items are in.

DDG does not block IPs.  Instead, a CAPTCHA wall is placed in front of request
on a dubious request.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-19 14:55:44 +02:00
dependabot[bot]
88caa1d7db [upd] pypi: Bump sphinx-issues from 4.1.0 to 5.0.0
Bumps [sphinx-issues](https://github.com/sloria/sphinx-issues) from 4.1.0 to 5.0.0.
- [Commits](https://github.com/sloria/sphinx-issues/compare/4.1.0...5.0.0)

---
updated-dependencies:
- dependency-name: sphinx-issues
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-19 11:18:42 +02:00
dependabot[bot]
a0c704c860 [upd] pypi: Bump uvloop from 0.20.0 to 0.21.0
Bumps [uvloop](https://github.com/MagicStack/uvloop) from 0.20.0 to 0.21.0.
- [Release notes](https://github.com/MagicStack/uvloop/releases)
- [Commits](https://github.com/MagicStack/uvloop/compare/v0.20.0...v0.21.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-19 11:06:25 +02:00
dependabot[bot]
219040c766 [upd] pypi: Bump pallets-sphinx-themes from 2.1.3 to 2.2.0
Bumps [pallets-sphinx-themes](https://github.com/pallets/pallets-sphinx-themes) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/pallets/pallets-sphinx-themes/releases)
- [Changelog](https://github.com/pallets/pallets-sphinx-themes/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/pallets-sphinx-themes/compare/2.1.3...2.2.0)

---
updated-dependencies:
- dependency-name: pallets-sphinx-themes
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-19 11:05:55 +02:00
searxng-bot
eeae3664c2 [l10n] update translations from Weblate
17f8bce27 - 2024-10-17 - hemie143 <hemie143@users.noreply.translate.codeberg.org>
fbeb82816 - 2024-10-15 - return42 <return42@users.noreply.translate.codeberg.org>
eacea331b - 2024-10-15 - return42 <return42@users.noreply.translate.codeberg.org>
36156687e - 2024-10-15 - return42 <return42@users.noreply.translate.codeberg.org>
61cb3375d - 2024-10-15 - return42 <return42@users.noreply.translate.codeberg.org>
2b3c92d37 - 2024-10-13 - Pedro_Tresp <Pedro_Tresp@users.noreply.translate.codeberg.org>
d4febbf8a - 2024-10-12 - stoychevww <stoychevww@users.noreply.translate.codeberg.org>
2024-10-19 11:01:32 +02:00
Markus Heiser
038a2ff6bd [fix] typo in Dockerfile
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-17 19:57:33 +02:00
rhee876527
4ef1c706f8 Fix for broken docker builds
Add temporary fix to broken docker builds in anticipation of yet to be released pydantic version v2.24.1
2024-10-17 19:14:33 +02:00
mrpaulblack
cf7627557a [build] /static 2024-10-16 19:46:36 +02:00
mrpaulblack
2cacc560d6 [fix] simple theme: unset width for images on mobile layout
* fix fallout from 2fbedc4316
-> similar to 14fb187548
* change: set image height to 10rem
-> this is in my opinion more sensible size for mobile
2024-10-16 19:46:36 +02:00
Markus Heiser
058a072404 [build] /static 2024-10-15 15:54:58 +02:00
Markus Heiser
14fb187548 [fix] stretching pics in "pic search"
Issue is described in:

- https://github.com/searxng/searxng/issues/3915

The issue was caused bei merge of PR:

- https://github.com/searxng/searxng/pull/3895

Solution:

- Unset `width` for objects of class `.result-images`.

Tested by `make run` and query a list of results, containing `.result` and
`.result-images` objects:

     !images !go bäder :de

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Closes: https://github.com/searxng/searxng/issues/3915
2024-10-15 15:54:58 +02:00
Markus Heiser
c96ba25f5b [fix] online_currency.py: if more alternatives, use the last in the list
If there are more than one ISO 4217 numeric codes [1] for a currency use the
last one in the list of alternatives [2].

[1] https://en.wikipedia.org/wiki/ISO_4217#Active_codes_(list_one)
[2] https://en.wikipedia.org/wiki/ISO_4217#Historical_codes

Closes: https://github.com/searxng/searxng/issues/3713
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-15 15:20:39 +02:00
dependabot[bot]
2986681b31 [upd] pypi: Bump pylint from 3.2.7 to 3.3.1
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.7 to 3.3.1.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.7...v3.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-15 14:29:10 +02:00
Bnyro
9f48d5f84f [feat] engine: support for openlibrary 2024-10-15 13:06:00 +02:00
Grant Lanham
3e87354f0e [fix] float operations in calculator plugin
This patch adds an additional *isinstance* check within the ast parser to check
for float along with int, fixing the underlying issue.

Co-Authored: Markus Heiser <markus.heiser@darmarit.de>
2024-10-15 08:10:52 +02:00
Grant Lanham
d448def1a6 [refactor] unit tests (continued) - plugins
This commit includes some refactoring in unit tests.  As we test more plugins,
it seems unweildy to include every test class in the test_plugins.py file.  This
patch split apart all of the test plugins to their own respective files,
including the new test_plugin_calculator.py file.
2024-10-15 08:10:52 +02:00
dependabot[bot]
8ba203c72b [upd] pypi: Bump sphinx-tabs from 3.4.5 to 3.4.7
Bumps [sphinx-tabs](https://github.com/executablebooks/sphinx-tabs) from 3.4.5 to 3.4.7.
- [Release notes](https://github.com/executablebooks/sphinx-tabs/releases)
- [Changelog](https://github.com/executablebooks/sphinx-tabs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/executablebooks/sphinx-tabs/compare/v3.4.5...v3.4.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-15 07:55:07 +02:00
Markus Heiser
e275f8e18e [data] update searx.data - update_engine_traits.py
Patches generated by::

    make data.traits

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-15 06:37:01 +02:00
0xhtml
8b6a3f3e11 [enh] engine: mojeek - add language support
Improve region and language detection / all locale

Testing has shown the following behaviour for the different
default and empty values of Mojeeks parameters:

| param    | idx | value  | behaviour                 |
| -------- | --- | ------ | ------------------------- |
| region   |  0  | ''     | detect region based on IP |
| region   |  1  | 'none' | all regions               |
| language |  0  | ''     | all languages             |
2024-10-15 06:37:01 +02:00
Snoweuph
5b6f40414a [mod] engine gitea: compatible with modern gitea or forgejo
Without this patch the Gitea Search Engine is only partially compatible with
modern gitea or forgejo:

- Fixing some JSON Fields
- Using Repository Avatar when Available

To Verify My results you can look at the Modern API doc and results, its
available on all Gitea and Forgejo instance by Default.  Heres an Search API
result of Mine:

- https://git.euph.dev/api/v1/repos/search?q=ccna
2024-10-14 14:39:11 +02:00
Markus Heiser
7e8b330b3e [build] /static 2024-10-12 11:08:44 +02:00
Markus Heiser
2fbedc4316 [fix] simple theme: fix deformed result item
Setting ``box-sizing: border-box;`` [1] and ``width`` to fix deformed results
reported in [2].

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing
[2] https://github.com/searxng/searxng/issues/3892

Closes: #3892

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-12 11:08:44 +02:00
Émilien (perso)
bafb92e646 reword join the searxng community 2024-10-12 11:08:00 +02:00
dependabot[bot]
1b8db63b33 [upd] pypi: Bump pydantic from 2.8.2 to 2.9.2
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.8.2 to 2.9.2.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.8.2...v2.9.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-11 18:39:35 +02:00
searxng-bot
5a32ee410b [l10n] update translations from Weblate
83a8d6627 - 2024-10-10 - Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
c4474a60b - 2024-10-10 - return42 <return42@users.noreply.translate.codeberg.org>
a632dff03 - 2024-10-09 - bobolau <bobolau@users.noreply.translate.codeberg.org>
e8944e486 - 2024-10-08 - elek <elek@users.noreply.translate.codeberg.org>
2bd9c1229 - 2024-10-07 - AndersNordh <AndersNordh@users.noreply.translate.codeberg.org>
5cb441b60 - 2024-10-07 - return42 <return42@users.noreply.translate.codeberg.org>
aba724c87 - 2024-10-07 - return42 <return42@users.noreply.translate.codeberg.org>
92bea9f03 - 2024-10-08 - Linerly <Linerly@users.noreply.translate.codeberg.org>
f574a3a3f - 2024-10-08 - ghose <ghose@users.noreply.translate.codeberg.org>
4845ea7e2 - 2024-10-08 - Ricky-Tigg <Ricky-Tigg@users.noreply.translate.codeberg.org>
7d0b4d0d9 - 2024-10-07 - AndersNordh <AndersNordh@users.noreply.translate.codeberg.org>
6431436b2 - 2024-10-07 - AndersNordh <AndersNordh@users.noreply.translate.codeberg.org>
30e671f30 - 2024-10-07 - Fabio_Perri <Fabio_Perri@users.noreply.translate.codeberg.org>
6629d15cb - 2024-10-07 - AndersNordh <AndersNordh@users.noreply.translate.codeberg.org>
a3b4d53cc - 2024-10-05 - 0ko <0ko@users.noreply.translate.codeberg.org>
1763b224e - 2024-10-05 - Atul_Eterno <Atul_Eterno@users.noreply.translate.codeberg.org>
0ea2b49a8 - 2024-10-06 - return42 <return42@users.noreply.translate.codeberg.org>
837324445 - 2024-10-05 - Fjuro <fjuro@alius.cz>
eec53d3b1 - 2024-10-05 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
4cd76e531 - 2024-10-05 - Priit Jõerüüt <jrtcdbrg@users.noreply.translate.codeberg.org>
2024-10-11 18:33:17 +02:00
Allen
81aaca8f44 [mod] use quad9 dns for connectivity checks when lxc
https://www.quad9.net/about/
https://bgp.tools/as/42#whois
2024-10-10 07:05:46 +02:00
Markus Heiser
f1f0dfd231 Revert "[fix] docker: alpine - install apk py3-pydantic-core"
This reverts commit 5332d3a0b8.
2024-10-07 13:18:54 +02:00
Markus Heiser
5332d3a0b8 [fix] docker: alpine - install apk py3-pydantic-core
Alpine Linux uses musl libc (instead of glibc). However, there is no pre-build
of the pydantic-core python package for musl lib on armv7.  Alternatively this
patch installs py3-pydantic-core from Alpine packages [1]

[1] https://pkgs.alpinelinux.org/package/edge/community/armv7/py3-pydantic-core

- closes: https://github.com/searxng/searxng/issues/3887

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-06 11:59:57 +02:00
Markus Heiser
f00fa76eda [build] /static 2024-10-05 08:18:28 +02:00
Markus Heiser
a631f77401 [mod] favicons: simplify RTL in template & CSS
Comes from a sughgestion in:

- https://github.com/searxng/searxng/pull/3727#issuecomment-2388998803

Suggested-by: Bnyro <bnyro@tutanota.com>
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-05 08:18:28 +02:00
Markus Heiser
a7d02d4101 [doc] documentation of the favicons infrastructure
Run ``make docs.live`` and visit http://0.0.0.0:8000/admin/searx.favicons.html

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-05 08:18:28 +02:00
Markus Heiser
5ded9ada82 [mod] UI: add favicon's border- and background color to the definitons
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-05 08:18:28 +02:00
Markus Heiser
7ab577a1fb [mod] Revision of the favicon solution
All favicons implementations have been documented and moved to the Python
package:

    searx.favicons

There is a configuration (based on Pydantic) for the favicons and all its
components:

    searx.favicons.config

A solution for caching favicons has been implemented:

    searx.favicon.cache

If the favicon is already in the cache, the returned URL is a data URL [1]
(something like `data:image/png;base64,...`).  By generating a data url from
the FaviconCache, additional HTTP roundtripps via the favicon_proxy are saved:

    favicons.proxy.favicon_url

The favicon proxy service now sets a HTTP header "Cache-Control: max-age=...":

    favicons.proxy.favicon_proxy

The resolvers now also provide the mime type (data, mime):

    searx.favicon.resolvers

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-05 08:18:28 +02:00
Markus Heiser
c49a2707c1 [mod] sqlitedb: access to SQLite databases a little more convenient.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-05 08:18:28 +02:00
Brock Vojkovic
e17d7632d0 [feat] add favicons to result urls 2024-10-05 08:18:28 +02:00
searxng-bot
3e747d0491 [l10n] update translations from Weblate
b59b0d937 - 2024-10-04 - ghose <ghose@users.noreply.translate.codeberg.org>
770781548 - 2024-10-04 - return42 <return42@users.noreply.translate.codeberg.org>
0d5f72f8c - 2024-10-04 - return42 <return42@users.noreply.translate.codeberg.org>
b14fd01b1 - 2024-10-04 - return42 <return42@users.noreply.translate.codeberg.org>
e457a6b1c - 2024-10-03 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
328b93af4 - 2024-10-03 - Fjuro <fjuro@alius.cz>
2024-10-04 09:18:26 +02:00
Grant Lanham
44a06190bb [refactor] unit tests to utilize paramaterized and break down monolithic tests
- for tests which perform the same arrange/act/assert pattern but with different
  data, the data portion has been moved to the ``paramaterized.expand`` fields

- for monolithic tests which performed multiple arrange/act/asserts,
  they have been broken up into different unit tests.

- when possible, change generic assert statements to more concise
  asserts (i.e. ``assertIsNone``)

This work ultimately is focused on creating smaller and more concise tests.
While paramaterized may make adding new configurations for existing tests
easier, that is just a beneficial side effect.  The main benefit is that smaller
tests are easier to reason about, meaning they are easier to debug when they
start failing.  This improves the developer experience in debugging what went
wrong when refactoring the project.

Total number of tests went from 192 -> 259; or, broke apart larger tests into 69
more concise ones.
2024-10-03 13:20:32 +02:00
dependabot[bot]
042c7190e6 [upd] pypi: Bump sphinx-autobuild from 2021.3.14 to 2024.10.3
Bumps [sphinx-autobuild](https://github.com/sphinx-doc/sphinx-autobuild) from 2021.3.14 to 2024.10.3.
- [Release notes](https://github.com/sphinx-doc/sphinx-autobuild/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx-autobuild/blob/main/NEWS.rst)
- [Commits](https://github.com/sphinx-doc/sphinx-autobuild/compare/2021.03.14...2024.10.03)

---
updated-dependencies:
- dependency-name: sphinx-autobuild
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-03 13:18:03 +02:00
Markus Heiser
2fd6730d4f [mod] py3.8 EOL / upgrade to actions/setup-python@v5
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-03 13:05:43 +02:00
Markus Heiser
e7a4d7d7c3 [doc] slightly improve documentation of SQL engines
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-03 13:04:06 +02:00
Grant Lanham
2a29e16d25 [feat] implement mariadb engine 2024-10-03 13:04:06 +02:00
Markus Heiser
d48f04e809 [build] /static 2024-10-03 11:05:46 +02:00
Bnyro
421c131707 [refactor] simple theme: *.less - replace hardcoded colors
Closes: https://github.com/searxng/searxng/issues/3842
2024-10-03 11:05:46 +02:00
Bnyro
b42ce34ca8 [build] /static 2024-10-03 10:53:17 +02:00
Bnyro
e4b2823abd [feat] simple theme: pure black theme style 2024-10-03 10:53:17 +02:00
Austin-Olacsi
cbf1e90979 add get_embeded_stream_url to searx.utils 2024-10-03 07:10:53 +02:00
Markus Heiser
f07ab6deb0 [data] update searx.data - update_engine_traits.py
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-09-29 14:29:22 +02:00
0xhtml
0a0fb450b5 [enh] engine: stract - add language/region support 2024-09-29 14:29:22 +02:00
return42
b5009b8610 [data] update searx.data - update_engine_descriptions.py 2024-09-29 13:17:43 +02:00
return42
d6b04d3ba1 [data] update searx.data - update_engine_traits.py 2024-09-29 13:17:06 +02:00
return42
bc6ee05422 [data] update searx.data - update_currencies.py 2024-09-29 13:16:45 +02:00
return42
a4558dda47 [data] update searx.data - update_firefox_version.py 2024-09-29 13:16:25 +02:00
return42
eb31eaaba0 [data] update searx.data - update_ahmia_blacklist.py 2024-09-29 13:15:57 +02:00
return42
609ead9ffe [data] update searx.data - update_wikidata_units.py 2024-09-29 13:14:53 +02:00
dependabot[bot]
f95a5effcc [upd] pypi: Bump selenium from 4.24.0 to 4.25.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.24.0 to 4.25.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.24.0...selenium-4.25.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-28 08:50:35 +02:00
searxng-bot
9bae26a106 [l10n] update translations from Weblate
7f8a5a94e - 2024-09-24 - abhabongse <abhabongse@users.noreply.translate.codeberg.org>
d69f2d929 - 2024-09-23 - kratos <kratos@users.noreply.translate.codeberg.org>
f7f0c0f94 - 2024-09-23 - kratos <kratos@users.noreply.translate.codeberg.org>
52bea48dc - 2024-09-23 - AndersNordh <AndersNordh@users.noreply.translate.codeberg.org>
fe6659955 - 2024-09-22 - tentsbet <tentsbet@users.noreply.translate.codeberg.org>
69a05cbae - 2024-09-22 - Linerly <Linerly@users.noreply.translate.codeberg.org>
2024-09-28 08:49:10 +02:00
dependabot[bot]
940da05f03 [upd] pypi: Bump linuxdoc from 20240509 to 20240924
Bumps [linuxdoc](https://github.com/return42/linuxdoc) from 20240509 to 20240924.
- [Changelog](https://github.com/return42/linuxdoc/blob/master/CHANGELOG)
- [Commits](https://github.com/return42/linuxdoc/commits)

---
updated-dependencies:
- dependency-name: linuxdoc
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-28 08:38:22 +02:00
Grant Lanham
6a3375be37 [fix] use get accessor to pull desc from bing_images 2024-09-26 07:26:51 +02:00
Zhijie He
6be56aee11 add Cloudflare AI Gateway engine
add Cloudflare AI Gateway engine

add settings for Cloudflare AI Gateway engine

set utf8 encode for data, fix non english char cause 500 error

format json data

fixed indentation and config format error

fix line-length limitation in CI

reformatted code for CI

reformatted code for CI

limit system prompts to less 120 chars

cleanup unused variable & format code
2024-09-23 07:02:10 +02:00
Grant Lanham
14241e7dac Add paramaterized with example of refactor
reduce test name size

fix imports
2024-09-22 08:03:02 +02:00
searxng-bot
ea16c82d78 [l10n] update translations from Weblate
7174f090f - 2024-09-15 - MPBDev <MPBDev@users.noreply.translate.codeberg.org>
c7c76552e - 2024-09-14 - return42 <return42@users.noreply.translate.codeberg.org>
9b9ec6361 - 2024-09-14 - kny5 <kny5@users.noreply.translate.codeberg.org>
af19df705 - 2024-09-14 - return42 <return42@users.noreply.translate.codeberg.org>
cc658f945 - 2024-09-15 - Fjuro <fjuro@alius.cz>
15a59fda5 - 2024-09-14 - return42 <return42@users.noreply.translate.codeberg.org>
2024-09-22 07:32:01 +02:00
dwitterer
915cf9b7af Update own-instance.rst
Implemented the suggested changes.
2024-09-22 07:28:32 +02:00
dwitterer
ba4942ea51 Update own-instance.rst
Improved English grammar and punctuation for professionalism.
2024-09-22 07:28:32 +02:00
Markus
0b3724651e [fix] simple template: drop useless `aria-labelledby` attributes
This patch removes the ``aria-labelledby`` attributes for which there is no tag
with the corresponding ID.

Reported-by: @glanham-jr https://github.com/searxng/searxng/issues/3793#issuecomment-2351689483
Signed-off-by: Markus <markus@venom.fritz.box>
2024-09-21 15:23:21 +02:00
Markus
5ad0214bd4 [fix] simple template: macro checkbox_onoff_reversed
In its previous implementation, the macro ``checkbox_onoff_reversed`` always
created an ``aria-labelledby`` attribute, even if there was no descriptive tag
with the generated ID (used as the value of the ``aria-labelledby``).

Before this patch, the Nu-HTML-Checker [1] reported 255 issues of this type::

    The aria-labelledby attribute must point to an element in the same document. (255)

[1] https://validator.w3.org/nu/

Signed-off-by: Markus <markus@venom.fritz.box>
2024-09-21 15:23:21 +02:00
Markus
8b8d830fd3 [fix] simple template: add ID to elements used for aria-labelledby
The ``aria-labelledby`` [1] attribute identifies the element that labels the
element it is applied to.  The templates ``infinite_scroll.html`` and
``search_on_category_select.html`` define a ``aria-labelledby`` at the <input>
tag but miss the id in the <div> with the description.

[1] https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby

Signed-off-by: Markus <markus@venom.fritz.box>
2024-09-21 15:23:21 +02:00
Markus
67fcf3cc67 [fix] Removes `/>` ending tags for void HTML elements
continuation of commit: 0b832f19b

Signed-off-by: Markus <markus@venom.fritz.box>
2024-09-21 15:23:21 +02:00
Markus Heiser
d026486ce3 [fix] scripts: elimination of limitations on dedicated distributions
The restriction of shell scripts to certain distributions is only required for
certain actions such as the installation of a SearXNG instance. The maintenance
scripts and build processes were previously also restricted to these specific
distributions.  With this patch, the build processes (such as the build of
online documentation) can now also be executed on all Linux distributions.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-09-19 09:35:54 +02:00
Grant Lanham
0b832f19bf [fix] Removes `/>` ending tags for void HTML elements
Removes ``/>`` ending tags for void elements [1] and replaces them with ``>``.
Part of the larger cleanup to cleanup invalid HTML throughout the codebase [2].

[1] https://html.spec.whatwg.org/multipage/syntax.html#void-elements
[2] https://github.com/searxng/searxng/issues/3793
2024-09-15 15:19:51 +02:00
Markus
28dc623785 [fix] drop engine alexandria.org
The origin alexandria.org is broken:

  https://www.alexandria.org/?c=&r=&a=0&q=foo

returns "504 Gateway Time-out"

- Closes: https://github.com/searxng/searxng/issues/3786

Signed-off-by: Markus <markus@venom.fritz.box>
2024-09-15 14:45:48 +02:00
Markus
3630e464b3 [fix] drop engine gpodder
gpodder is ultra slow on search terms like foo

  https://gpodder.net/search.json?q=foo

takes up to a minute to return an empty json response.

- Closes: https://github.com/searxng/searxng/issues/3785
Signed-off-by: Markus <markus@venom.fritz.box>
2024-09-15 14:45:38 +02:00
Markus
d3a795c7e7 [fix] engine: qwant - detect captchaUrl and raise SearxEngineCaptchaException
So far a CAPTCHA was not recognized in the response of the qwant engine and a
SearxEngineAPIException was raised by mistake.  With this patch a CAPTCHA
redirect is recognized and the correct SearxEngineCaptchaException is raised.

Closes: https://github.com/searxng/searxng/issues/3806
Signed-off-by: Markus <markus@venom.fritz.box>
2024-09-15 14:45:23 +02:00
Markus
55e2f4a97f [data] update searx.data - update_engine_traits.py 2024-09-15 12:48:35 +02:00
Markus
cdb4927b8b [fix] fetch_traits: brave, google, annas_archive & radio_browser
This patch fixes a bug reported by CI "Fetch traits" [1] (brave) and improves
other fetch traits functions (google, annas_archive & radio_browser).

brave:

    File "/home/runner/work/searxng/searxng/searx/engines/brave.py", line 434, in fetch_traits
      sxng_tag = region_tag(babel.Locale.parse(ui_lang, sep='-'))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/runner/work/searxng/searxng/searx/locales.py", line 155, in region_tag
    Error:     raise ValueError('%s missed a territory')

google:

  change ERROR message about unknow UI language to INFO message

radio_browser:

  country_list contains duplicates that differ only in upper/lower case

annas_archive:

  for better diff; sort the persistence of the traits

[1] https://github.com/searxng/searxng/actions/runs/10606312371/job/29433352518#step:6:41

Signed-off-by: Markus <markus@venom.fritz.box>
2024-09-15 12:48:35 +02:00
Bnyro
84e2f9d46a [feat] gitlab: implement dedicated module
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-09-15 08:04:21 +02:00
searxng-bot
231e55f38d [l10n] update translations from Weblate
6bea94d18 - 2024-09-11 - sushen23 <sushen23@users.noreply.translate.codeberg.org>
771eedb39 - 2024-09-08 - 0ko <0ko@users.noreply.translate.codeberg.org>
b75ec6466 - 2024-09-08 - alexgabi <alexgabi@users.noreply.translate.codeberg.org>
2024-09-14 15:23:49 +02:00
Bnyro
33c1236923 [fix] search: crash when no engines are used to search 2024-09-14 11:13:53 +02:00
Finn Steffens
9e2bfe14db
[feat] engine: add right dao
* [feat] engine: add right dao

* [enh] right dao engine: allow additional classes

Allow additional classes while parsing to prevent the engine from breaking in the future if additional classes are added to the elements.

Co-authored-by: Bnyro <bnyro@tutanota.com>

---------

Co-authored-by: Bnyro <bnyro@tutanota.com>
2024-09-12 17:51:47 +02:00
Lucas Schwiderski
f05566d925 [fix] json_engine: Fix result fields being mixed up
Fixes #3810.
2024-09-12 10:47:08 +02:00
0xhtml
c45870dd71 [fix] yep engine: remove links to other engines
Yep includes links to search for the same query on Google and other
search engines as a result in the search result. This fix skips these
results.
2024-09-12 00:04:04 +02:00
searxng-bot
5cca3f6ef2 [l10n] update translations from Weblate
cab91b92c - 2024-09-05 - xtex <xtexchooser@duck.com>
bbc77a9c4 - 2024-09-05 - Priit Jõerüüt <jrtcdbrg@users.noreply.translate.codeberg.org>
16ab61e99 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
34b1487b6 - 2024-09-04 - Erico <Erico@users.noreply.translate.codeberg.org>
811132898 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
099cb381e - 2024-09-04 - return42 <return42@users.noreply.translate.codeberg.org>
eebb940df - 2024-09-04 - 0ko <0ko@users.noreply.translate.codeberg.org>
50c845d17 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
f12addf27 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
c0879d377 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
7732d1356 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
dbe33cfb1 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
759dacddd - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
7607b9ac6 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
aab0df3e7 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
f9232fbd6 - 2024-09-04 - return42 <return42@users.noreply.translate.codeberg.org>
f3a339dac - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
4f3bdb5c9 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
fb92cc42d - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
d6412e0c6 - 2024-09-05 - return42 <return42@users.noreply.translate.codeberg.org>
e1f6103fd - 2024-09-04 - Fjuro <fjuro@alius.cz>
4ee95b7f2 - 2024-09-03 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
84e4641d5 - 2024-09-04 - ghose <ghose@users.noreply.translate.codeberg.org>
2024-09-06 11:04:20 +02:00
dependabot[bot]
d2f36cacb3 [upd] pypi: Bump pylint from 3.2.6 to 3.2.7
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.6 to 3.2.7.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.6...v3.2.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-06 11:03:27 +02:00
dependabot[bot]
153a28ccd6 [upd] pypi: Bump wlc from 1.14 to 1.15
Bumps [wlc](https://github.com/WeblateOrg/wlc) from 1.14 to 1.15.
- [Changelog](https://github.com/WeblateOrg/wlc/blob/main/CHANGES.rst)
- [Commits](https://github.com/WeblateOrg/wlc/compare/1.14...1.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-06 11:03:08 +02:00
Markus Heiser
9eda4044be [fix] bilibili engine - ValueError in duration & HTML in title
- ValueError in duration: issue reported in #3799
- HTML in title: related to #3770

[#3799] https://github.com/searxng/searxng/issues/3799
[#3770] https://github.com/searxng/searxng/pull/3770

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-09-06 07:13:47 +02:00
Markus
21bfb4996e [fix] engine yahoo: HTML tags are included in result titles
- https://github.com/searxng/searxng/issues/3790

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-09-03 22:26:59 +02:00
Bnyro
94a1f39bde [engine] bahnhof.de: remove engine 2024-09-03 18:52:54 +02:00
Markus Heiser
b774ee04ba [mod] enable calculator and allow plugin on public instances
Remove quirks that prevented the Calculator from being used on public instances.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-09-03 18:36:28 +02:00
Markus Heiser
3a3ff8f020 [mod] hardening "calculator plugin" / limit execution time to 50 ms
The execution of the function for the calculation is outsourced to a process
whose runtime is limited to 50 milliseconds.

Related:

- [1] https://github.com/searxng/searxng/pull/3377#issuecomment-2067977375

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-09-03 18:36:28 +02:00
Bnyro
7d9d5186a0 [build] /static
Co-authored-by: GenericMale <genericmale00@gmail.com>
2024-09-03 17:49:33 +02:00
GenericMale
e65edb141d [feat] results: show response times 2024-09-03 17:49:33 +02:00
Brock Vojkovic
b09aa7e360 [fix] correct typo in API_WONDOW to API_WINDOW 2024-09-01 08:37:24 +02:00
Bnyro
5e576b2238 [fix] search: titles including html brackets are not shown properly 2024-08-31 17:11:49 +02:00
dependabot[bot]
cbd86473aa [upd] pypi: Bump certifi from 2024.7.4 to 2024.8.30
Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.7.4 to 2024.8.30.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.07.04...2024.08.30)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 09:50:52 +02:00
dependabot[bot]
769b2ed030 [upd] pypi: Bump selenium from 4.23.1 to 4.24.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.23.1 to 4.24.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits/selenium-4.24.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 09:50:34 +02:00
Alexander Sulfrian
e86c96974d [fix] self_info: request.user_agent is not a str
The user_agent attribute of the Flask request object is an instance of
the werkzeug.user_agent.UserAgent class.

This will fix the following error of the self_info plugin:

> ERROR:searx.plugins.self_info: Exception while calling post_search
> Traceback (most recent call last):
>   File "searx/plugins/__init__.py", line 203, in call
>     ret = getattr(plugin, plugin_type)(*args, **kwargs)
>   File "searx/plugins/self_info.py", line 31, in post_search
>     search.result_container.answers['user-agent'] = {'answer': gettext('Your user-agent is: ') + ua}
> TypeError: can only concatenate str (not "UserAgent") to str
2024-08-30 11:29:34 +02:00
searxng-bot
b05e285384 [l10n] update translations from Weblate
085dc9e17 - 2024-08-27 - demonshreder <demonshreder@users.noreply.translate.codeberg.org>
b75bb12dc - 2024-08-26 - return42 <return42@users.noreply.translate.codeberg.org>
7b1392ff2 - 2024-08-26 - return42 <return42@users.noreply.translate.codeberg.org>
2024-08-30 10:05:24 +02:00
Alexander Sulfrian
6a7b1a1a57 [fix] Do not show DDG user-agent from zero click
We do not want to show the user-agent information from the duckduckgo
zero click info. This is the user-agent used by searxng and not the
user-agent used by the user.

This was already done for the IP address in:
0fb3f0e4ae
2024-08-30 09:02:37 +02:00
return42
526428a69b [data] update searx.data - update_ahmia_blacklist.py 2024-08-29 17:49:14 +02:00
return42
d6ee8f38dd [data] update searx.data - update_wikidata_units.py 2024-08-29 17:48:59 +02:00
return42
d72fbcfd46 [data] update searx.data - update_firefox_version.py 2024-08-29 17:48:25 +02:00
return42
f44775c05a [data] update searx.data - update_engine_descriptions.py 2024-08-29 17:48:09 +02:00
return42
71451e5770 [data] update searx.data - update_currencies.py 2024-08-29 17:47:47 +02:00
GenericMale
8289436e55 [fix] search: don't show categories without active engine 2024-08-28 14:27:03 +02:00
searxng-bot
4f7dd05d99 [l10n] update translations from Weblate
1b63de5ca - 2024-08-21 - ghose <ghose@users.noreply.translate.codeberg.org>
7c738125f - 2024-08-20 - crnobog <crnobog@users.noreply.translate.codeberg.org>
2024-08-23 12:21:02 +02:00
Dennis ten Hoove
2033f30c8d [docs] improve Hostname plugin documentation 2024-08-21 14:28:04 +02:00
Markus Heiser
fe6bac5a08 [fix] pip install -e: legacy editable install (setup.py develop) is deprecated
From [1]: There is now a standardized mechanism [2] for an installer like pip to
request an editable install of a project.  pip is transitioning to using this
standard only instead of invoking the deprecated `setup.py develop` command.

For backward compatibility, we can use switches:

--use-pep517
  https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-use-pep517

--no-build-isolation
  https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-no-build-isolation

- [1] https://github.com/pypa/pip/issues/11457
- [2] https://peps.python.org/pep-0660/

Closes: https://github.com/searxng/searxng/issues/3701
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-08-21 12:09:14 +02:00
Austin-Olacsi
e45b771ffa [feat] engine: implementation of yandex (web, images)
It's set to inactive in settings.yml because of CAPTCHA.  You need to remove
that from the settings.yml to get in use.

Closes: https://github.com/searxng/searxng/issues/961
2024-08-21 12:08:35 +02:00
Grant Lanham
5276219b9d Fix tineye engine url, datetime parsing, and minor refactor
Changes made to tineye engine:
1. Importing logging if TYPE_CHECKING is enabled
2. Remove unecessary try-catch around json parsing the response, as this
masked the original error and had no immediate benefit
3. Improve error handling explicitely for status code 422 and 400
upfront, deferring json_parsing only for these status codes and
successful status codes
4. Unit test all new applicable changes to ensure compatability
2024-08-21 08:41:53 +02:00
Markus Heiser
5be55e3309 [fix] unit tests: fix load / unload engines & fix messages
- https://github.com/searxng/searxng/pull/3746#issuecomment-2300965005
- https://github.com/searxng/searxng/issues/2988#issuecomment-2226929084

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-08-21 08:28:13 +02:00
Markus Heiser
5c6b126d7f [fix] debian/ubuntu python-is-python3
Closes: https://github.com/searxng/searxng/issues/3235
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-08-20 20:20:50 +02:00
Markus Heiser
799d72e3fd [mod] add French translation for infopage
The French translation was provided by @jcarnat in #3738.

[3738] https://github.com/searxng/searxng/issues/3738

Co-authored-by: Joel Carnat @jcarnat https://github.com/jcarnat
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-08-20 07:25:39 +02:00
searxng-bot
c0369ee488 [l10n] update translations from Weblate
fff02429f - 2024-08-15 - return42 <return42@users.noreply.translate.codeberg.org>
b13279293 - 2024-08-15 - return42 <return42@users.noreply.translate.codeberg.org>
fc7c2faa4 - 2024-08-14 - 0ko <0ko@users.noreply.translate.codeberg.org>
6697dad47 - 2024-08-14 - return42 <return42@users.noreply.translate.codeberg.org>
e9ccc396d - 2024-08-13 - Aeris1One <Aeris1One@users.noreply.translate.codeberg.org>
f48553819 - 2024-08-12 - tentsbet <tentsbet@users.noreply.translate.codeberg.org>
d431b6c04 - 2024-08-11 - hugoalh <hugoalh@users.noreply.translate.codeberg.org>
b942a29c7 - 2024-08-11 - rafablog77 <rafablog77@users.noreply.translate.codeberg.org>
2f4d23a5a - 2024-08-09 - xyb <xyb@users.noreply.translate.codeberg.org>
a4f47be87 - 2024-08-10 - return42 <return42@users.noreply.translate.codeberg.org>
2024-08-16 10:39:17 +02:00
dependabot[bot]
29056b9ddd [upd] pypi: Bump uvloop from 0.19.0 to 0.20.0
Bumps [uvloop](https://github.com/MagicStack/uvloop) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/MagicStack/uvloop/releases)
- [Commits](https://github.com/MagicStack/uvloop/compare/v0.19.0...v0.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 10:37:51 +02:00
dependabot[bot]
326ade8634 [upd] pypi: Bump lxml from 5.2.2 to 5.3.0
Bumps [lxml](https://github.com/lxml/lxml) from 5.2.2 to 5.3.0.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.2.2...lxml-5.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 10:35:51 +02:00
Markus Heiser
8d14d46c00 [build] /static 2024-08-15 18:58:28 +02:00
Markus Heiser
45f03f1902 [fix] search box: clear button don't appear on mouse-copy
You have to copy and paste the query without using the keyboard to replicate the
issue. As soon as you press the keyboard the cross appears. [1]

- [1] https://github.com/searxng/searxng/issues/3725#issuecomment-2282655272

Reported-by: @Immortality-IMT in [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-08-15 18:58:28 +02:00
Fmstrat
8e985aea88 update to gecko driver v35 2024-08-15 08:32:23 +02:00
searxng-bot
f1c05e7c16 [l10n] update translations from Weblate 2024-08-09 09:50:24 +02:00
dependabot[bot]
fec8ab75e1 [upd] pypi: Bump pyyaml from 6.0.1 to 6.0.2
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/main/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.1...6.0.2)

---
updated-dependencies:
- dependency-name: pyyaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-09 09:49:51 +02:00
dependabot[bot]
516ac8da82 [upd] pypi: Bump babel from 2.15.0 to 2.16.0
Bumps [babel](https://github.com/python-babel/babel) from 2.15.0 to 2.16.0.
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-babel/babel/compare/v2.15.0...v2.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-09 09:49:21 +02:00
Markus Heiser
dcf95644c6 [breaking change] drop deprecated hostname_replace plugin
The successor is “hostname plugin” from PR:

- https://github.com/searxng/searxng/pull/3463

---

Revert "[refactor] hostnames plugin: add fallback for old hostname_replace plugin"

This reverts commit f5eb56b63f.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-08-08 11:58:32 +02:00
0xhtml
0cfed94b08 [fix] engine google: use extract_text everywhere 2024-08-08 09:59:45 +02:00
0xhtml
7f9ce3b96e [fix] engine google: strip bubble text from answers
Google underlines words inside of answers that can be clicked to show
additional definitions. These definitions inside the answer were not
correctly handled and ended up in the middle of the answer text. With
this fix, the extra definitions are stripped from the answer shown by
the frontend.
2024-08-08 09:59:45 +02:00
return42
e76a4f72ef [data] update searx.data - update_external_bangs.py 2024-08-02 10:55:07 +02:00
dependabot[bot]
c151683a0b [upd] pypi: Bump redis from 5.0.7 to 5.0.8
Bumps [redis](https://github.com/redis/redis-py) from 5.0.7 to 5.0.8.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v5.0.7...v5.0.8)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-02 10:54:37 +02:00
dependabot[bot]
01a3d8d9e4 [upd] pypi: Bump sphinx-notfound-page from 1.0.2 to 1.0.4
Bumps [sphinx-notfound-page](https://github.com/readthedocs/sphinx-notfound-page) from 1.0.2 to 1.0.4.
- [Changelog](https://github.com/readthedocs/sphinx-notfound-page/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/readthedocs/sphinx-notfound-page/compare/1.0.2...1.0.4)

---
updated-dependencies:
- dependency-name: sphinx-notfound-page
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-02 10:54:01 +02:00
searxng-bot
2f1f54f113 [l10n] update translations from Weblate
458a2234c - 2024-08-01 - Wexterity <Wexterity@users.noreply.translate.codeberg.org>
615d49db6 - 2024-08-01 - return42 <return42@users.noreply.translate.codeberg.org>
16bfd767e - 2024-08-01 - Thecode764 <Thecode764@users.noreply.translate.codeberg.org>
ccd38ad43 - 2024-07-31 - return42 <return42@users.noreply.translate.codeberg.org>
3820b926b - 2024-07-31 - Shpubly <Shpubly@users.noreply.translate.codeberg.org>
11c302c50 - 2024-07-29 - return42 <return42@users.noreply.translate.codeberg.org>
a588e2e33 - 2024-07-29 - return42 <return42@users.noreply.translate.codeberg.org>
15ba3d4eb - 2024-07-29 - ghose <ghose@users.noreply.translate.codeberg.org>
a160c69b3 - 2024-07-30 - wags07 <wags07@users.noreply.translate.codeberg.org>
fc9d877d4 - 2024-07-29 - nebras <nebras@users.noreply.translate.codeberg.org>
61eaf7001 - 2024-07-28 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
3c7e9cdfd - 2024-07-27 - return42 <return42@users.noreply.translate.codeberg.org>
babce47c7 - 2024-07-27 - EifionLlwyd <EifionLlwyd@users.noreply.translate.codeberg.org>
0b467dd7d - 2024-07-27 - Fjuro <fjuro@alius.cz>
2024-08-02 10:53:04 +02:00
Markus Heiser
98c73010f1 [data] update searx.data - update_engine_traits.py
$ make data.traits

Last GH action has been failed [1], the bugfixes from aa05685cc
were necessary to update the data.

[1] https://github.com/searxng/searxng/actions/runs/10135834050/job/28023757191

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-29 10:28:53 +02:00
Markus Heiser
edfd0e2fe5 [fix] brave fetch_traits: Brave added Chinese (zh-hant) to UI
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-29 10:28:53 +02:00
return42
3196e7e86b [data] update searx.data - update_currencies.py 2024-07-29 07:02:52 +02:00
return42
7d47c961c3 [data] update searx.data - update_engine_descriptions.py 2024-07-29 07:01:39 +02:00
return42
ac51c77c33 [data] update searx.data - update_wikidata_units.py 2024-07-29 07:01:01 +02:00
return42
5cba412784 [data] update searx.data - update_ahmia_blacklist.py 2024-07-29 07:00:14 +02:00
return42
fff7792e32 [data] update searx.data - update_firefox_version.py 2024-07-29 07:00:00 +02:00
Markus Heiser
ee959ed9fc [fix] engine geizhals: if there are no offers, there is no best price
Fault pattern: if there are no offers, then an exception has been thrown:

    IndexError: list index out of range

This patch makes the addition of “best price” dependent on whether one exists.

Closes: #3685
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-28 19:00:51 +02:00
Markus Heiser
022898e502 [fix] fix issues in the language menue introduced by PR #3645
In my review of [1] I tried to reformat the template code of the language
menue whereby I have made two mistakes.

- default language was added twice
- in the 'Auto-detect' item a hard coded `[auto]` was implemented where the
  `search_language` variable was needed.

[1] https://github.com/searxng/searxng/issues/3645

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-28 10:46:11 +02:00
Austin-Olacsi
9f47bdefc6 [feat] engine: implementation of encyclosearch 2024-07-28 10:45:51 +02:00
Markus Heiser
d7bb97b616 [fix] engine yacy images: increase timout from 3 to 5sec
Its a leftover from 657dcb97

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-27 17:54:41 +02:00
Bnyro
9bbcd37138 [docs] engine_overview.rst: add length and views parameter to videos template 2024-07-27 11:49:58 +02:00
Bnyro
80226ad6b7 [build] /static 2024-07-27 11:49:58 +02:00
Bnyro
304ddd8114 [feat] videos template: support for view count 2024-07-27 11:49:58 +02:00
Markus Heiser
3f22dbb68a [fix] products template: don't quote html tags in result.content
The result.content field is *safe* HTML, tags to highlight search terms are
intended.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-27 11:46:25 +02:00
Bnyro
84abab0808 [feat] engine: implementation of geizhals.de 2024-07-27 11:46:25 +02:00
dependabot[bot]
8e359eb8ed [upd] pypi: Bump sphinx from 7.3.7 to 7.4.7
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.3.7 to 7.4.7.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.3.7...v7.4.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-27 10:13:57 +02:00
Markus Heiser
e31b06b686 [fix] remove unused code / _STORAGE_UNIT_VALUE
The `_STORAGE_UNIT_VALUE` dictionary is a left over from:

- https://github.com/searxng/searxng/pull/3570

in this PR we removed the old implementations but forgot to delete this
`_STORAGE_UNIT_VALUE`.

Closes: https://github.com/searxng/searxng/pull/3672
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-27 10:13:15 +02:00
Sylvain Cau
b9ddd59c5b [enh] Add API Key support for discourse.org forums 2024-07-27 09:21:40 +02:00
dependabot[bot]
dde94751d6 [upd] pypi: Bump selenium from 4.23.0 to 4.23.1
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.23.0 to 4.23.1.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-27 09:15:02 +02:00
dependabot[bot]
07a0135a92 [upd] pypi: Bump pylint from 3.2.5 to 3.2.6
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.5 to 3.2.6.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.5...v3.2.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-27 09:14:44 +02:00
Ivan Gabaldon
26b66dd3be [fix] everything is logged with "priority 3" on journal
Closes: https://github.com/searxng/searxng/issues/3649
2024-07-27 09:11:49 +02:00
searxng-bot
319afe031e [l10n] update translations from Weblate
2b14808d4 - 2024-07-26 - pdwalker <pdwalker@users.noreply.translate.codeberg.org>
2024-07-26 09:15:40 +02:00
Markus Heiser
657dcb973a [fix] engine yacy: update list of base URLs
https://search.lomig.me
  Poor results / tested `!yacy :en hello` and got zero results

https://yacy.ecosys.eu
  Slow response (> 6sec for trivial search terms)

https://search.webproject.link
  Dead instance / URL offline

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-20 09:59:43 +02:00
dependabot[bot]
b0aa6fe8a5 [upd] pypi: Bump selenium from 4.22.0 to 4.23.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.22.0 to 4.23.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.22.0...selenium-4.23.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-20 07:54:21 +02:00
searxng-bot
ffde256364 [l10n] update translations from Weblate
94bacfa68 - 2024-07-19 - wazhanudin <wazhanudin@users.noreply.translate.codeberg.org>
360fa8b30 - 2024-07-19 - return42 <return42@users.noreply.translate.codeberg.org>
b378bf462 - 2024-07-12 - return42 <return42@users.noreply.translate.codeberg.org>
8110ad613 - 2024-07-12 - return42 <return42@users.noreply.translate.codeberg.org>
2024-07-19 09:16:10 +02:00
Grant Lanham
9a4fa7cc4f Update mullvad_leta.py to account for img_elem
A recent update from Mullvad Leta introduced the img_elem. This update
broke the existing logic. Now, by checking the length of the dom_result
to see if it was included in the return results, we can handle the logic
accordingly.
2024-07-15 06:58:39 +02:00
Markus Heiser
2039060b64 [mod] revision of the settings_loader
The intention of this PR is to modernize the settings_loader implementations.
The concept is old (remember, this is partly from 2014), back then we only had
one config file, meanwhile we have had a folder with config files for a very
long time.  Callers can now load a YAML configuration from this folder as
follows ::

    settings_loader.get_yaml_cfg('my-config.yml')

- BTW this is a fix of #3557.

- Further the `existing_filename_or_none` construct dates back to times when
  there was not yet a `pathlib.Path` in all Python versions we supported in the
  past.

- Typehints have been added wherever appropriate

At the same time, this patch should also be downward compatible and not
introduce a new environment variable. The localization of the folder with the
configurations is further based on:

    SEARXNG_SETTINGS_PATH (wich defaults to /etc/searxng/settings.yml)

Which means, the default config folder is `/etc/searxng/`.

ATTENTION: intended functional changes!

 If SEARXNG_SETTINGS_PATH was set and pointed to a not existing file, the
 previous implementation silently loaded the default configuration.  This
 behavior has been changed: if the file or folder does not exist, an
 EnvironmentError exception will be thrown in future.

Closes: https://github.com/searxng/searxng/issues/3557
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-14 18:10:06 +02:00
Bnyro
e4da22ee51 [feat] engine: implementation of alpine linux packages
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-14 17:57:58 +02:00
Grant Lanham
e56f4b315f [mod] UX: flush flag icon to right in language select option values
If the flag icon is first, it prevents easily searching the select list on the
keyboard.  By moving the icon fully to the right, this will enable a user to
search the select list.

Closes: https://github.com/searxng/searxng/issues/3645
2024-07-14 16:39:50 +02:00
Alexandre Flament
37d0438f25 Dockerfile: use Alpine 3.20 & Python 3.12 2024-07-14 16:38:30 +02:00
Allen
5468d97d39 [mod] remove py 3.6 leftovers 2024-07-13 17:20:50 +02:00
Markus Heiser
37ec668ae1 [build] /static 2024-07-13 17:19:59 +02:00
Markus Heiser
d0bad45d21 [fix] simple theme: in URLs don't truncate descenders (typograhy, FFox)
HINT: this is a workaround to fix a rendering bug in FFox-Desktop [3]

Descenders [1] in the URL are truncated, caused by the `overflow: hidden;`
because part of link overflow the flex box [2].

[1] https://en.wikipedia.org/wiki/Descender
[2] https://github.com/searxng/searxng/issues/3550
[3] https://github.com/searxng/searxng/pull/3592#issuecomment-2186313121

Closes: https://github.com/searxng/searxng/issues/3550
Suggested-by: @coxde
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-13 17:19:59 +02:00
searxng-bot
d5487a157d [l10n] update translations from Weblate
cecd9182a - 2024-07-11 - ds451 <ds451@users.noreply.translate.codeberg.org>
8e9bf64ae - 2024-07-10 - wazhanudin <wazhanudin@users.noreply.translate.codeberg.org>
82e209f2d - 2024-07-08 - notlmutsaers <notlmutsaers@users.noreply.translate.codeberg.org>
428204a2f - 2024-07-08 - alexgabi <alexgabi@users.noreply.translate.codeberg.org>
4dd16510d - 2024-07-08 - notlmutsaers <notlmutsaers@users.noreply.translate.codeberg.org>
fb5015db9 - 2024-07-08 - notlmutsaers <notlmutsaers@users.noreply.translate.codeberg.org>
686800ded - 2024-07-08 - louispires <louispires@users.noreply.translate.codeberg.org>
7fc33af6d - 2024-07-05 - wags07 <wags07@users.noreply.translate.codeberg.org>
cbab31eae - 2024-07-06 - jonkke9 <jonkke9@users.noreply.translate.codeberg.org>
2024-07-13 17:18:16 +02:00
Markus Heiser
a3500c1efc [fix] tear down TEST_ENGINES after TestBang is proceeded
Engines are loaded into global name `searx.engines.engines` other applications
such as statistics or the histogram use this global variable to search for
values in their own memories, which can lead to key errors as described in

- https://github.com/searxng/searxng/issues/2988

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Closes: https://github.com/searxng/searxng/issues/2988
2024-07-13 17:13:41 +02:00
Grant Lanham
ef103ba80a Implement google/brave switch in Mullvad Leta
cleanup

Import annontations
2024-07-07 08:08:11 +02:00
dependabot[bot]
c835f920ed [upd] pypi: Bump certifi from 2024.6.2 to 2024.7.4
Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.6.2 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.06.02...2024.07.04)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-05 10:44:19 +02:00
dependabot[bot]
779565497c [upd] pypi: Bump pylint from 3.2.3 to 3.2.5
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.3 to 3.2.5.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.3...v3.2.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-05 10:24:18 +02:00
searxng-bot
67008226fc [l10n] update translations from Weblate
1f7de30a2 - 2024-07-04 - Jeex <Jeex@users.noreply.translate.codeberg.org>
5d34f39a9 - 2024-07-04 - return42 <return42@users.noreply.translate.codeberg.org>
930a817f1 - 2024-07-04 - return42 <return42@users.noreply.translate.codeberg.org>
53936f24d - 2024-07-03 - return42 <return42@users.noreply.translate.codeberg.org>
3fcf83c92 - 2024-07-02 - rodgui <rodgui@users.noreply.translate.codeberg.org>
19b2f9ac4 - 2024-07-03 - seonghobae <seonghobae@users.noreply.translate.codeberg.org>
07ef05dbe - 2024-06-30 - return42 <return42@users.noreply.translate.codeberg.org>
23f2ef2cf - 2024-06-29 - geekom13 <geekom13@users.noreply.translate.codeberg.org>
2024-07-05 09:30:13 +02:00
Bnyro
4eaa0dd275 [fix] gentoo: use mediawiki engine 2024-07-03 10:24:03 +02:00
Allen
54be8f09a6 [fix] html.unescape stract autocomplete suggestions 2024-07-02 18:16:46 +02:00
Thomas Renard
39aaac40d6 [mod] libretranslate: add direct link to translation (engine) 2024-06-30 16:18:33 +02:00
return42
adaec68728 [data] update searx.data - update_wikidata_units.py 2024-06-29 07:20:59 +02:00
return42
47ffa711d2 [data] update searx.data - update_ahmia_blacklist.py 2024-06-29 07:10:59 +02:00
return42
c7d1f4278d [data] update searx.data - update_firefox_version.py 2024-06-29 07:09:16 +02:00
return42
985c8b0bce [data] update searx.data - update_engine_traits.py 2024-06-29 07:08:55 +02:00
return42
7200640055 [data] update searx.data - update_engine_descriptions.py 2024-06-29 07:07:32 +02:00
474 changed files with 63835 additions and 18743 deletions

View File

@ -1,5 +1,5 @@
name: "Checker"
on:
on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 4 * * 5"
workflow_dispatch:
@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.13'
architecture: 'x64'
- name: Install Python dependencies

View File

@ -1,5 +1,5 @@
name: "Update searx.data"
on:
on: # yamllint disable-line rule:truthy
schedule:
- cron: "59 23 28 * *"
workflow_dispatch:

View File

@ -1,6 +1,6 @@
name: Integration
on:
on: # yamllint disable-line rule:truthy
push:
branches: ["master"]
pull_request:
@ -16,70 +16,62 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: |
sudo ./utils/searxng.sh install packages
sudo apt install firefox
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v3
with:
path: |
./local
./.nvm
./node_modules
key: python-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements*.txt', 'setup.py') }}
- name: Install Python dependencies
if: steps.cache-python.outputs.cache-hit != 'true'
run: |
make V=1 install
make V=1 gecko.driver
- name: Run tests
run: make V=1 ci.test
- name: Test coverage
run: make V=1 test.coverage
- name: Store coverage result
uses: actions/upload-artifact@v3
with:
name: coverage-${{ matrix.python-version }}
path: coverage/
retention-days: 60
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: |
sudo ./utils/searxng.sh install packages
sudo apt install firefox
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements*.txt', 'setup.py') }}
- name: Install Python dependencies
if: steps.cache-python.outputs.cache-hit != 'true'
run: |
make V=1 install
make V=1 gecko.driver
- name: Run tests
run: make V=1 ci.test
themes:
name: Themes
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: sudo ./utils/searxng.sh install buildhost
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v3
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: Install node dependencies
run: make V=1 node.env
- name: Build themes
run: make V=1 themes.all
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: sudo ./utils/searxng.sh install buildhost
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: Install node dependencies
run: make V=1 node.env
- name: Build themes
run: make V=1 themes.all
documentation:
name: Documentation
@ -87,40 +79,40 @@ jobs:
permissions:
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
persist-credentials: false
- name: Install Ubuntu packages
run: sudo ./utils/searxng.sh install buildhost
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v3
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: Build documentation
run: |
make V=1 docs.clean docs.html
- name: Deploy
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ github.token }}
BRANCH: gh-pages
FOLDER: dist/docs
CLEAN: true # Automatically remove deleted files from the deploy branch
SINGLE_COMMIT: True
COMMIT_MESSAGE: '[doc] build from commit ${{ github.sha }}'
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
persist-credentials: false
- name: Install Ubuntu packages
run: sudo ./utils/searxng.sh install buildhost
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: Build documentation
run: |
make V=1 docs.clean docs.html
- name: Deploy
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ github.token }}
BRANCH: gh-pages
FOLDER: dist/docs
CLEAN: true # Automatically remove deleted files from the deploy branch
SINGLE_COMMIT: true
COMMIT_MESSAGE: '[doc] build from commit ${{ github.sha }}'
babel:
name: Update translations branch
@ -133,37 +125,37 @@ jobs:
permissions:
contents: write # for make V=1 weblate.push.translations
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v3
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: weblate & git setup
env:
WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }}
run: |
mkdir -p ~/.config
echo "${WEBLATE_CONFIG}" > ~/.config/weblate
git config --global user.email "searxng-bot@users.noreply.github.com"
git config --global user.name "searxng-bot"
- name: Update transations
id: update
run: |
make V=1 weblate.push.translations
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: weblate & git setup
env:
WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }}
run: |
mkdir -p ~/.config
echo "${WEBLATE_CONFIG}" > ~/.config/weblate
git config --global user.email "searxng-bot@users.noreply.github.com"
git config --global user.name "searxng-bot"
- name: Update transations
id: update
run: |
make V=1 weblate.push.translations
dockers:
name: Docker
@ -183,19 +175,19 @@ jobs:
# make sure "make docker.push" can get the git history
fetch-depth: '0'
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.12'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: Set up QEMU
if: env.DOCKERHUB_USERNAME != null
uses: docker/setup-qemu-action@v1

View File

@ -1,5 +1,5 @@
name: "Security checks"
on:
on: # yamllint disable-line rule:truthy
schedule:
- cron: "42 05 * * *"
workflow_dispatch:

View File

@ -1,5 +1,5 @@
name: "Update translations"
on:
on: # yamllint disable-line rule:truthy
schedule:
- cron: "05 07 * * 5"
workflow_dispatch:
@ -10,50 +10,50 @@ jobs:
runs-on: ubuntu-20.04
if: ${{ github.repository_owner == 'searxng' && github.ref == 'refs/heads/master' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v3
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: weblate & git setup
env:
WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }}
run: |
mkdir -p ~/.config
echo "${WEBLATE_CONFIG}" > ~/.config/weblate
git config --global user.email "searxng-bot@users.noreply.github.com"
git config --global user.name "searxng-bot"
- name: Merge and push transation updates
run: |
make V=1 weblate.translations.commit
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
commit-message: '[l10n] update translations from Weblate'
committer: searxng-bot <searxng-bot@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: translations_update
delete-branch: true
draft: false
title: '[l10n] update translations from Weblate'
body: |
update translations from Weblate
labels: |
translation
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: weblate & git setup
env:
WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }}
run: |
mkdir -p ~/.config
echo "${WEBLATE_CONFIG}" > ~/.config/weblate
git config --global user.email "searxng-bot@users.noreply.github.com"
git config --global user.name "searxng-bot"
- name: Merge and push transation updates
run: |
make V=1 weblate.translations.commit
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
commit-message: '[l10n] update translations from Weblate'
committer: searxng-bot <searxng-bot@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: translations_update
delete-branch: true
draft: false
title: '[l10n] update translations from Weblate'
body: |
update translations from Weblate
labels: |
translation

2
.nvmrc
View File

@ -1 +1 @@
v20.10
v23.5

View File

@ -338,6 +338,7 @@ valid-metaclass-classmethod-first-arg=mcs
# Maximum number of arguments for function / method
max-args=8
max-positional-arguments=14
# Maximum number of attributes for a class (see R0902).
max-attributes=20

View File

@ -1,2 +1,4 @@
python 3.12.0
shellcheck 0.9.0
nodejs 23.5.0
python 3.13.1
shellcheck 0.10.0
sqlite 3.47.2

View File

@ -173,4 +173,5 @@ features or generally made searx better:
- Austin Olacsi `<https://github.com/Austin-Olacsi>`
- @micsthepick
- Daniel Kukula `<https://github.com/dkuku>`
- Patrick Evans `https://github.com/holysoles`
- Patrick Evans `https://github.com/holysoles`
- Daniel Mowitz `<https://daniel.mowitz.rocks>`

View File

@ -1,4 +1,4 @@
FROM alpine:3.19
FROM alpine:3.20
ENTRYPOINT ["/sbin/tini","--","/usr/local/searxng/dockerfiles/docker-entrypoint.sh"]
EXPOSE 8080
VOLUME /etc/searxng
@ -35,7 +35,6 @@ RUN apk add --no-cache -t build-dependencies \
git \
&& apk add --no-cache \
ca-certificates \
su-exec \
python3 \
py3-pip \
libxml2 \

View File

@ -50,8 +50,8 @@ search.checker.%: install
$(Q)./manage pyenv.cmd searxng-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
PHONY += test ci.test test.shell
ci.test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.pybabel
test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.shell
ci.test: test.yamllint test.black test.types.ci test.pylint test.unit test.robot test.rst test.shell test.pybabel test.themes
test: test.yamllint test.black test.types.dev test.pylint test.unit test.robot test.rst test.shell
test.shell:
$(Q)shellcheck -x -s dash \
dockerfiles/docker-entrypoint.sh
@ -83,8 +83,9 @@ MANAGE += node.env node.env.dev node.clean
MANAGE += py.build py.clean
MANAGE += pyenv pyenv.install pyenv.uninstall
MANAGE += format.python
MANAGE += test.yamllint test.pylint test.pyright test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean
MANAGE += themes.all themes.simple themes.simple.test pygments.less
MANAGE += test.yamllint test.pylint test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean test.themes test.types.dev test.types.ci
MANAGE += themes.all themes.fix themes.test
MANAGE += themes.simple themes.simple.pygments themes.simple.fix
MANAGE += static.build.commit static.build.drop static.build.restore
MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs

View File

@ -66,7 +66,7 @@ A user_, admin_ and developer_ handbook is available on the homepage_.
Contact
=======
Ask questions or just chat about SearXNG on
Ask questions or chat with the SearXNG community (this not a chatbot) on
IRC
`#searxng on libera.chat <https://web.libera.chat/?channel=#searxng>`_

View File

@ -175,4 +175,4 @@ unset MORTY_KEY
# Start uwsgi
printf 'Listen on %s\n' "${BIND_ADDRESS}"
exec su-exec searxng:searxng uwsgi --master --http-socket "${BIND_ADDRESS}" "${UWSGI_SETTINGS_PATH}"
exec uwsgi --master --uid searxng --gid searxng --http-socket "${BIND_ADDRESS}" "${UWSGI_SETTINGS_PATH}"

View File

@ -84,9 +84,9 @@ HTML of the site. URL of the SearXNG instance and values are customizable.
.. code:: html
<form method="post" action="https://example.org/">
<!-- search --> <input type="text" name="q" />
<!-- categories --> <input type="hidden" name="categories" value="general,social media" />
<!-- language --> <input type="hidden" name="lang" value="all" />
<!-- locale --> <input type="hidden" name="locale" value="en" />
<!-- date filter --> <input type="hidden" name="time_range" value="month" />
<!-- search --> <input type="text" name="q">
<!-- categories --> <input type="hidden" name="categories" value="general,social media">
<!-- language --> <input type="hidden" name="lang" value="all">
<!-- locale --> <input type="hidden" name="locale" value="en">
<!-- date filter --> <input type="hidden" name="time_range" value="month">
</form>

View File

@ -15,6 +15,7 @@ Administrator documentation
installation-apache
update-searxng
answer-captcha
searx.favicons
searx.limiter
api
architecture

View File

@ -1,12 +1,14 @@
.. _plugins generic:
.. _plugins admin:
===============
Plugins builtin
List of plugins
===============
.. sidebar:: Further reading ..
- :ref:`SearXNG settings <settings plugins>`
- :ref:`dev plugin`
- :ref:`builtin plugins`
Configuration defaults (at built time):
@ -25,15 +27,10 @@ Configuration defaults (at built time):
- DO
- Description
JS & CSS dependencies
{% for plg in plugins %}
{% for plgin in plugins %}
* - {{plgin.name}}
- {{(plgin.default_on and "y") or ""}}
- {{plgin.description}}
{% for dep in (plgin.js_dependencies + plgin.css_dependencies) %}
| ``{{dep}}`` {% endfor %}
* - {{plg.info.name}}
- {{(plg.default_on and "y") or ""}}
- {{plg.info.description}}
{% endfor %}

View File

@ -0,0 +1,251 @@
.. _favicons:
========
Favicons
========
.. sidebar:: warning
Don't activate the favicons before reading the documentation.
.. contents::
:depth: 2
:local:
:backlinks: entry
Activating the favicons in SearXNG is very easy, but this **generates a
significantly higher load** in the client/server communication and increases
resources needed on the server.
To mitigate these disadvantages, various methods have been implemented,
including a *cache*. The cache must be parameterized according to your own
requirements and maintained regularly.
To activate favicons in SearXNG's result list, set a default
``favicon_resolver`` in the :ref:`search <settings search>` settings:
.. code:: yaml
search:
favicon_resolver: "duckduckgo"
By default and without any extensions, SearXNG serves these resolvers:
- ``duckduckgo``
- ``allesedv``
- ``google``
- ``yandex``
With the above setting favicons are displayed, the user has the option to
deactivate this feature in his settings. If the user is to have the option of
selecting from several *resolvers*, a further setting is required / but this
setting will be discussed :ref:`later <register resolvers>` in this article,
first we have to setup the favicons cache.
Infrastructure
==============
The infrastructure for providing the favicons essentially consists of three
parts:
- :py:obj:`Favicons-Proxy <.favicons.proxy>` (aka *proxy*)
- :py:obj:`Favicons-Resolvers <.favicons.resolvers>` (aka *resolver*)
- :py:obj:`Favicons-Cache <.favicons.cache>` (aka *cache*)
To protect the privacy of users, the favicons are provided via a *proxy*. This
*proxy* is automatically activated with the above activation of a *resolver*.
Additional requests are required to provide the favicons: firstly, the *proxy*
must process the incoming requests and secondly, the *resolver* must make
outgoing requests to obtain the favicons from external sources.
A *cache* has been developed to massively reduce both, incoming and outgoing
requests. This *cache* is also activated automatically with the above
activation of a *resolver*. In its defaults, however, the *cache* is minimal
and not well suitable for a production environment!
.. _favicon cache setup:
Setting up the cache
====================
To parameterize the *cache* and more settings of the favicons infrastructure, a
TOML_ configuration is created in the file ``/etc/searxng/favicons.toml``.
.. code:: toml
[favicons]
cfg_schema = 1 # config's schema version no.
[favicons.cache]
db_url = "/var/cache/searxng/faviconcache.db" # default: "/tmp/faviconcache.db"
LIMIT_TOTAL_BYTES = 2147483648 # 2 GB / default: 50 MB
# HOLD_TIME = 5184000 # 60 days / default: 30 days
# BLOB_MAX_BYTES = 40960 # 40 KB / default 20 KB
# MAINTENANCE_MODE = "off" # default: "auto"
# MAINTENANCE_PERIOD = 600 # 10min / default: 1h
:py:obj:`cfg_schema <.FaviconConfig.cfg_schema>`:
Is required to trigger any processes required for future upgrades / don't
change it.
:py:obj:`cache.db_url <.FaviconCacheConfig.db_url>`:
The path to the (SQLite_) database file. The default path is in the `/tmp`_
folder, which is deleted on every reboot and is therefore unsuitable for a
production environment. The FHS_ provides the folder for the
application cache
The FHS_ provides the folder `/var/cache`_ for the cache of applications, so a
suitable storage location of SearXNG's caches is folder ``/var/cache/searxng``.
In container systems, a volume should be mounted for this folder and in a
standard installation (compare :ref:`create searxng user`), the folder must be
created and the user under which the SearXNG process is running must be given
write permission to this folder.
.. code:: bash
$ sudo mkdir /var/cache/searxng
$ sudo chown root:searxng /var/cache/searxng/
$ sudo chmod g+w /var/cache/searxng/
:py:obj:`cache.LIMIT_TOTAL_BYTES <.FaviconCacheConfig.LIMIT_TOTAL_BYTES>`:
Maximum of bytes stored in the cache of all blobs. The limit is only reached
at each maintenance interval after which the oldest BLOBs are deleted; the
limit is exceeded during the maintenance period.
.. attention::
If the maintenance period is too long or maintenance is switched
off completely, the cache grows uncontrollably.
SearXNG hosters can change other parameters of the cache as required:
- :py:obj:`cache.HOLD_TIME <.FaviconCacheConfig.HOLD_TIME>`
- :py:obj:`cache.BLOB_MAX_BYTES <.FaviconCacheConfig.BLOB_MAX_BYTES>`
Maintenance of the cache
------------------------
Regular maintenance of the cache is required! By default, regular maintenance
is triggered automatically as part of the client requests:
- :py:obj:`cache.MAINTENANCE_MODE <.FaviconCacheConfig.MAINTENANCE_MODE>` (default ``auto``)
- :py:obj:`cache.MAINTENANCE_PERIOD <.FaviconCacheConfig.MAINTENANCE_PERIOD>` (default ``6000`` / 1h)
As an alternative to maintenance as part of the client request process, it is
also possible to carry out maintenance using an external process. For example,
by creating a :man:`crontab` entry for maintenance:
.. code:: bash
$ python -m searx.favicons cache maintenance
The following command can be used to display the state of the cache:
.. code:: bash
$ python -m searx.favicons cache state
.. _favicon proxy setup:
Proxy configuration
===================
Most of the options of the :py:obj:`Favicons-Proxy <.favicons.proxy>` are
already set sensibly with settings from the :ref:`settings.yml <searxng
settings.yml>` and should not normally be adjusted.
.. code:: toml
[favicons.proxy]
max_age = 5184000 # 60 days / default: 7 days (604800 sec)
:py:obj:`max_age <.FaviconProxyConfig.max_age>`:
The `HTTP Cache-Control max-age`_ response directive indicates that the
response remains fresh until N seconds after the response is generated. This
setting therefore determines how long a favicon remains in the client's cache.
As a rule, in the favicons infrastructure of SearXNG's this setting only
affects favicons whose byte size exceeds :ref:`BLOB_MAX_BYTES <favicon cache
setup>` (the other favicons that are already in the cache are embedded as
`data URL`_ in the :py:obj:`generated HTML <.favicons.proxy.favicon_url>`,
which can greatly reduce the number of additional requests).
.. _register resolvers:
Register resolvers
------------------
A :py:obj:`resolver <.favicon.resolvers>` is a function that obtains the favicon
from an external source. The resolver functions available to the user are
registered with their fully qualified name (FQN_) in a ``resolver_map``.
If no ``resolver_map`` is defined in the ``favicon.toml``, the favicon
infrastructure of SearXNG generates this ``resolver_map`` automatically
depending on the ``settings.yml``. SearXNG would automatically generate the
following TOML configuration from the following YAML configuration:
.. code:: yaml
search:
favicon_resolver: "duckduckgo"
.. code:: toml
[favicons.proxy.resolver_map]
"duckduckgo" = "searx.favicons.resolvers.duckduckgo"
If this automatism is not desired, then (and only then) a separate
``resolver_map`` must be created. For example, to give the user two resolvers to
choose from, the following configuration could be used:
.. code:: toml
[favicons.proxy.resolver_map]
"duckduckgo" = "searx.favicons.resolvers.duckduckgo"
"allesedv" = "searx.favicons.resolvers.allesedv"
# "google" = "searx.favicons.resolvers.google"
# "yandex" = "searx.favicons.resolvers.yandex"
.. note::
With each resolver, the resource requirement increases significantly.
The number of resolvers increases:
- the number of incoming/outgoing requests and
- the number of favicons to be stored in the cache.
In the following we list the resolvers available in the core of SearXNG, but via
the FQN_ it is also possible to implement your own resolvers and integrate them
into the *proxy*:
- :py:obj:`searx.favicons.resolvers.duckduckgo`
- :py:obj:`searx.favicons.resolvers.allesedv`
- :py:obj:`searx.favicons.resolvers.google`
- :py:obj:`searx.favicons.resolvers.yandex`
.. _SQLite:
https://www.sqlite.org/
.. _FHS:
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
.. _`/var/cache`:
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s05.html
.. _`/tmp`:
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s18.html
.. _TOML:
https://toml.io/en/
.. _HTTP Cache-Control max-age:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#response_directives
.. _data URL:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs
.. _FQN: https://en.wikipedia.org/wiki/Fully_qualified_name

View File

@ -1,3 +1,5 @@
.. _searxng settings.yml:
========
Settings
========
@ -20,6 +22,6 @@ Settings
settings_redis
settings_outgoing
settings_categories_as_tabs
settings_plugins

View File

@ -13,6 +13,7 @@
donation_url: false
contact_url: false
enable_metrics: true
open_metrics: ''
``debug`` : ``$SEARXNG_DEBUG``
Allow a more detailed log if you run SearXNG directly. Display *detailed* error
@ -32,3 +33,10 @@
``enable_metrics``:
Enabled by default. Record various anonymous metrics available at ``/stats``,
``/stats/errors`` and ``/preferences``.
``open_metrics``:
Disabled by default. Set to a secret password to expose an
`OpenMetrics API <https://github.com/prometheus/OpenMetrics>`_ at ``/metrics``,
e.g. for usage with Prometheus. The ``/metrics`` endpoint is using HTTP Basic Auth,
where the password is the value of ``open_metrics`` set above. The username used for
Basic Auth can be randomly chosen as only the password is being validated.

View File

@ -0,0 +1,67 @@
.. _settings plugins:
=======
Plugins
=======
.. sidebar:: Further reading ..
- :ref:`plugins admin`
- :ref:`dev plugin`
- :ref:`builtin plugins`
The built-in plugins can be activated or deactivated via the settings
(:ref:`settings enabled_plugins`) and external plugins can be integrated into
SearXNG (:ref:`settings external_plugins`).
.. _settings enabled_plugins:
``enabled_plugins:`` (internal)
===============================
In :ref:`plugins admin` you find a complete list of all plugins, the default
configuration looks like:
.. code:: yaml
enabled_plugins:
- 'Basic Calculator'
- 'Hash plugin'
- 'Self Information'
- 'Tracker URL remover'
- 'Unit converter plugin'
- 'Ahmia blacklist'
.. _settings external_plugins:
``plugins:`` (external)
=======================
SearXNG supports *external plugins* / there is no need to install one, SearXNG
runs out of the box. But to demonstrate; in the example below we install the
SearXNG plugins from *The Green Web Foundation* `[ref]
<https://www.thegreenwebfoundation.org/news/searching-the-green-web-with-searx/>`__:
.. code:: bash
$ sudo utils/searxng.sh instance cmd bash -c
(searxng-pyenv)$ pip install git+https://github.com/return42/tgwf-searx-plugins
In the :ref:`settings.yml` activate the ``plugins:`` section and add module
``only_show_green_results`` from ``tgwf-searx-plugins``.
.. code:: yaml
plugins:
- only_show_green_results
# - mypackage.mymodule.MyPlugin
# - mypackage.mymodule.MyOtherPlugin
.. hint::
``only_show_green_results`` is an old plugin that was still implemented in
the old style. There is a legacy treatment for backward compatibility, but
new plugins should be implemented as a :py:obj:`searx.plugins.Plugin` class.

View File

@ -9,6 +9,7 @@
search:
safe_search: 0
autocomplete: ""
favicon_resolver: ""
default_lang: ""
ban_time_on_fail: 5
max_ban_time_on_fail: 120
@ -32,14 +33,24 @@
``autocomplete``:
Existing autocomplete backends, leave blank to turn it off.
- ``dbpedia``
- ``duckduckgo``
- ``google``
- ``mwmbl``
- ``startpage``
- ``swisscows``
- ``qwant``
- ``wikipedia``
- ``baidu```
- ``brave```
- ``dbpedia```
- ``duckduckgo```
- ``google```
- ``mwmbl```
- ``qwant```
- ``seznam```
- ``startpage```
- ``stract```
- ``swisscows```
- ``wikipedia```
- ``yandex```
``favicon_resolver``:
To activate favicons in SearXNG's result list select a default
favicon-resolver, leave blank to turn off the feature. Don't activate the
favicons before reading the :ref:`Favicons documentation <favicons>`.
``default_lang``:
Default search language - leave blank to detect from browser information or

View File

@ -14,6 +14,7 @@
limiter: false
public_instance: false
image_proxy: false
method: "POST"
default_http_headers:
X-Content-Type-Options : nosniff
X-Download-Options : noopen
@ -50,8 +51,21 @@
``image_proxy`` : ``$SEARXNG_IMAGE_PROXY``
Allow your instance of SearXNG of being able to proxy images. Uses memory space.
``method`` : ``GET`` | ``POST``
HTTP method. By defaults ``POST`` is used / The ``POST`` method has the
advantage with some WEB browsers that the history is not easy to read, but
there are also various disadvantages that sometimes **severely restrict the
ease of use for the end user** (e.g. back button to jump back to the previous
search page and drag & drop of search term to new tabs do not work as
expected .. and several more). We had a lot of long discussions about the
*pros v2 cons*:
- `set HTTP GET method by default
<https://github.com/searxng/searxng/pull/3619>`__
- `http methods GET & POST
<https://github.com/search?q=repo%3Asearxng%2Fsearxng+label%3A%22http+methods+GET+%26+POST%22>`__
.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
``default_http_headers`` :
Set additional HTTP headers, see `#755 <https://github.com/searx/searx/issues/715>`__

View File

@ -21,6 +21,7 @@
simple_style: auto
search_on_category_select: true
hotkeys: default
url_formatting: pretty
.. _static_use_hash:
@ -58,7 +59,7 @@
Name of the theme you want to use by default on your SearXNG instance.
``theme_args.simple_style``:
Style of simple theme: ``auto``, ``light``, ``dark``
Style of simple theme: ``auto``, ``light``, ``dark``, ``black``
``results_on_new_tab``:
Open result links in a new tab by default.
@ -68,3 +69,6 @@
``hotkeys``:
Hotkeys to use in the search interface: ``default``, ``vim`` (Vim-like).
``url_formatting``:
Formatting type to use for result URLs: ``pretty``, ``full`` or ``host``.

View File

@ -113,7 +113,7 @@ ${fedora_build}
(${SERVICE_USER})$ command -v python && python --version
$SEARXNG_PYENV/bin/python
Python 3.8.1
Python 3.11.10
# update pip's boilerplate ..
pip install -U pip
@ -123,7 +123,7 @@ ${fedora_build}
# jump to SearXNG's working tree and install SearXNG into virtualenv
(${SERVICE_USER})$ cd \"$SEARXNG_SRC\"
(${SERVICE_USER})$ pip install -e .
(${SERVICE_USER})$ pip install --use-pep517 --no-build-isolation -e .
.. END manage.sh update_packages

View File

@ -54,7 +54,7 @@ searx.engines.load_engines(searx.settings['engines'])
jinja_contexts = {
'searx': {
'engines': searx.engines.engines,
'plugins': searx.plugins.plugins,
'plugins': searx.plugins.STORAGE,
'version': {
'node': os.getenv('NODE_MINIMUM_VERSION')
},
@ -129,8 +129,9 @@ extensions = [
'notfound.extension', # https://github.com/readthedocs/sphinx-notfound-page
]
# autodoc_typehints = "description"
autodoc_default_options = {
'member-order': 'groupwise',
'member-order': 'bysource',
}
myst_enable_extensions = [

View File

@ -0,0 +1,11 @@
.. _builtin answerers:
==================
Built-in Answerers
==================
.. toctree::
:maxdepth: 1
random
statistics

View File

@ -0,0 +1,7 @@
.. _dev answerers:
====================
Answerer Development
====================
.. automodule:: searx.answerers

View File

@ -0,0 +1,9 @@
=========
Answerers
=========
.. toctree::
:maxdepth: 2
development
builtins

View File

@ -0,0 +1,8 @@
.. _answerer.random:
======
Random
======
.. autoclass:: searx.answerers.random.SXNGAnswerer
:members:

View File

@ -0,0 +1,8 @@
.. _answerer.statistics:
==========
Statistics
==========
.. autoclass:: searx.answerers.statistics.SXNGAnswerer
:members:

View File

@ -237,333 +237,18 @@ following parameters can be used to specify a search request:
=================== =========== ==========================================================================
.. _engine results:
.. _engine media types:
Making a Response
=================
Result Types (``template``)
===========================
In the ``response`` function of the engine, the HTTP response (``resp``) is
parsed and a list of results is returned.
Each result item of an engine can be of different media-types. Currently the
following media-types are supported. To set another media-type as
:ref:`template default`, the parameter ``template`` must be set to the desired
type.
A engine can append result-items of different media-types and different
result-types to the result list. The list of the result items is render to HTML
by templates. For more details read section:
.. _template default:
- :ref:`simple theme templates`
- :ref:`result types`
``default``
-----------
.. table:: Parameter of the **default** media type:
:width: 100%
========================= =====================================================
result-parameter information
========================= =====================================================
url string, url of the result
title string, title of the result
content string, general result-text
publishedDate :py:class:`datetime.datetime`, time of publish
========================= =====================================================
.. _template images:
``images``
----------
.. list-table:: Parameter of the **images** media type
:header-rows: 2
:width: 100%
* - result-parameter
- Python type
- information
* - template
- :py:class:`str`
- is set to ``images.html``
* - url
- :py:class:`str`
- url to the result site
* - title
- :py:class:`str`
- title of the result
* - content
- :py:class:`str`
- description of the image
* - publishedDate
- :py:class:`datetime <datetime.datetime>`
- time of publish
* - img_src
- :py:class:`str`
- url to the result image
* - thumbnail_src
- :py:class:`str`
- url to a small-preview image
* - resolution
- :py:class:`str`
- the resolution of the image (e.g. ``1920 x 1080`` pixel)
* - img_format
- :py:class:`str`
- the format of the image (e.g. ``png``)
* - filesize
- :py:class:`str`
- size of bytes in :py:obj:`human readable <searx.humanize_bytes>` notation
(e.g. ``MB`` for 1024 \* 1024 Bytes filesize).
.. _template videos:
``videos``
----------
.. table:: Parameter of the **videos** media type:
:width: 100%
========================= =====================================================
result-parameter information
------------------------- -----------------------------------------------------
template is set to ``videos.html``
========================= =====================================================
url string, url of the result
title string, title of the result
content *(not implemented yet)*
publishedDate :py:class:`datetime.datetime`, time of publish
thumbnail string, url to a small-preview image
========================= =====================================================
.. _template torrent:
``torrent``
-----------
.. _magnetlink: https://en.wikipedia.org/wiki/Magnet_URI_scheme
.. table:: Parameter of the **torrent** media type:
:width: 100%
========================= =====================================================
result-parameter information
------------------------- -----------------------------------------------------
template is set to ``torrent.html``
========================= =====================================================
url string, url of the result
title string, title of the result
content string, general result-text
publishedDate :py:class:`datetime.datetime`,
time of publish *(not implemented yet)*
seed int, number of seeder
leech int, number of leecher
filesize int, size of file in bytes
files int, number of files
magnetlink string, magnetlink_ of the result
torrentfile string, torrentfile of the result
========================= =====================================================
.. _template map:
``map``
-------
.. table:: Parameter of the **map** media type:
:width: 100%
========================= =====================================================
result-parameter information
------------------------- -----------------------------------------------------
template is set to ``map.html``
========================= =====================================================
url string, url of the result
title string, title of the result
content string, general result-text
publishedDate :py:class:`datetime.datetime`, time of publish
latitude latitude of result (in decimal format)
longitude longitude of result (in decimal format)
boundingbox boundingbox of result (array of 4. values
``[lat-min, lat-max, lon-min, lon-max]``)
geojson geojson of result (https://geojson.org/)
osm.type type of osm-object (if OSM-Result)
osm.id id of osm-object (if OSM-Result)
address.name name of object
address.road street name of object
address.house_number house number of object
address.locality city, place of object
address.postcode postcode of object
address.country country of object
========================= =====================================================
.. _template paper:
``paper``
---------
.. _BibTeX format: https://www.bibtex.com/g/bibtex-format/
.. _BibTeX field types: https://en.wikipedia.org/wiki/BibTeX#Field_types
.. list-table:: Parameter of the **paper** media type /
see `BibTeX field types`_ and `BibTeX format`_
:header-rows: 2
:width: 100%
* - result-parameter
- Python type
- information
* - template
- :py:class:`str`
- is set to ``paper.html``
* - title
- :py:class:`str`
- title of the result
* - content
- :py:class:`str`
- abstract
* - comments
- :py:class:`str`
- free text display in italic below the content
* - tags
- :py:class:`List <list>`\ [\ :py:class:`str`\ ]
- free tag list
* - publishedDate
- :py:class:`datetime <datetime.datetime>`
- last publication date
* - type
- :py:class:`str`
- short description of medium type, e.g. *book*, *pdf* or *html* ...
* - authors
- :py:class:`List <list>`\ [\ :py:class:`str`\ ]
- list of authors of the work (authors with a "s")
* - editor
- :py:class:`str`
- list of editors of a book
* - publisher
- :py:class:`str`
- name of the publisher
* - journal
- :py:class:`str`
- name of the journal or magazine the article was
published in
* - volume
- :py:class:`str`
- volume number
* - pages
- :py:class:`str`
- page range where the article is
* - number
- :py:class:`str`
- number of the report or the issue number for a journal article
* - doi
- :py:class:`str`
- DOI number (like ``10.1038/d41586-018-07848-2``)
* - issn
- :py:class:`List <list>`\ [\ :py:class:`str`\ ]
- ISSN number like ``1476-4687``
* - isbn
- :py:class:`List <list>`\ [\ :py:class:`str`\ ]
- ISBN number like ``9780201896831``
* - pdf_url
- :py:class:`str`
- URL to the full article, the PDF version
* - html_url
- :py:class:`str`
- URL to full article, HTML version
.. _template packages:
``packages``
------------
.. list-table:: Parameter of the **packages** media type
:header-rows: 2
:width: 100%
* - result-parameter
- Python type
- information
* - template
- :py:class:`str`
- is set to ``packages.html``
* - title
- :py:class:`str`
- title of the result
* - content
- :py:class:`str`
- abstract
* - package_name
- :py:class:`str`
- the name of the package
* - version
- :py:class:`str`
- the current version of the package
* - maintainer
- :py:class:`str`
- the maintainer or author of the project
* - publishedDate
- :py:class:`datetime <datetime.datetime>`
- date of latest update or release
* - tags
- :py:class:`List <list>`\ [\ :py:class:`str`\ ]
- free tag list
* - popularity
- :py:class:`str`
- the popularity of the package, e.g. rating or download count
* - license_name
- :py:class:`str`
- the name of the license
* - license_url
- :py:class:`str`
- the web location of a license copy
* - homepage
- :py:class:`str`
- the url of the project's homepage
* - source_code_url
- :py:class:`str`
- the location of the project's source code
* - links
- :py:class:`dict`
- additional links in the form of ``{'link_name': 'http://example.com'}``

View File

@ -19,6 +19,14 @@ Engine Implementations
engine_overview
ResultList and engines
======================
.. autoclass:: searx.result_types.ResultList
.. autoclass:: searx.result_types.EngineResults
Engine Types
============
@ -45,6 +53,7 @@ Online Engines
demo/demo_online
xpath
mediawiki
json_engine
.. toctree::
:maxdepth: 1
@ -93,7 +102,7 @@ Online Currency
- :py:obj:`processors.online_currency <searx.search.processors.online_currency>`
*no engine of this type is documented yet / comming soon*
*no engine of this type is documented yet / coming soon*
.. _online dictionary:
@ -104,4 +113,4 @@ Online Dictionary
- :py:obj:`processors.online_dictionary <searx.search.processors.online_dictionary>`
*no engine of this type is documented yet / comming soon*
*no engine of this type is documented yet / coming soon*

View File

@ -0,0 +1,13 @@
.. _json_engine engine:
============
JSON Engine
============
.. contents::
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.json_engine
:members:

View File

@ -25,7 +25,7 @@ Relational Database Management System (RDBMS) are supported:
- :ref:`engine sqlite`
- :ref:`engine postgresql`
- :ref:`engine mysql_server`
- :ref:`engine mysql_server` & :ref:`engine mariadb_server`
All of the engines above are just commented out in the :origin:`settings.yml
<searx/settings.yml>`, as you have to set the required attributes for the
@ -119,3 +119,16 @@ MySQL
.. automodule:: searx.engines.mysql_server
:members:
.. _engine mariadb_server:
MariaDB
--------
.. sidebar:: info
- :origin:`mariadb_server.py <searx/engines/mariadb_server.py>`
- ``pip install`` :pypi:`mariadb <mariadb>`
.. automodule:: searx.engines.mariadb_server
:members:

View File

@ -0,0 +1,13 @@
.. _adobe stock engine:
===========
Adobe Stock
===========
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.adobe_stock
:members:

View File

@ -0,0 +1,13 @@
.. _alpinelinux engine:
=====================
Alpine Linux Packages
=====================
.. contents::
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.alpinelinux
:members:

View File

@ -0,0 +1,8 @@
.. _gitea geizhals:
========
Geizhals
========
.. automodule:: searx.engines.geizhals
:members:

View File

@ -0,0 +1,8 @@
.. _gitlab engine:
======
GitLab
======
.. automodule:: searx.engines.gitlab
:members:

View File

@ -0,0 +1,7 @@
.. _extended_types.:
==============
Extended Types
==============
.. automodule:: searx.extended_types

View File

@ -8,9 +8,13 @@ Developer documentation
quickstart
rtm_asdf
contribution_guide
extended_types
engines/index
result_types/index
templates
search_api
plugins
plugins/index
answerers/index
translation
lxcdev
makefile

View File

@ -61,7 +61,7 @@ working tree and release a ``make install`` to get a virtualenv with a
$ make install
PYENV [virtualenv] installing ./requirements*.txt into local/py3
...
PYENV [install] pip install -e 'searx[test]'
PYENV [install] pip install --use-pep517 --no-build-isolation -e 'searx[test]'
...
Successfully installed searxng-2023.7.19+a446dea1b
@ -78,7 +78,7 @@ the check fails if you edit the requirements listed in
...
PYENV [virtualenv] installing ./requirements*.txt into local/py3
...
PYENV [install] pip install -e 'searx[test]'
PYENV [install] pip install --use-pep517 --no-build-isolation -e 'searx[test]'
...
Successfully installed searxng-2023.7.19+a446dea1b

View File

@ -1,106 +0,0 @@
.. _dev plugin:
=======
Plugins
=======
.. sidebar:: Further reading ..
- :ref:`plugins generic`
Plugins can extend or replace functionality of various components of searx.
Example plugin
==============
.. code:: python
name = 'Example plugin'
description = 'This plugin extends the suggestions with the word "example"'
default_on = False # disabled by default
# attach callback to the post search hook
# request: flask request object
# ctx: the whole local context of the post search hook
def post_search(request, search):
search.result_container.suggestions.add('example')
return True
External plugins
================
SearXNG supports *external plugins* / there is no need to install one, SearXNG
runs out of the box. But to demonstrate; in the example below we install the
SearXNG plugins from *The Green Web Foundation* `[ref]
<https://www.thegreenwebfoundation.org/news/searching-the-green-web-with-searx/>`__:
.. code:: bash
$ sudo utils/searxng.sh instance cmd bash -c
(searxng-pyenv)$ pip install git+https://github.com/return42/tgwf-searx-plugins
In the :ref:`settings.yml` activate the ``plugins:`` section and add module
``only_show_green_results`` from ``tgwf-searx-plugins``.
.. code:: yaml
plugins:
...
- only_show_green_results
...
Plugin entry points
===================
Entry points (hooks) define when a plugin runs. Right now only three hooks are
implemented. So feel free to implement a hook if it fits the behaviour of your
plugin. A plugin doesn't need to implement all the hooks.
.. py:function:: pre_search(request, search) -> bool
Runs BEFORE the search request.
`search.result_container` can be changed.
Return a boolean:
* True to continue the search
* False to stop the search
:param flask.request request:
:param searx.search.SearchWithPlugins search:
:return: False to stop the search
:rtype: bool
.. py:function:: post_search(request, search) -> None
Runs AFTER the search request.
:param flask.request request: Flask request.
:param searx.search.SearchWithPlugins search: Context.
.. py:function:: on_result(request, search, result) -> bool
Runs for each result of each engine.
`result` can be changed.
If `result["url"]` is defined, then `result["parsed_url"] = urlparse(result['url'])`
.. warning::
`result["url"]` can be changed, but `result["parsed_url"]` must be updated too.
Return a boolean:
* True to keep the result
* False to remove the result
:param flask.request request:
:param searx.search.SearchWithPlugins search:
:param typing.Dict result: Result, see - :ref:`engine results`
:return: True to keep the result
:rtype: bool

View File

@ -0,0 +1,15 @@
.. _builtin plugins:
================
Built-in Plugins
================
.. toctree::
:maxdepth: 1
calculator
hash_plugin
hostnames
self_info
tor_check
unit_converter

View File

@ -0,0 +1,8 @@
.. _plugins.calculator:
==========
Calculator
==========
.. automodule:: searx.plugins.calculator
:members:

View File

@ -0,0 +1,7 @@
.. _dev plugin:
==================
Plugin Development
==================
.. automodule:: searx.plugins

View File

@ -0,0 +1,8 @@
.. _hash_plugin plugin:
===========
Hash Values
===========
.. autoclass:: searx.plugins.hash_plugin.SXNGPlugin
:members:

View File

@ -1,9 +1,8 @@
.. _hostnames plugin:
================
Hostnames plugin
================
=========
Hostnames
=========
.. automodule:: searx.plugins.hostnames
:members:
:members:

View File

@ -0,0 +1,9 @@
=======
Plugins
=======
.. toctree::
:maxdepth: 2
development
builtins

View File

@ -0,0 +1,8 @@
.. _self_info plugin:
=========
Self-Info
=========
.. autoclass:: searx.plugins.self_info.SXNGPlugin
:members:

View File

@ -1,9 +1,8 @@
.. _tor check plugin:
================
Tor check plugin
================
=========
Tor check
=========
.. automodule:: searx.plugins.tor_check
:members:
:members:

View File

@ -1,9 +1,8 @@
.. _unit converter plugin:
=====================
Unit converter plugin
=====================
==============
Unit Converter
==============
.. automodule:: searx.plugins.unit_converter
:members:

View File

@ -6,7 +6,8 @@ Development Quickstart
.. _npm: https://www.npmjs.com/
.. _Node.js: https://nodejs.org/
.. _eslint: https://eslint.org/
.. _stylelint: https://stylelint.io/
.. sidebar:: further read
@ -39,10 +40,9 @@ to our ":ref:`how to contribute`" guideline.
- :ref:`make themes`
If you implement themes, you will need to setup a :ref:`Node.js environment
<make node.env>`: ``make node.env``
Before you call *make run* (2.), you need to compile the modified styles and
JavaScript: ``make themes.all``
<make node.env>`. Before you call *make run* (2.), you need to compile the
modified styles and JavaScript: ``make node.clean themes.all``. If eslint_ or
stylelint_ report some issues, try ``make themes.fix``.
Alternatively you can also compile selective the theme you have modified,
e.g. the *simple* theme.

View File

@ -0,0 +1,7 @@
.. _result_types.answer:
==============
Answer Results
==============
.. automodule:: searx.result_types.answer

View File

@ -0,0 +1,5 @@
======
Result
======
.. automodule:: searx.result_types._base

View File

@ -0,0 +1,34 @@
.. _result_types.corrections:
==================
Correction Results
==================
.. hint::
There is still no typing for these result items. The templates can be used as
orientation until the final typing is complete.
The corrections area shows the user alternative search terms.
A result of this type is a very simple dictionary with only one key/value pair
.. code:: python
{"correction" : "lorem ipsum .."}
From this simple dict another dict is build up:
.. code:: python
# use RawTextQuery to get the corrections URLs with the same bang
{"url" : "!bang lorem ipsum ..", "title": "lorem ipsum .." }
and used in the template :origin:`corrections.html
<searx/templates/simple/elements/corrections.html>`:
title : :py:class:`str`
Corrected search term.
url : :py:class:`str`
Not really an URL, its the value to insert in a HTML form for a SearXNG query.

View File

@ -0,0 +1,95 @@
.. _result types:
============
Result Types
============
To understand the typification of the results, let's take a brief look at the
structure of SearXNG .. At its core, SearXNG is nothing more than an aggregator
that aggregates the results from various sources, renders them via templates and
displays them to the user.
The **sources** can be:
1. :ref:`engines <engine implementations>`
2. :ref:`plugins <dev plugin>`
3. :ref:`answerers <dev answerers>`
The sources provide the results, which are displayed in different **areas**
depending on the type of result. The areas are:
main results:
It is the main area in which -- as is typical for search engines -- the
results that a search engine has found for the search term are displayed.
answers:
This area displays short answers that could be found for the search term.
info box:
An area in which additional information can be displayed, e.g. excerpts from
wikipedia or other sources such as maps.
suggestions:
Suggestions for alternative search terms can be found in this area. These can
be clicked on and a search is carried out with these search terms.
corrections:
Results in this area are like the suggestion of alternative search terms,
which usually result from spelling corrections
At this point it is important to note that all **sources** can contribute
results to all of the areas mentioned above.
In most cases, however, the :ref:`engines <engine implementations>` will fill
the *main results* and the :ref:`answerers <dev answerers>` will generally
provide the contributions for the *answer* area. Not necessary to mention here
but for a better understanding: the plugins can also filter out or change
results from the main results area (e.g. the URL of the link).
The result items are organized in the :py:obj:`results.ResultContainer` and
after all sources have delivered their results, this container is passed to the
templating to build a HTML output. The output is usually HTML, but it is also
possible to output the result lists as JSON or RSS feed. Thats quite all we need
to know before we dive into typification of result items.
.. hint::
Typification of result items: we are at the very first beginng!
The first thing we have to realize is that there is no typification of the
result items so far, we have to build it up first .. and that is quite a big
task, which we will only be able to accomplish gradually.
The foundation for the typeless results was laid back in 2013 in the very first
commit :commit:`ae9fb1d7d`, and the principle has not changed since then. At
the time, the approach was perfectly adequate, but we have since evolved and the
demands on SearXNG increase with every feature request.
**Motivation:** in the meantime, it has become very difficult to develop new
features that require structural changes and it is especially hard for newcomers
to find their way in this typeless world. As long as the results are only
simple key/value dictionaries, it is not even possible for the IDEs to support
the application developer in his work.
**Planning:** The procedure for subsequent typing will have to be based on the
circumstances ..
.. attention::
As long as there is no type defined for a kind of result the HTML template
specify what the properties of a type are.
In this sense, you will either find a type definition here in the
documentation or, if this does not yet exist, a description of the HTML
template.
.. toctree::
:maxdepth: 2
base_result
main_result
answer
correction
suggestion
infobox

View File

@ -0,0 +1,60 @@
.. _result_types.infobox:
===============
Infobox Results
===============
.. hint::
There is still no typing for these result items. The templates can be used as
orientation until the final typing is complete.
The infobox is an area where addtional infos shown to the user.
Fields used in the :origin:`infobox.html
<searx/templates/simple/elements/infobox.html>`:
img_src: :py:class:`str`
URL of a image or thumbnail that is displayed in the infobox.
infobox: :py:class:`str`
Title of the info box.
content: :py:class:`str`
Text of the info box.
The infobox has additional subsections for *attributes*, *urls* and
*relatedTopics*:
attributes: :py:class:`List <list>`\ [\ :py:class:`dict`\ ]
A list of attributes. An *attribute* is a dictionary with keys:
- label :py:class:`str`: (mandatory)
- value :py:class:`str`: (mandatory)
- image :py:class:`List <list>`\ [\ :py:class:`dict`\ ] (optional)
A list of images. An *image* is a dictionary with keys:
- src :py:class:`str`: URL of an image/thumbnail (mandatory)
- alt :py:class:`str`: alternative text for the image (mandatory)
urls: :py:class:`List <list>`\ [\ :py:class:`dict`\ ]
A list of links. An *link* is a dictionary with keys:
- url :py:class:`str`: URL of the link (mandatory)
- title :py:class:`str`: Title of the link (mandatory)
relatedTopics: :py:class:`List <list>`\ [\ :py:class:`dict`\ ]
A list of topics. An *topic* is a dictionary with keys:
- name: :py:class:`str`: (mandatory)
- suggestions: :py:class:`List <list>`\ [\ :py:class:`dict`\ ] (optional)
A list of suggestions. A *suggestion* is simple dictionary with just one
key/value pair:
- suggestion: :py:class:`str`: suggested search term (mandatory)

View File

@ -0,0 +1,17 @@
============
Main Results
============
There is still no typing for the items in the :ref:`main result list`. The
templates can be used as orientation until the final typing is complete.
- :ref:`template default`
- :ref:`template images`
- :ref:`template videos`
- :ref:`template torrent`
- :ref:`template map`
- :ref:`template paper`
- :ref:`template packages`
- :ref:`template code`
- :ref:`template files`
- :ref:`template products`

View File

@ -0,0 +1,38 @@
.. _result_types.suggestion:
==================
Suggestion Results
==================
.. hint::
There is still no typing for these result items. The templates can be used as
orientation until the final typing is complete.
The suggestions area shows the user alternative search terms.
A result of this type is a very simple dictionary with only one key/value pair
.. code:: python
{"suggestion" : "lorem ipsum .."}
From this simple dict another dict is build up:
.. code:: python
{"url" : "!bang lorem ipsum ..", "title": "lorem ipsum" }
and used in the template :origin:`suggestions.html
<searx/templates/simple/elements/suggestions.html>`:
.. code:: python
# use RawTextQuery to get the suggestion URLs with the same bang
{"url" : "!bang lorem ipsum ..", "title": "lorem ipsum" }
title : :py:class:`str`
Suggested search term
url : :py:class:`str`
Not really an URL, its the value to insert in a HTML form for a SearXNG query.

View File

@ -60,6 +60,7 @@ Scripts to update static data in :origin:`searx/data/`
.. automodule:: searxng_extra.update.update_engine_traits
:members:
.. _update_osm_keys_tags.py:
``update_osm_keys_tags.py``
===========================

577
docs/dev/templates.rst Normal file
View File

@ -0,0 +1,577 @@
.. _simple theme templates:
======================
Simple Theme Templates
======================
The simple template is complex, it consists of many different elements and also
uses macros and include statements. The following is a rough overview that we
would like to give the developerat hand, details must still be taken from the
:origin:`sources <searx/templates/simple/>`.
A :ref:`result item <result types>` can be of different media types. The media
type of a result is defined by the :py:obj:`result_type.Result.template`. To
set another media-type as :ref:`template default`, the field ``template``
in the result item must be set to the desired type.
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. _result template macros:
Result template macros
======================
.. _macro result_header:
``result_header``
-----------------
Execpt ``image.html`` and some others this macro is used in nearly all result
types in the :ref:`main result list`.
Fields used in the template :origin:`macro result_header
<searx/templates/simple/macros.html>`:
url : :py:class:`str`
Link URL of the result item.
title : :py:class:`str`
Link title of the result item.
img_src, thumbnail : :py:class:`str`
URL of a image or thumbnail that is displayed in the result item.
.. _macro result_sub_header:
``result_sub_header``
---------------------
Execpt ``image.html`` and some others this macro is used in nearly all result
types in the :ref:`main result list`.
Fields used in the template :origin:`macro result_sub_header
<searx/templates/simple/macros.html>`:
publishedDate : :py:obj:`datetime.datetime`
The date on which the object was published.
length: :py:obj:`time.struct_time`
Playing duration in seconds.
views: :py:class:`str`
View count in humanized number format.
author : :py:class:`str`
Author of the title.
metadata : :py:class:`str`
Miscellaneous metadata.
.. _engine_data:
``engine_data_form``
--------------------
The ``engine_data_form`` macro is used in :origin:`results,html
<searx/templates/simple/results.html>` in a HTML ``<form/>`` element. The
intention of this macro is to pass data of a engine from one :py:obj:`response
<searx.engines.demo_online.response>` to the :py:obj:`searx.search.SearchQuery`
of the next :py:obj:`request <searx.engines.demo_online.request>`.
To pass data, engine's response handler can append result items of typ
``engine_data``. This is by example used to pass a token from the response to
the next request:
.. code:: python
def response(resp):
...
results.append({
'engine_data': token,
'key': 'next_page_token',
})
...
return results
def request(query, params):
page_token = params['engine_data'].get('next_page_token')
.. _main result list:
Main Result List
================
The **media types** of the **main result type** are the template files in
the :origin:`result_templates <searx/templates/simple/result_templates>`.
.. _template default:
``default.html``
----------------
Displays result fields from:
- :ref:`macro result_header` and
- :ref:`macro result_sub_header`
Additional fields used in the :origin:`default.html
<searx/templates/simple/result_templates/default.html>`:
content : :py:class:`str`
General text of the result item.
iframe_src : :py:class:`str`
URL of an embedded ``<iframe>`` / the frame is collapsible.
audio_src : uri,
URL of an embedded ``<audio controls>``.
.. _template images:
``images.html``
---------------
The images are displayed as small thumbnails in the main results list.
title : :py:class:`str`
Title of the image.
thumbnail_src : :py:class:`str`
URL of a preview of the image.
resolution :py:class:`str`
The resolution of the image (e.g. ``1920 x 1080`` pixel)
Image labels
~~~~~~~~~~~~
Clicking on the preview opens a gallery view in which all further metadata for
the image is displayed. Addition fields used in the :origin:`images.html
<searx/templates/simple/result_templates/images.html>`:
img_src : :py:class:`str`
URL of the full size image.
content: :py:class:`str`
Description of the image.
author: :py:class:`str`
Name of the author of the image.
img_format : :py:class:`str`
The format of the image (e.g. ``png``).
source : :py:class:`str`
Source of the image.
filesize: :py:class:`str`
Size of bytes in :py:obj:`human readable <searx.humanize_bytes>` notation
(e.g. ``MB`` for 1024 \* 1024 Bytes filesize).
url : :py:class:`str`
URL of the page from where the images comes from (source).
.. _template videos:
``videos.html``
---------------
Displays result fields from:
- :ref:`macro result_header` and
- :ref:`macro result_sub_header`
Additional fields used in the :origin:`videos.html
<searx/templates/simple/result_templates/videos.html>`:
iframe_src : :py:class:`str`
URL of an embedded ``<iframe>`` / the frame is collapsible.
The videos are displayed as small thumbnails in the main results list, there
is an additional button to collaps/open the embeded video.
content : :py:class:`str`
Description of the code fragment.
.. _template torrent:
``torrent.html``
----------------
.. _magnet link: https://en.wikipedia.org/wiki/Magnet_URI_scheme
.. _torrent file: https://en.wikipedia.org/wiki/Torrent_file
Displays result fields from:
- :ref:`macro result_header` and
- :ref:`macro result_sub_header`
Additional fields used in the :origin:`torrent.html
<searx/templates/simple/result_templates/torrent.html>`:
magnetlink:
URL of the `magnet link`_.
torrentfile
URL of the `torrent file`_.
seed : ``int``
Number of seeders.
leech : ``int``
Number of leecher
filesize : ``int``
Size in Bytes (rendered to human readable unit of measurement).
files : ``int``
Number of files.
.. _template map:
``map.html``
------------
.. _GeoJSON: https://en.wikipedia.org/wiki/GeoJSON
.. _Leaflet: https://github.com/Leaflet/Leaflet
.. _bbox: https://wiki.openstreetmap.org/wiki/Bounding_Box
.. _HTMLElement.dataset: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset
.. _Nominatim: https://nominatim.org/release-docs/latest/
.. _Lookup: https://nominatim.org/release-docs/latest/api/Lookup/
.. _place_id is not a persistent id:
https://nominatim.org/release-docs/latest/api/Output/#place_id-is-not-a-persistent-id
.. _perma_id: https://wiki.openstreetmap.org/wiki/Permanent_ID
.. _country code: https://wiki.openstreetmap.org/wiki/Country_code
Displays result fields from:
- :ref:`macro result_header` and
- :ref:`macro result_sub_header`
Additional fields used in the :origin:`map.html
<searx/templates/simple/result_templates/map.html>`:
content : :py:class:`str`
Description of the item.
address_label : :py:class:`str`
Label of the address / default ``_('address')``.
geojson : GeoJSON_
Geometries mapped to HTMLElement.dataset_ (``data-map-geojson``) and used by
Leaflet_.
boundingbox : ``[ min-lon, min-lat, max-lon, max-lat]``
A bbox_ area defined by min longitude , min latitude , max longitude and max
latitude. The bounding box is mapped to HTMLElement.dataset_
(``data-map-boundingbox``) and is used by Leaflet_.
longitude, latitude : :py:class:`str`
Geographical coordinates, mapped to HTMLElement.dataset_ (``data-map-lon``,
``data-map-lat``) and is used by Leaflet_.
address : ``{...}``
A dicticonary with the address data:
.. code:: python
address = {
'name' : str, # name of object
'road' : str, # street name of object
'house_number' : str, # house number of object
'postcode' : str, # postcode of object
'country' : str, # country of object
'country_code' : str,
'locality' : str,
}
country_code : :py:class:`str`
`Country code`_ of the object.
locality : :py:class:`str`
The name of the city, town, township, village, borough, etc. in which this
object is located.
links : ``[link1, link2, ...]``
A list of links with labels:
.. code:: python
links.append({
'label' : str,
'url' : str,
'url_label' : str, # set by some engines but unused (oscar)
})
data : ``[data1, data2, ...]``
A list of additional data, shown in two columns and containing a label and
value.
.. code:: python
data.append({
'label' : str,
'value' : str,
'key' : str, # set by some engines but unused
})
type : :py:class:`str` # set by some engines but unused (oscar)
Tag label from :ref:`OSM_KEYS_TAGS['tags'] <update_osm_keys_tags.py>`.
type_icon : :py:class:`str` # set by some engines but unused (oscar)
Type's icon.
osm : ``{...}``
OSM-type and OSM-ID, can be used to Lookup_ OSM data (Nominatim_). There is
also a discussion about "`place_id is not a persistent id`_" and the
perma_id_.
.. code:: python
osm = {
'type': str,
'id': str,
}
type : :py:class:`str`
Type of osm-object (if OSM-Result).
id :
ID of osm-object (if OSM-Result).
.. hint::
The ``osm`` property is set by engine ``openstreetmap.py``, but it is not
used in the ``map.html`` template yet.
.. _template paper:
``paper.html``
--------------
.. _BibTeX format: https://www.bibtex.com/g/bibtex-format/
.. _BibTeX field types: https://en.wikipedia.org/wiki/BibTeX#Field_types
Displays result fields from:
- :ref:`macro result_header`
Additional fields used in the :origin:`paper.html
<searx/templates/simple/result_templates/paper.html>`:
content : :py:class:`str`
An abstract or excerpt from the document.
comments : :py:class:`str`
Free text display in italic below the content.
tags : :py:class:`List <list>`\ [\ :py:class:`str`\ ]
Free tag list.
type : :py:class:`str`
Short description of medium type, e.g. *book*, *pdf* or *html* ...
authors : :py:class:`List <list>`\ [\ :py:class:`str`\ ]
List of authors of the work (authors with a "s" suffix, the "author" is in the
:ref:`macro result_sub_header`).
editor : :py:class:`str`
Editor of the book/paper.
publisher : :py:class:`str`
Name of the publisher.
journal : :py:class:`str`
Name of the journal or magazine the article was published in.
volume : :py:class:`str`
Volume number.
pages : :py:class:`str`
Page range where the article is.
number : :py:class:`str`
Number of the report or the issue number for a journal article.
doi : :py:class:`str`
DOI number (like ``10.1038/d41586-018-07848-2``).
issn : :py:class:`List <list>`\ [\ :py:class:`str`\ ]
ISSN number like ``1476-4687``
isbn : :py:class:`List <list>`\ [\ :py:class:`str`\ ]
ISBN number like ``9780201896831``
pdf_url : :py:class:`str`
URL to the full article, the PDF version
html_url : :py:class:`str`
URL to full article, HTML version
.. _template packages:
``packages``
------------
Displays result fields from:
- :ref:`macro result_header`
Additional fields used in the :origin:`packages.html
<searx/templates/simple/result_templates/packages.html>`:
package_name : :py:class:`str`
The name of the package.
version : :py:class:`str`
The current version of the package.
maintainer : :py:class:`str`
The maintainer or author of the project.
publishedDate : :py:class:`datetime <datetime.datetime>`
Date of latest update or release.
tags : :py:class:`List <list>`\ [\ :py:class:`str`\ ]
Free tag list.
popularity : :py:class:`str`
The popularity of the package, e.g. rating or download count.
license_name : :py:class:`str`
The name of the license.
license_url : :py:class:`str`
The web location of a license copy.
homepage : :py:class:`str`
The url of the project's homepage.
source_code_url: :py:class:`str`
The location of the project's source code.
links : :py:class:`dict`
Additional links in the form of ``{'link_name': 'http://example.com'}``
.. _template code:
``code.html``
-------------
Displays result fields from:
- :ref:`macro result_header` and
- :ref:`macro result_sub_header`
Additional fields used in the :origin:`code.html
<searx/templates/simple/result_templates/code.html>`:
content : :py:class:`str`
Description of the code fragment.
codelines : ``[line1, line2, ...]``
Lines of the code fragment.
code_language : :py:class:`str`
Name of the code language, the value is passed to
:py:obj:`pygments.lexers.get_lexer_by_name`.
repository : :py:class:`str`
URL of the repository of the code fragment.
.. _template files:
``files.html``
--------------
Displays result fields from:
- :ref:`macro result_header` and
- :ref:`macro result_sub_header`
Additional fields used in the :origin:`code.html
<searx/templates/simple/result_templates/files.html>`:
filename, size, time: :py:class:`str`
Filename, Filesize and Date of the file.
mtype : ``audio`` | ``video`` | :py:class:`str`
Mimetype type of the file.
subtype : :py:class:`str`
Mimetype / subtype of the file.
abstract : :py:class:`str`
Abstract of the file.
author : :py:class:`str`
Name of the author of the file
embedded : :py:class:`str`
URL of an embedded media type (``audio`` or ``video``) / is collapsible.
.. _template products:
``products.html``
-----------------
Displays result fields from:
- :ref:`macro result_header` and
- :ref:`macro result_sub_header`
Additional fields used in the :origin:`products.html
<searx/templates/simple/result_templates/products.html>`:
content : :py:class:`str`
Description of the product.
price : :py:class:`str`
The price must include the currency.
shipping : :py:class:`str`
Shipping details.
source_country : :py:class:`str`
Place from which the shipment is made.
.. _template answer results:
Answer results
==============
See :ref:`result_types.answer`
Suggestion results
==================
See :ref:`result_types.suggestion`
Correction results
==================
See :ref:`result_types.corrections`
Infobox results
===============
See :ref:`result_types.infobox`

View File

@ -4,26 +4,31 @@ Welcome to SearXNG
*Search without being tracked.*
SearXNG is a free internet metasearch engine which aggregates results from more
than 70 search services. Users are neither tracked nor profiled. Additionally,
SearXNG can be used over Tor for online anonymity.
.. jinja:: searx
SearXNG is a free internet metasearch engine which aggregates results from up
to {{engines | length}} :ref:`search services <configured engines>`. Users
are neither tracked nor profiled. Additionally, SearXNG can be used over Tor
for online anonymity.
Get started with SearXNG by using one of the instances listed at searx.space_.
If you don't trust anyone, you can set up your own, see :ref:`installation`.
.. sidebar:: features
.. jinja:: searx
- :ref:`self hosted <installation>`
- :ref:`no user tracking / no profiling <SearXNG protect privacy>`
- script & cookies are optional
- secure, encrypted connections
- :ref:`about 200 search engines <configured engines>`
- `about 60 translations <https://translate.codeberg.org/projects/searxng/searxng/>`_
- about 100 `well maintained <https://uptime.searxng.org/>`__ instances on searx.space_
- :ref:`easy integration of search engines <demo online engine>`
- professional development: `CI <https://github.com/searxng/searxng/actions>`_,
`quality assurance <https://dev.searxng.org/>`_ &
`automated tested UI <https://dev.searxng.org/screenshots.html>`_
.. sidebar:: features
- :ref:`self hosted <installation>`
- :ref:`no user tracking / no profiling <SearXNG protect privacy>`
- script & cookies are optional
- secure, encrypted connections
- :ref:`{{engines | length}} search engines <configured engines>`
- `58 translations <https://translate.codeberg.org/projects/searxng/searxng/>`_
- about 70 `well maintained <https://uptime.searxng.org/>`__ instances on searx.space_
- :ref:`easy integration of search engines <demo online engine>`
- professional development: `CI <https://github.com/searxng/searxng/actions>`_,
`quality assurance <https://dev.searxng.org/>`_ &
`automated tested UI <https://dev.searxng.org/screenshots.html>`_
.. sidebar:: be a part

View File

@ -2,9 +2,9 @@
Why use a private instance?
===========================
.. sidebar:: Is it worth to run my own instance?
.. sidebar:: Is running my own instance worth it?
\.\. is a common question among SearXNG users. Before answering this
\.\.\.is a common question among SearXNG users. Before answering this
question, see what options a SearXNG user has.
.. contents::
@ -12,13 +12,13 @@ Why use a private instance?
:local:
:backlinks: entry
Public instances are open to everyone who has access to its URL. Usually, these
Public instances are open to everyone who has access to their URL. Usually, they
are operated by unknown parties (from the users' point of view). Private
instances can be used by a select group of people. It is for example a SearXNG of
group of friends or a company which can be accessed through VPN. Also it can be
single user one which runs on the user's laptop.
instances can be used by a select group of people, such as a SearXNG instance for a
group of friends, or a company which can be accessed through a VPN. Instances can also be
single-user instances, which run locally on the user's machine.
To gain more insight on how these instances work let's dive into how SearXNG
To gain more insight on how these instances work, let's dive into how SearXNG
protects its users.
.. _SearXNG protect privacy:
@ -26,26 +26,26 @@ protects its users.
How does SearXNG protect privacy?
=================================
SearXNG protects the privacy of its users in multiple ways regardless of the type
of the instance (private, public). Removal of private data from search requests
SearXNG protects the privacy of its users in multiple ways, regardless of the type
of the instance (private or public). Removal of private data from search requests
comes in three forms:
1. removal of private data from requests going to search services
2. not forwarding anything from a third party services through search services
1. Removing private data from requests going to search services
2. Not forwarding anything from third party services through search services
(e.g. advertisement)
3. removal of private data from requests going to the result pages
3. Removing private data from requests going to the results pages
Removing private data means not sending cookies to external search engines and
generating a random browser profile for every request. Thus, it does not matter
if a public or private instance handles the request, because it is anonymized in
both cases. IP addresses will be the IP of the instance. But SearXNG can be
both cases. The IP address used will be the IP of the instance, but SearXNG can also be
configured to use proxy or Tor. `Result proxy
<https://github.com/asciimoo/morty>`__ is supported, too.
SearXNG does not serve ads or tracking content unlike most search services. So
SearXNG does not serve ads or tracking content, unlike most search services. Therefore,
private data is not forwarded to third parties who might monetize it. Besides
protecting users from search services, both referring page and search query are
hidden from visited result pages.
protecting users from search services, both the referring page and search query are
hidden from the results pages being visited.
What are the consequences of using public instances?
@ -53,11 +53,11 @@ What are the consequences of using public instances?
If someone uses a public instance, they have to trust the administrator of that
instance. This means that the user of the public instance does not know whether
their requests are logged, aggregated and sent or sold to a third party.
their requests are logged, aggregated, and sent or sold to a third party.
Also, public instances without proper protection are more vulnerable to abusing
the search service, In this case the external service in exchange returns
CAPTCHAs or bans the IP of the instance. Thus, search requests return less
Also, public instances without proper protection are more vulnerable to abuse of
the search service, which may cause the external service to enforce
CAPTCHAs or to ban the IP address of the instance. Thus, search requests would return less
results.
I see. What about private instances?
@ -67,10 +67,10 @@ If users run their :ref:`own instances <installation>`, everything is in their
control: the source code, logging settings and private data. Unknown instance
administrators do not have to be trusted.
Furthermore, as the default settings of their instance is editable, there is no
need to use cookies to tailor SearXNG to their needs. So preferences will not be
Furthermore, as the default settings of their instance are editable, there is no
need to use cookies to tailor SearXNG to their needs and preferences will not
reset to defaults when clearing browser cookies. As settings are stored on
their computer, it will not be accessible to others as long as their computer is
the user's computer, they will not be accessible to others as long as their computer is
not compromised.
Conclusion
@ -80,7 +80,7 @@ Always use an instance which is operated by people you trust. The privacy
features of SearXNG are available to users no matter what kind of instance they
use.
If someone is on the go or just wants to try SearXNG for the first time public
instances are the best choices. Additionally, public instance are making a
world a better place, because those who cannot or do not want to run an
instance, have access to a privacy respecting search service.
For those on the go, or just wanting to try SearXNG for the first time, public
instances are the best choice. Public instances are also making the
world a better place by giving those who cannot, or do not want to, run an
instance access to a privacy-respecting search service.

View File

@ -2,9 +2,9 @@
Source-Code
===========
This is a partial documentation of our source code. We are not aiming to document
every item from the source code, but we will add documentation when requested.
This is a partial documentation of our source code. We are not aiming to
document every item from the source code, but we will add documentation when
requested.
.. toctree::
:maxdepth: 2

View File

@ -0,0 +1,48 @@
.. _favicons source:
=================
Favicons (source)
=================
.. contents::
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.favicons
:members:
.. _favicons.config:
Favicons Config
===============
.. automodule:: searx.favicons.config
:members:
.. _favicons.proxy:
Favicons Proxy
==============
.. automodule:: searx.favicons.proxy
:members:
.. _favicons.resolver:
Favicons Resolver
=================
.. automodule:: searx.favicons.resolvers
:members:
.. _favicons.cache:
Favicons Cache
==============
.. automodule:: searx.favicons.cache
:members:

View File

@ -0,0 +1,8 @@
.. _searx.settings_loader:
===============
Settings Loader
===============
.. automodule:: searx.settings_loader
:members:

View File

@ -0,0 +1,8 @@
.. _sqlite db:
=========
SQLite DB
=========
.. automodule:: searx.sqlitedb
:members:

25
manage
View File

@ -41,7 +41,7 @@ PATH="${REPO_ROOT}/node_modules/.bin:${PATH}"
PYOBJECTS="searx"
PY_SETUP_EXTRAS='[test]'
GECKODRIVER_VERSION="v0.34.0"
GECKODRIVER_VERSION="v0.35.0"
# SPHINXOPTS=
BLACK_OPTIONS=("--target-version" "py311" "--line-length" "120" "--skip-string-normalization")
BLACK_TARGETS=("--exclude" "(searx/static|searx/languages.py)" "--include" 'searxng.msg|\.pyi?$' "searx" "searxng_extra" "tests")
@ -54,8 +54,10 @@ fi
YAMLLINT_FILES=()
while IFS= read -r line; do
YAMLLINT_FILES+=("$line")
done <<< "$(git ls-files './tests/*.yml' './searx/*.yml' './utils/templates/etc/searxng/*.yml')"
if [ "$line" != "tests/unit/settings/syntaxerror_settings.yml" ]; then
YAMLLINT_FILES+=("$line")
fi
done <<< "$(git ls-files './tests/*.yml' './searx/*.yml' './utils/templates/etc/searxng/*.yml' '.github/*.yml' '.github/*/*.yml')"
RST_FILES=(
'README.rst'
@ -92,8 +94,6 @@ pyenv.:
OK : test if virtualenv is OK
format.:
python : format Python code source using black
pygments.:
less : build LESS files for pygments
EOF
go.help
node.help
@ -231,7 +231,7 @@ gecko.driver() {
build_msg INSTALL "geckodriver already installed"
return
fi
PLATFORM="$(python3 -c 'import platform; print(platform.system().lower(), platform.architecture()[0])')"
PLATFORM="$(python -c 'import platform; print(platform.system().lower(), platform.architecture()[0])')"
case "$PLATFORM" in
"linux 32bit" | "linux2 32bit") ARCH="linux32";;
"linux 64bit" | "linux2 64bit") ARCH="linux64";;
@ -251,15 +251,6 @@ gecko.driver() {
dump_return $?
}
pygments.less() {
build_msg PYGMENTS "searxng_extra/update/update_pygments.py"
if ! pyenv.cmd python searxng_extra/update/update_pygments.py; then
build_msg PYGMENTS "building LESS files for pygments failed"
return 1
fi
return 0
}
py.build() {
build_msg BUILD "python package ${PYDIST}"
pyenv.cmd python setup.py \
@ -297,8 +288,8 @@ pyenv.install() {
( set -e
pyenv
build_msg PYENV "[install] pip install -e 'searx${PY_SETUP_EXTRAS}'"
"${PY_ENV_BIN}/python" -m pip install -e ".${PY_SETUP_EXTRAS}"
build_msg PYENV "[install] pip install --use-pep517 --no-build-isolation -e 'searx${PY_SETUP_EXTRAS}'"
"${PY_ENV_BIN}/python" -m pip install --use-pep517 --no-build-isolation -e ".${PY_SETUP_EXTRAS}"
)
local exit_val=$?
if [ ! $exit_val -eq 0 ]; then

View File

@ -1,7 +1,7 @@
{
"dependencies": {
"eslint": "^9.0.0",
"pyright": "^1.1.329"
"eslint": "^9.17.0",
"pyright": "^1.1.391"
},
"scripts": {
"clean": "rm -Rf node_modules package-lock.json"

View File

@ -2,24 +2,22 @@ mock==5.1.0
nose2[coverage_plugin]==0.15.1
cov-core==1.15.0
black==24.3.0
pylint==3.2.3
pylint==3.3.3
splinter==0.21.0
selenium==4.22.0
Pallets-Sphinx-Themes==2.1.3
Sphinx<=7.1.2; python_version == '3.8'
Sphinx==7.3.7; python_version > '3.8'
sphinx-issues==4.1.0
selenium==4.28.1
Pallets-Sphinx-Themes==2.3.0
Sphinx==7.4.7
sphinx-issues==5.0.0
sphinx-jinja==2.0.2
sphinx-tabs==3.4.5
sphinxcontrib-programoutput==0.17
sphinx-autobuild==2021.3.14
sphinx-notfound-page==1.0.2
sphinx-tabs==3.4.7
sphinxcontrib-programoutput==0.18
sphinx-autobuild==2024.10.3
sphinx-notfound-page==1.0.4
myst-parser==3.0.1
linuxdoc==20240509
linuxdoc==20240924
aiounittest==1.4.2
yamllint==1.35.1
wlc==1.14
wlc==1.15
coloredlogs==15.0.1
docutils<=0.21; python_version == '3.8'
docutils>=0.21.2; python_version > '3.8'
docutils>=0.21.2
parameterized==0.9.0

View File

@ -1,18 +1,21 @@
certifi==2024.6.2
babel==2.15.0
certifi==2024.12.14
babel==2.16.0
flask-babel==4.0.0
flask==3.0.3
jinja2==3.1.4
lxml==5.2.2
pygments==2.18.0
flask==3.1.0
jinja2==3.1.5
lxml==5.3.0
pygments==2.19.1
python-dateutil==2.9.0.post0
pyyaml==6.0.1
pyyaml==6.0.2
httpx[http2]==0.24.1
Brotli==1.1.0
uvloop==0.19.0
uvloop==0.21.0
httpx-socks[asyncio]==0.7.7
setproctitle==1.3.3
redis==5.0.7
setproctitle==1.3.4
redis==5.0.8
markdown-it-py==3.0.0
fasttext-predict==0.9.2.2
pytomlpp==1.0.13; python_version < '3.11'
fasttext-predict==0.9.2.4
tomli==2.0.2; python_version < '3.11'
msgspec==0.19.0
typer-slim==0.15.1
isodate==0.7.2

View File

@ -9,8 +9,7 @@ import logging
import searx.unixthreadname
import searx.settings_loader
from searx.settings_defaults import settings_set_defaults
from searx.settings_defaults import SCHEMA, apply_schema
# Debug
LOG_FORMAT_DEBUG = '%(levelname)-7s %(name)-30.30s: %(message)s'
@ -21,14 +20,52 @@ LOG_LEVEL_PROD = logging.WARNING
searx_dir = abspath(dirname(__file__))
searx_parent_dir = abspath(dirname(dirname(__file__)))
settings, settings_load_message = searx.settings_loader.load_settings()
if settings is not None:
settings = settings_set_defaults(settings)
settings = {}
searx_debug = False
logger = logging.getLogger('searx')
_unset = object()
def init_settings():
"""Initialize global ``settings`` and ``searx_debug`` variables and
``logger`` from ``SEARXNG_SETTINGS_PATH``.
"""
global settings, searx_debug # pylint: disable=global-variable-not-assigned
cfg, msg = searx.settings_loader.load_settings(load_user_settings=True)
cfg = cfg or {}
apply_schema(cfg, SCHEMA, [])
settings.clear()
settings.update(cfg)
searx_debug = settings['general']['debug']
if searx_debug:
_logging_config_debug()
else:
logging.basicConfig(level=LOG_LEVEL_PROD, format=LOG_FORMAT_PROD)
logging.root.setLevel(level=LOG_LEVEL_PROD)
logging.getLogger('werkzeug').setLevel(level=LOG_LEVEL_PROD)
logger.info(msg)
# log max_request_timeout
max_request_timeout = settings['outgoing']['max_request_timeout']
if max_request_timeout is None:
logger.info('max_request_timeout=%s', repr(max_request_timeout))
else:
logger.info('max_request_timeout=%i second(s)', max_request_timeout)
if settings['server']['public_instance']:
logger.warning(
"Be aware you have activated features intended only for public instances. "
"This force the usage of the limiter and link_token / "
"see https://docs.searxng.org/admin/searx.limiter.html"
)
def get_setting(name, default=_unset):
"""Returns the value to which ``name`` point. If there is no such name in the
settings and the ``default`` is unset, a :py:obj:`KeyError` is raised.
@ -50,20 +87,20 @@ def get_setting(name, default=_unset):
return value
def is_color_terminal():
def _is_color_terminal():
if os.getenv('TERM') in ('dumb', 'unknown'):
return False
return sys.stdout.isatty()
def logging_config_debug():
def _logging_config_debug():
try:
import coloredlogs # pylint: disable=import-outside-toplevel
except ImportError:
coloredlogs = None
log_level = os.environ.get('SEARXNG_DEBUG_LOG_LEVEL', 'DEBUG')
if coloredlogs and is_color_terminal():
if coloredlogs and _is_color_terminal():
level_styles = {
'spam': {'color': 'green', 'faint': True},
'debug': {},
@ -87,26 +124,4 @@ def logging_config_debug():
logging.basicConfig(level=logging.getLevelName(log_level), format=LOG_FORMAT_DEBUG)
searx_debug = settings['general']['debug']
if searx_debug:
logging_config_debug()
else:
logging.basicConfig(level=LOG_LEVEL_PROD, format=LOG_FORMAT_PROD)
logging.root.setLevel(level=LOG_LEVEL_PROD)
logging.getLogger('werkzeug').setLevel(level=LOG_LEVEL_PROD)
logger = logging.getLogger('searx')
logger.info(settings_load_message)
# log max_request_timeout
max_request_timeout = settings['outgoing']['max_request_timeout']
if max_request_timeout is None:
logger.info('max_request_timeout=%s', repr(max_request_timeout))
else:
logger.info('max_request_timeout=%i second(s)', max_request_timeout)
if settings['server']['public_instance']:
logger.warning(
"Be aware you have activated features intended only for public instances. "
"This force the usage of the limiter and link_token / "
"see https://docs.searxng.org/admin/searx.limiter.html"
)
init_settings()

View File

@ -1,51 +1,49 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
"""The *answerers* give instant answers related to the search query, they
usually provide answers of type :py:obj:`Answer <searx.result_types.Answer>`.
import sys
from os import listdir
from os.path import realpath, dirname, join, isdir
from collections import defaultdict
Here is an example of a very simple answerer that adds a "Hello" into the answer
area:
from searx.utils import load_module
.. code::
answerers_dir = dirname(realpath(__file__))
from flask_babel import gettext as _
from searx.answerers import Answerer
from searx.result_types import Answer
class MyAnswerer(Answerer):
keywords = [ "hello", "hello world" ]
def info(self):
return AnswererInfo(name=_("Hello"), description=_("lorem .."), keywords=self.keywords)
def answer(self, request, search):
return [ Answer(answer="Hello") ]
----
.. autoclass:: Answerer
:members:
.. autoclass:: AnswererInfo
:members:
.. autoclass:: AnswerStorage
:members:
.. autoclass:: searx.answerers._core.ModuleAnswerer
:members:
:show-inheritance:
"""
from __future__ import annotations
__all__ = ["AnswererInfo", "Answerer", "AnswerStorage"]
def load_answerers():
answerers = [] # pylint: disable=redefined-outer-name
from ._core import AnswererInfo, Answerer, AnswerStorage
for filename in listdir(answerers_dir):
if not isdir(join(answerers_dir, filename)) or filename.startswith('_'):
continue
module = load_module('answerer.py', join(answerers_dir, filename))
if not hasattr(module, 'keywords') or not isinstance(module.keywords, tuple) or not module.keywords:
sys.exit(2)
answerers.append(module)
return answerers
def get_answerers_by_keywords(answerers): # pylint:disable=redefined-outer-name
by_keyword = defaultdict(list)
for answerer in answerers:
for keyword in answerer.keywords:
for keyword in answerer.keywords:
by_keyword[keyword].append(answerer.answer)
return by_keyword
def ask(query):
results = []
query_parts = list(filter(None, query.query.split()))
if not query_parts or query_parts[0] not in answerers_by_keywords:
return results
for answerer in answerers_by_keywords[query_parts[0]]:
result = answerer(query)
if result:
results.append(result)
return results
answerers = load_answerers()
answerers_by_keywords = get_answerers_by_keywords(answerers)
STORAGE: AnswerStorage = AnswerStorage()
STORAGE.load_builtins()

169
searx/answerers/_core.py Normal file
View File

@ -0,0 +1,169 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=too-few-public-methods, missing-module-docstring
from __future__ import annotations
import abc
import importlib
import logging
import pathlib
import warnings
from dataclasses import dataclass
from searx.utils import load_module
from searx.result_types.answer import BaseAnswer
_default = pathlib.Path(__file__).parent
log: logging.Logger = logging.getLogger("searx.answerers")
@dataclass
class AnswererInfo:
"""Object that holds informations about an answerer, these infos are shown
to the user in the Preferences menu.
To be able to translate the information into other languages, the text must
be written in English and translated with :py:obj:`flask_babel.gettext`.
"""
name: str
"""Name of the *answerer*."""
description: str
"""Short description of the *answerer*."""
examples: list[str]
"""List of short examples of the usage / of query terms."""
keywords: list[str]
"""See :py:obj:`Answerer.keywords`"""
class Answerer(abc.ABC):
"""Abstract base class of answerers."""
keywords: list[str]
"""Keywords to which the answerer has *answers*."""
@abc.abstractmethod
def answer(self, query: str) -> list[BaseAnswer]:
"""Function that returns a list of answers to the question/query."""
@abc.abstractmethod
def info(self) -> AnswererInfo:
"""Informations about the *answerer*, see :py:obj:`AnswererInfo`."""
class ModuleAnswerer(Answerer):
"""A wrapper class for legacy *answerers* where the names (keywords, answer,
info) are implemented on the module level (not in a class).
.. note::
For internal use only!
"""
def __init__(self, mod):
for name in ["keywords", "self_info", "answer"]:
if not getattr(mod, name, None):
raise SystemExit(2)
if not isinstance(mod.keywords, tuple):
raise SystemExit(2)
self.module = mod
self.keywords = mod.keywords # type: ignore
def answer(self, query: str) -> list[BaseAnswer]:
return self.module.answer(query)
def info(self) -> AnswererInfo:
kwargs = self.module.self_info()
kwargs["keywords"] = self.keywords
return AnswererInfo(**kwargs)
class AnswerStorage(dict):
"""A storage for managing the *answerers* of SearXNG. With the
:py:obj:`AnswerStorage.ask` method, a caller can ask questions to all
*answerers* and receives a list of the results."""
answerer_list: set[Answerer]
"""The list of :py:obj:`Answerer` in this storage."""
def __init__(self):
super().__init__()
self.answerer_list = set()
def load_builtins(self):
"""Loads ``answerer.py`` modules from the python packages in
:origin:`searx/answerers`. The python modules are wrapped by
:py:obj:`ModuleAnswerer`."""
for f in _default.iterdir():
if f.name.startswith("_"):
continue
if f.is_file() and f.suffix == ".py":
self.register_by_fqn(f"searx.answerers.{f.stem}.SXNGAnswerer")
continue
# for backward compatibility (if a fork has additional answerers)
if f.is_dir() and (f / "answerer.py").exists():
warnings.warn(
f"answerer module {f} is deprecated / migrate to searx.answerers.Answerer", DeprecationWarning
)
mod = load_module("answerer.py", str(f))
self.register(ModuleAnswerer(mod))
def register_by_fqn(self, fqn: str):
"""Register a :py:obj:`Answerer` via its fully qualified class namen(FQN)."""
mod_name, _, obj_name = fqn.rpartition('.')
mod = importlib.import_module(mod_name)
code_obj = getattr(mod, obj_name, None)
if code_obj is None:
msg = f"answerer {fqn} is not implemented"
log.critical(msg)
raise ValueError(msg)
self.register(code_obj())
def register(self, answerer: Answerer):
"""Register a :py:obj:`Answerer`."""
self.answerer_list.add(answerer)
for _kw in answerer.keywords:
self[_kw] = self.get(_kw, [])
self[_kw].append(answerer)
def ask(self, query: str) -> list[BaseAnswer]:
"""An answerer is identified via keywords, if there is a keyword at the
first position in the ``query`` for which there is one or more
answerers, then these are called, whereby the entire ``query`` is passed
as argument to the answerer function."""
results = []
keyword = None
for keyword in query.split():
if keyword:
break
if not keyword or keyword not in self:
return results
for answerer in self[keyword]:
for answer in answerer.answer(query):
# In case of *answers* prefix ``answerer:`` is set, see searx.result_types.Result
answer.engine = f"answerer: {keyword}"
results.append(answer)
return results
@property
def info(self) -> list[AnswererInfo]:
return [a.info() for a in self.answerer_list]

80
searx/answerers/random.py Normal file
View File

@ -0,0 +1,80 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
from __future__ import annotations
import hashlib
import random
import string
import uuid
from flask_babel import gettext
from searx.result_types import Answer
from searx.result_types.answer import BaseAnswer
from . import Answerer, AnswererInfo
def random_characters():
random_string_letters = string.ascii_lowercase + string.digits + string.ascii_uppercase
return [random.choice(random_string_letters) for _ in range(random.randint(8, 32))]
def random_string():
return ''.join(random_characters())
def random_float():
return str(random.random())
def random_int():
random_int_max = 2**31
return str(random.randint(-random_int_max, random_int_max))
def random_sha256():
m = hashlib.sha256()
m.update(''.join(random_characters()).encode())
return str(m.hexdigest())
def random_uuid():
return str(uuid.uuid4())
def random_color():
color = "%06x" % random.randint(0, 0xFFFFFF)
return f"#{color.upper()}"
class SXNGAnswerer(Answerer):
"""Random value generator"""
keywords = ["random"]
random_types = {
"string": random_string,
"int": random_int,
"float": random_float,
"sha256": random_sha256,
"uuid": random_uuid,
"color": random_color,
}
def info(self):
return AnswererInfo(
name=gettext(self.__doc__),
description=gettext("Generate different random values"),
keywords=self.keywords,
examples=[f"random {x}" for x in self.random_types],
)
def answer(self, query: str) -> list[BaseAnswer]:
parts = query.split()
if len(parts) != 2 or parts[1] not in self.random_types:
return []
return [Answer(answer=self.random_types[parts[1]]())]

View File

@ -1,2 +0,0 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring

View File

@ -1,79 +0,0 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
import hashlib
import random
import string
import uuid
from flask_babel import gettext
# required answerer attribute
# specifies which search query keywords triggers this answerer
keywords = ('random',)
random_int_max = 2**31
random_string_letters = string.ascii_lowercase + string.digits + string.ascii_uppercase
def random_characters():
return [random.choice(random_string_letters) for _ in range(random.randint(8, 32))]
def random_string():
return ''.join(random_characters())
def random_float():
return str(random.random())
def random_int():
return str(random.randint(-random_int_max, random_int_max))
def random_sha256():
m = hashlib.sha256()
m.update(''.join(random_characters()).encode())
return str(m.hexdigest())
def random_uuid():
return str(uuid.uuid4())
def random_color():
color = "%06x" % random.randint(0, 0xFFFFFF)
return f"#{color.upper()}"
random_types = {
'string': random_string,
'int': random_int,
'float': random_float,
'sha256': random_sha256,
'uuid': random_uuid,
'color': random_color,
}
# required answerer function
# can return a list of results (any result type) for a given query
def answer(query):
parts = query.query.split()
if len(parts) != 2:
return []
if parts[1] not in random_types:
return []
return [{'answer': random_types[parts[1]]()}]
# required answerer function
# returns information about the answerer
def self_info():
return {
'name': gettext('Random value generator'),
'description': gettext('Generate different random values'),
'examples': ['random {}'.format(x) for x in random_types],
}

View File

@ -0,0 +1,64 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
from __future__ import annotations
from functools import reduce
from operator import mul
import babel
import babel.numbers
from flask_babel import gettext
from searx.extended_types import sxng_request
from searx.result_types import Answer
from searx.result_types.answer import BaseAnswer
from . import Answerer, AnswererInfo
kw2func = [
("min", min),
("max", max),
("avg", lambda args: sum(args) / len(args)),
("sum", sum),
("prod", lambda args: reduce(mul, args, 1)),
]
class SXNGAnswerer(Answerer):
"""Statistics functions"""
keywords = [kw for kw, _ in kw2func]
def info(self):
return AnswererInfo(
name=gettext(self.__doc__),
description=gettext("Compute {func} of the arguments".format(func='/'.join(self.keywords))),
keywords=self.keywords,
examples=["avg 123 548 2.04 24.2"],
)
def answer(self, query: str) -> list[BaseAnswer]:
results = []
parts = query.split()
if len(parts) < 2:
return results
ui_locale = babel.Locale.parse(sxng_request.preferences.get_value('locale'), sep='-')
try:
args = [babel.numbers.parse_decimal(num, ui_locale, numbering_system="latn") for num in parts[1:]]
except: # pylint: disable=bare-except
# seems one of the args is not a float type, can't be converted to float
return results
for k, func in kw2func:
if k == parts[0]:
res = func(args)
res = babel.numbers.format_decimal(res, locale=ui_locale)
f_str = ', '.join(babel.numbers.format_decimal(arg, locale=ui_locale) for arg in args)
results.append(Answer(answer=f"[{ui_locale}] {k}({f_str}) = {res} "))
break
return results

View File

@ -1,2 +0,0 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring

View File

@ -1,53 +0,0 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
from functools import reduce
from operator import mul
from flask_babel import gettext
keywords = ('min', 'max', 'avg', 'sum', 'prod')
# required answerer function
# can return a list of results (any result type) for a given query
def answer(query):
parts = query.query.split()
if len(parts) < 2:
return []
try:
args = list(map(float, parts[1:]))
except: # pylint: disable=bare-except
return []
func = parts[0]
_answer = None
if func == 'min':
_answer = min(args)
elif func == 'max':
_answer = max(args)
elif func == 'avg':
_answer = sum(args) / len(args)
elif func == 'sum':
_answer = sum(args)
elif func == 'prod':
_answer = reduce(mul, args, 1)
if _answer is None:
return []
return [{'answer': str(_answer)}]
# required answerer function
# returns information about the answerer
def self_info():
return {
'name': gettext('Statistics functions'),
'description': gettext('Compute {functions} of the arguments').format(functions='/'.join(keywords)),
'examples': ['avg 123 548 2.04 24.2'],
}

View File

@ -5,11 +5,14 @@
# pylint: disable=use-dict-literal
import json
import html
from urllib.parse import urlencode, quote_plus
import lxml
import lxml.etree
import lxml.html
from httpx import HTTPError
from searx.extended_types import SXNG_Response
from searx import settings
from searx.engines import (
engines,
@ -25,16 +28,31 @@ def update_kwargs(**kwargs):
kwargs['raise_for_httperror'] = True
def get(*args, **kwargs):
def get(*args, **kwargs) -> SXNG_Response:
update_kwargs(**kwargs)
return http_get(*args, **kwargs)
def post(*args, **kwargs):
def post(*args, **kwargs) -> SXNG_Response:
update_kwargs(**kwargs)
return http_post(*args, **kwargs)
def baidu(query, _lang):
# baidu search autocompleter
base_url = "https://www.baidu.com/sugrec?"
response = get(base_url + urlencode({'ie': 'utf-8', 'json': 1, 'prod': 'pc', 'wd': query}))
results = []
if response.ok:
data = response.json()
if 'g' in data:
for item in data['g']:
results.append(item['q'])
return results
def brave(query, _lang):
# brave search autocompleter
url = 'https://search.brave.com/api/suggest?'
@ -110,7 +128,7 @@ def google_complete(query, sxng_locale):
)
results = []
resp = get(url.format(subdomain=google_info['subdomain'], args=args))
if resp.ok:
if resp and resp.ok:
json_txt = resp.text[resp.text.find('[') : resp.text.find(']', -3) + 1]
data = json.loads(json_txt)
for item in data[0]:
@ -162,7 +180,7 @@ def stract(query, _lang):
if not resp.ok:
return []
return [suggestion['raw'] for suggestion in resp.json()]
return [html.unescape(suggestion['raw']) for suggestion in resp.json()]
def startpage(query, sxng_locale):
@ -204,7 +222,7 @@ def wikipedia(query, sxng_locale):
results = []
eng_traits = engines['wikipedia'].traits
wiki_lang = eng_traits.get_language(sxng_locale, 'en')
wiki_netloc = eng_traits.custom['wiki_netloc'].get(wiki_lang, 'en.wikipedia.org')
wiki_netloc = eng_traits.custom['wiki_netloc'].get(wiki_lang, 'en.wikipedia.org') # type: ignore
url = 'https://{wiki_netloc}/w/api.php?{args}'
args = urlencode(
@ -237,17 +255,18 @@ def yandex(query, _lang):
backends = {
'baidu': baidu,
'brave': brave,
'dbpedia': dbpedia,
'duckduckgo': duckduckgo,
'google': google_complete,
'mwmbl': mwmbl,
'qwant': qwant,
'seznam': seznam,
'startpage': startpage,
'stract': stract,
'swisscows': swisscows,
'qwant': qwant,
'wikipedia': wikipedia,
'brave': brave,
'yandex': yandex,
}

View File

@ -13,12 +13,14 @@ import flask
import werkzeug
from searx import logger
from searx.extended_types import SXNG_Request
from . import config
logger = logger.getChild('botdetection')
def dump_request(request: flask.Request):
def dump_request(request: SXNG_Request):
return (
request.path
+ " || X-Forwarded-For: %s" % request.headers.get('X-Forwarded-For')
@ -66,7 +68,7 @@ def _log_error_only_once(err_msg):
_logged_errors.append(err_msg)
def get_real_ip(request: flask.Request) -> str:
def get_real_ip(request: SXNG_Request) -> str:
"""Returns real IP of the request. Since not all proxies set all the HTTP
headers and incoming headers can be faked it may happen that the IP cannot
be determined correctly.

View File

@ -14,17 +14,7 @@ import typing
import logging
import pathlib
try:
import tomllib
pytomlpp = None
USE_TOMLLIB = True
except ImportError:
import pytomlpp
tomllib = None
USE_TOMLLIB = False
from ..compat import tomllib
__all__ = ['Config', 'UNSET', 'SchemaIssue']
@ -32,7 +22,7 @@ log = logging.getLogger(__name__)
class FALSE:
"""Class of ``False`` singelton"""
"""Class of ``False`` singleton"""
# pylint: disable=multiple-statements
def __init__(self, msg):
@ -91,7 +81,7 @@ class Config:
return cfg
def __init__(self, cfg_schema: typing.Dict, deprecated: typing.Dict[str, str]):
"""Construtor of class Config.
"""Constructor of class Config.
:param cfg_schema: Schema of the configuration
:param deprecated: dictionary that maps deprecated configuration names to a messages
@ -169,7 +159,7 @@ class Config:
return pathlib.Path(str(val))
def pyobj(self, name, default=UNSET):
"""Get python object refered by full qualiffied name (FQN) in the config
"""Get python object referred by full qualiffied name (FQN) in the config
string."""
fqn = self.get(name, default)
@ -183,19 +173,10 @@ class Config:
def toml_load(file_name):
if USE_TOMLLIB:
# Python >= 3.11
try:
with open(file_name, "rb") as f:
return tomllib.load(f)
except tomllib.TOMLDecodeError as exc:
msg = str(exc).replace('\t', '').replace('\n', ' ')
log.error("%s: %s", file_name, msg)
raise
# fallback to pytomlpp for Python < 3.11
try:
return pytomlpp.load(file_name)
except pytomlpp.DecodeError as exc:
with open(file_name, "rb") as f:
return tomllib.load(f)
except tomllib.TOMLDecodeError as exc:
msg = str(exc).replace('\t', '').replace('\n', ' ')
log.error("%s: %s", file_name, msg)
raise

View File

@ -12,7 +12,6 @@ Accept_ header ..
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept
"""
# pylint: disable=unused-argument
from __future__ import annotations
from ipaddress import (
@ -20,17 +19,18 @@ from ipaddress import (
IPv6Network,
)
import flask
import werkzeug
from searx.extended_types import SXNG_Request
from . import config
from ._helpers import too_many_requests
def filter_request(
network: IPv4Network | IPv6Network,
request: flask.Request,
cfg: config.Config,
request: SXNG_Request,
cfg: config.Config, # pylint: disable=unused-argument
) -> werkzeug.Response | None:
if 'text/html' not in request.accept_mimetypes:

View File

@ -13,7 +13,6 @@ bot if the Accept-Encoding_ header ..
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding
"""
# pylint: disable=unused-argument
from __future__ import annotations
from ipaddress import (
@ -21,17 +20,18 @@ from ipaddress import (
IPv6Network,
)
import flask
import werkzeug
from searx.extended_types import SXNG_Request
from . import config
from ._helpers import too_many_requests
def filter_request(
network: IPv4Network | IPv6Network,
request: flask.Request,
cfg: config.Config,
request: SXNG_Request,
cfg: config.Config, # pylint: disable=unused-argument
) -> werkzeug.Response | None:
accept_list = [l.strip() for l in request.headers.get('Accept-Encoding', '').split(',')]

View File

@ -10,24 +10,25 @@ if the Accept-Language_ header is unset.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
"""
# pylint: disable=unused-argument
from __future__ import annotations
from ipaddress import (
IPv4Network,
IPv6Network,
)
import flask
import werkzeug
from searx.extended_types import SXNG_Request
from . import config
from ._helpers import too_many_requests
def filter_request(
network: IPv4Network | IPv6Network,
request: flask.Request,
cfg: config.Config,
request: SXNG_Request,
cfg: config.Config, # pylint: disable=unused-argument
) -> werkzeug.Response | None:
if request.headers.get('Accept-Language', '').strip() == '':
return too_many_requests(network, "missing HTTP header Accept-Language")

View File

@ -10,7 +10,6 @@ the Connection_ header is set to ``close``.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Connection
"""
# pylint: disable=unused-argument
from __future__ import annotations
from ipaddress import (
@ -18,17 +17,18 @@ from ipaddress import (
IPv6Network,
)
import flask
import werkzeug
from searx.extended_types import SXNG_Request
from . import config
from ._helpers import too_many_requests
def filter_request(
network: IPv4Network | IPv6Network,
request: flask.Request,
cfg: config.Config,
request: SXNG_Request,
cfg: config.Config, # pylint: disable=unused-argument
) -> werkzeug.Response | None:
if request.headers.get('Connection', '').strip() == 'close':

View File

@ -11,7 +11,6 @@ the User-Agent_ header is unset or matches the regular expression
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
"""
# pylint: disable=unused-argument
from __future__ import annotations
import re
@ -20,9 +19,10 @@ from ipaddress import (
IPv6Network,
)
import flask
import werkzeug
from searx.extended_types import SXNG_Request
from . import config
from ._helpers import too_many_requests
@ -56,8 +56,8 @@ def regexp_user_agent():
def filter_request(
network: IPv4Network | IPv6Network,
request: flask.Request,
cfg: config.Config,
request: SXNG_Request,
cfg: config.Config, # pylint: disable=unused-argument
) -> werkzeug.Response | None:
user_agent = request.headers.get('User-Agent', 'unknown')

View File

@ -45,6 +45,7 @@ from ipaddress import (
import flask
import werkzeug
from searx.extended_types import SXNG_Request
from searx import redisdb
from searx.redislib import incr_sliding_window, drop_counter
@ -76,11 +77,11 @@ LONG_MAX = 150
LONG_MAX_SUSPICIOUS = 10
"""Maximum suspicious requests from one IP in the :py:obj:`LONG_WINDOW`"""
API_WONDOW = 3600
API_WINDOW = 3600
"""Time (sec) before sliding window for API requests (format != html) expires."""
API_MAX = 4
"""Maximum requests from one IP in the :py:obj:`API_WONDOW`"""
"""Maximum requests from one IP in the :py:obj:`API_WINDOW`"""
SUSPICIOUS_IP_WINDOW = 3600 * 24 * 30
"""Time (sec) before sliding window for one suspicious IP expires."""
@ -91,7 +92,7 @@ SUSPICIOUS_IP_MAX = 3
def filter_request(
network: IPv4Network | IPv6Network,
request: flask.Request,
request: SXNG_Request,
cfg: config.Config,
) -> werkzeug.Response | None:
@ -103,7 +104,7 @@ def filter_request(
return None
if request.args.get('format', 'html') != 'html':
c = incr_sliding_window(redis_client, 'ip_limit.API_WONDOW:' + network.compressed, API_WONDOW)
c = incr_sliding_window(redis_client, 'ip_limit.API_WINDOW:' + network.compressed, API_WINDOW)
if c > API_MAX:
return too_many_requests(network, "too many request in API_WINDOW")

View File

@ -28,7 +28,7 @@ And in the HTML template from flask a stylesheet link is needed (the value of
<link rel="stylesheet"
href="{{ url_for('client_token', token=link_token) }}"
type="text/css" />
type="text/css" >
.. _X-Forwarded-For:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
@ -43,11 +43,11 @@ from ipaddress import (
import string
import random
import flask
from searx import logger
from searx import redisdb
from searx.redislib import secret_hash
from searx.extended_types import SXNG_Request
from ._helpers import (
get_network,
@ -55,10 +55,10 @@ from ._helpers import (
)
TOKEN_LIVE_TIME = 600
"""Livetime (sec) of limiter's CSS token."""
"""Lifetime (sec) of limiter's CSS token."""
PING_LIVE_TIME = 3600
"""Livetime (sec) of the ping-key from a client (request)"""
"""Lifetime (sec) of the ping-key from a client (request)"""
PING_KEY = 'SearXNG_limiter.ping'
"""Prefix of all ping-keys generated by :py:obj:`get_ping_key`"""
@ -69,7 +69,7 @@ TOKEN_KEY = 'SearXNG_limiter.token'
logger = logger.getChild('botdetection.link_token')
def is_suspicious(network: IPv4Network | IPv6Network, request: flask.Request, renew: bool = False):
def is_suspicious(network: IPv4Network | IPv6Network, request: SXNG_Request, renew: bool = False):
"""Checks whether a valid ping is exists for this (client) network, if not
this request is rated as *suspicious*. If a valid ping exists and argument
``renew`` is ``True`` the expire time of this ping is reset to
@ -92,7 +92,7 @@ def is_suspicious(network: IPv4Network | IPv6Network, request: flask.Request, re
return False
def ping(request: flask.Request, token: str):
def ping(request: SXNG_Request, token: str):
"""This function is called by a request to URL ``/client<token>.css``. If
``token`` is valid a :py:obj:`PING_KEY` for the client is stored in the DB.
The expire time of this ping-key is :py:obj:`PING_LIVE_TIME`.
@ -113,7 +113,7 @@ def ping(request: flask.Request, token: str):
redis_client.set(ping_key, 1, ex=PING_LIVE_TIME)
def get_ping_key(network: IPv4Network | IPv6Network, request: flask.Request) -> str:
def get_ping_key(network: IPv4Network | IPv6Network, request: SXNG_Request) -> str:
"""Generates a hashed key that fits (more or less) to a *WEB-browser
session* in a network."""
return (

18
searx/compat.py Normal file
View File

@ -0,0 +1,18 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Compatibility with older versions"""
# pylint: disable=unused-import
__all__ = [
"tomllib",
]
import sys
# TOML (lib) compatibility
# ------------------------
if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,7 @@
"fi": "Suomi (Finnish)",
"fil": "Filipino",
"fr": "Français (French)",
"ga": "Gaeilge (Irish)",
"gl": "Galego (Galician)",
"he": "עברית (Hebrew)",
"hr": "Hrvatski (Croatian)",
@ -55,6 +56,7 @@
"te": "తెలుగు (Telugu)",
"th": "ไทย (Thai)",
"tr": "Türkçe (Turkish)",
"tt": "Татар (Tatar)",
"uk": "Українська (Ukrainian)",
"vi": "Tiếng việt (Vietnamese)",
"zh-HK": "中文, 中國香港特別行政區 (Chinese, Hong Kong SAR China)",

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
],
"ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}",
"versions": [
"126.0",
"125.0"
"134.0",
"133.0"
]
}

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More