Compare commits

..

655 Commits

Author SHA1 Message Date
Markus Heiser 07fff4e195
Merge 08ef986e58 into b07c0ae39f 2024-11-01 12:43:29 +00:00
Markus Heiser 08ef986e58 [POC] limiter: change PING of link_token mehtod from CSS to <img>
while PR #2357 [1] was being implemented the question came up:

    would be better to change the PING resource from CSS to an image so that
    some terminal based browser may still able to pass the test [1]

This patch implements a POC in where a <img src=token> tag is loaded instaed a
CSS.

To test this patch activate limiter and link_token method [3] and start a
developer instance::

    make run

In your terminal browser open http://127.0.0.1:8888/search?q=foo

If the browser is suitable for the link_token method, it loads the image and the
following messages appear::

    DEBUG   searx.botdetection.limiter    : OK 127.0.0.1/32: /clientft61aak7fzyu6o6v.svg ...
    DEBUG   searx.botdetection.link_token : token is valid --> True
    DEBUG   searx.botdetection.link_token : store ping_key for (client) network 127.0.0.1/32 (IP 127.0.0.1) -> SearXNG_limiter.ping[...]

Browsers that do not load images will be blocked: If you try by example::

    lynx http://127.0.0.1:8888/search?q=foo

you will see a WARNING message like::

    WARNING searx.botdetection.link_token : missing ping (IP: 127.0.0.1/32) / request: SearXNG_limiter.ping[...]

Modern terminal WEB browser do support `<img>` tag as well as CSS:

    browsh http://127.0.0.1:8888/search?q=foo

----

[1] 80aaef6c95
[2] https://github.com/searxng/searxng/pull/2357#issuecomment-1574898834
[3] activate limiter and link_token method

```diff
diff --git a/searx/botdetection/limiter.toml b/searx/botdetection/limiter.toml
index 71a231e8f..7e1dba755 100644
--- a/searx/botdetection/limiter.toml
+++ b/searx/botdetection/limiter.toml
@@ -17,6 +17,6 @@ ipv6_prefix = 48
 filter_link_local = false

 # acrivate link_token method in the ip_limit method
-link_token = false
+link_token = true

diff --git a/searx/settings.yml b/searx/settings.yml
index a82a3432d..e7b983afc 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -73,7 +73,7 @@ server:
   # public URL of the instance, to ensure correct inbound links. Is overwritten
   # by ${SEARXNG_URL}.
   base_url: false  # "http://example.com/location"
-  limiter: false  # rate limit the number of request on the instance, block some bots
+  limiter: true  # rate limit the number of request on the instance, block some bots

   # If your instance owns a /etc/searxng/settings.yml file, then set the following
   # values there.
```

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-01 13:39:35 +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
searxng-bot 46b9273352 [l10n] update translations from Weblate
4fc3ba360 - 2024-06-27 - Kita Ikuyo <searinminecraft@courvix.com>
15a6fae2f - 2024-06-26 - artnay <artnay@users.noreply.translate.codeberg.org>
2cb08843e - 2024-06-27 - MonsoonRain <MonsoonRain@users.noreply.translate.codeberg.org>
794c9db02 - 2024-06-25 - return42 <return42@users.noreply.translate.codeberg.org>
8edf87498 - 2024-06-25 - Linerly <Linerly@users.noreply.translate.codeberg.org>
bc97997b5 - 2024-06-26 - LIGMATV <LIGMATV@users.noreply.translate.codeberg.org>
d8620edb1 - 2024-06-24 - ahmetax <ahmetax@users.noreply.translate.codeberg.org>
7d8d6580e - 2024-06-25 - gvlx <gvlx@users.noreply.translate.codeberg.org>
57f8e9bde - 2024-06-25 - return42 <return42@users.noreply.translate.codeberg.org>
7364acbe4 - 2024-06-25 - eddywidjaja <eddywidjaja@users.noreply.translate.codeberg.org>
9f6ddc2b5 - 2024-06-24 - return42 <return42@users.noreply.translate.codeberg.org>
a64f2e708 - 2024-06-21 - PeterDaveHello <PeterDaveHello@users.noreply.translate.codeberg.org>
cc195d7ad - 2024-06-21 - nish_j <nish_j@users.noreply.translate.codeberg.org>
87d2e16d5 - 2024-06-22 - tentsbet <tentsbet@users.noreply.translate.codeberg.org>
2c73400eb - 2024-06-22 - return42 <return42@users.noreply.translate.codeberg.org>
a467cf8af - 2024-06-21 - Fjuro <fjuro@alius.cz>
2024-06-28 09:46:44 +02:00
dependabot[bot] 6801f1a6cb [upd] pypi: Bump redis from 5.0.6 to 5.0.7
Bumps [redis](https://github.com/redis/redis-py) from 5.0.6 to 5.0.7.
- [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.6...v5.0.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-28 09:46:20 +02:00
Markus Heiser d80fcbc635 [fix] unit test_xpath.py: name 'logger' is not defined
Depending on the order in which the unit tests are executed, the python modules
of the engines are initialized (monkey patched) or not. As the order of the
tests is not static, random errors may occur.

To avaoid random `NameError: name 'logger' is not defined` in the unit tests of
the xpath engine, a logger is monkey patched into the xpath py-module.

```
make test.unit
TEST      tests/unit
......EE...................
======================================================================
ERROR: test_response (tests.unit.engines.test_xpath.TestXpathEngine.test_response)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/unit/engines/test_xpath.py", line 60, in test_response
    self.assertEqual(xpath.response(response), [])
                     ^^^^^^^^^^^^^^^^^^^^^^^^
  File "./searx/engines/xpath.py", line 309, in response
    logger.debug("found %s results", len(results))
    ^^^^^^
NameError: name 'logger' is not defined

======================================================================
ERROR: test_response_results_xpath (tests.unit.engines.test_xpath.TestXpathEngine.test_response_results_xpath)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/unit/engines/test_xpath.py", line 102, in test_response_results_xpath
    self.assertEqual(xpath.response(response), [])
                     ^^^^^^^^^^^^^^^^^^^^^^^^
  File "./searx/engines/xpath.py", line 309, in response
    logger.debug("found %s results", len(results))
    ^^^^^^
NameError: name 'logger' is not defined
```

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-28 08:54:19 +02:00
Markus Heiser a5f8e0899c [fix] disable Reddit engine by default
Reddit is enabled by default .. many bot request will go through Reddit .. we
should disable Reddit by default to cool down the IP [1].

[1] https://github.com/searxng/searxng/issues/3444#issuecomment-2180415057

Closes: https://github.com/searxng/searxng/issues/3444
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-28 08:48:52 +02:00
Christian Clauss 837f3bcd10 GitHub Actions: Upgrade data-update.yml infrastructure 2024-06-25 15:26:05 +02:00
Markus Heiser 1449824165 [data] update searx.data - update_engine_traits.py
$ make data.traits

Last GH action has been failed [1], the bugfixes from

- https://github.com/searxng/searxng/pull/3611
- https://github.com/searxng/searxng/pull/3612

were necessary to update the data.

[1] https://github.com/searxng/searxng/actions/runs/9278028691/job/25528337485

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-25 15:20:51 +02:00
Markus Heiser 0f9926b89a [fix] brave fetch_traits: layout of the settings page has changed
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-25 15:08:18 +02:00
Markus Heiser 39ffec87b7 [fix] engine zlibrary: handle seized domain
The domains of zlibrary instances are known to be seized from time to time.
This leads to problems when, for example, the automated tasks try to update the
engine traits (aka fetch_traits). The search function should also generate a
suitable error message (currently either SSL errors or empty result lists are
returned). [1]

[1] https://github.com/searxng/searxng/issues/3610
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-25 14:40:19 +02:00
Markus Heiser b8fa4d6195 [fix] bing news results return invalid images
Closes: https://github.com/searxng/searxng/issues/3502
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-25 11:12:41 +02:00
Grant Lanham 9a9ca307fe [fix] implement tests and remove usage of gen_useragent in engines 2024-06-23 11:51:41 +02:00
Richard Lyons 1f908a6222 [fix] engine unit tests.
Enables unit tests in the engines directory by adding __init__.py, and fixups
for the enabled tests.
2024-06-23 09:24:05 +02:00
dependabot[bot] f6f622f7e5 [upd] pypi: Bump selenium from 4.21.0 to 4.22.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.21.0 to 4.22.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.21.0...selenium-4.22.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-06-21 12:28:32 +02:00
searxng-bot 7f72c48b59 [l10n] update translations from Weblate
3e3c194e8 - 2024-06-20 - Vulcain <Vulcain@users.noreply.translate.codeberg.org>
0ffab2bcb - 2024-06-19 - LunarCat93 <LunarCat93@users.noreply.translate.codeberg.org>
36809a19a - 2024-06-19 - return42 <return42@users.noreply.translate.codeberg.org>
a97aff39a - 2024-06-19 - MonsoonRain <MonsoonRain@users.noreply.translate.codeberg.org>
5d7cbca43 - 2024-06-17 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
ada44ff85 - 2024-06-17 - Xvnov <Xvnov@users.noreply.translate.codeberg.org>
2f398eb58 - 2024-06-18 - tiziodcaio <tiziodcaio@users.noreply.translate.codeberg.org>
11fde5415 - 2024-06-18 - ghose <ghose@users.noreply.translate.codeberg.org>
7de1d0c22 - 2024-06-18 - return42 <return42@users.noreply.translate.codeberg.org>
eeb9500b8 - 2024-06-18 - return42 <return42@users.noreply.translate.codeberg.org>
2024-06-21 12:16:35 +02:00
Richard Lyons f195d98bfb Fix search_url building. 2024-06-20 06:30:00 +02:00
Markus Heiser acf3f109b2 [doc] hostname plugin: improve online documentation
The data types (list & map) should be made clearer, as these sometimes lead to
misunderstandings.

[1] https://github.com/searxng/searxng/issues/3558#issuecomment-2175058128

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-18 12:06:06 +02:00
Sandro Jäckel accc1c1032 [fix] setup.py - packaging for 'answerers' to build a valid package
Fix installing answerers when installing SearXNG through a wheel [1].  These
files have been missed in commit d72fa99b.

Here is what have been tested:

    $ make clean py.build
    ...
    $ python -m venv test123
    $ . ./test123/bin/activate
    (test123) $ pip install dist/searxng-2024*-py3-none-any.whl
    (test123) $ SEARXNG_DEBUG=1 searxng-run

[1] https://github.com/searxng/searxng/pull/3045#issuecomment-1961767861
2024-06-17 15:07:07 +02:00
Jeff Alyanak efd69c4ca9 [feat] plugin Self Information: improve keyword matching
This change does the following things:

- the `ip` keyword is now case-insensitive
- if the query includes `my ip` it will now also match

In order to avoid too many false matches, the `ip` keyword alone matches only if
it's the _only_ word, but the inclusion of `my` loosens that to be inclusive of
users type a phrase (eg, "what is my ip", "tell me my ip", "my IP address",
etc).

Better answer context

Previously this plugin simply dumped your IP or user-agent string as an answer.
This tiny change just adds some text to contextualize those answers (eg, "Your
IP is: 1.2.3.4" instead of just "1.2.3.4").
2024-06-17 14:12:37 +02:00
Allen 13eec44b65 [fix] \!goi irrelevant results AND display more results 2024-06-16 16:45:03 +02:00
Bnyro e9f8412a6e [perf] torrents.html, files.html: don't parse and re-format filesize 2024-06-15 15:42:29 +02:00
dependabot[bot] 16ce5612dd [upd] pypi: Bump redis from 5.0.5 to 5.0.6
Bumps [redis](https://github.com/redis/redis-py) from 5.0.5 to 5.0.6.
- [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.5...v5.0.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-15 11:36:57 +02:00
Bnyro df15c21b35 [feat] mozhi: fix crash, support synonyms and definition 2024-06-15 11:33:09 +02:00
Bnyro 1fe13d0ba4 [refactor] duckduckgo: use extr helper function in get_vqd 2024-06-15 11:24:05 +02:00
holysoles 7be468d213 [feat] docker: add env vars for common public instance settings 2024-06-14 14:58:02 +02:00
searxng-bot 63b7d558b6 [l10n] update translations from Weblate
351fcdf8d - 2024-06-14 - return42 <return42@users.noreply.translate.codeberg.org>
4ab6400d8 - 2024-06-13 - Xvnov <Xvnov@users.noreply.translate.codeberg.org>
8f1bb9a0c - 2024-06-14 - return42 <return42@users.noreply.translate.codeberg.org>
fa147559d - 2024-06-12 - MVDW-Java <MVDW-Java@users.noreply.translate.codeberg.org>
3beab11c3 - 2024-06-11 - return42 <return42@users.noreply.translate.codeberg.org>
52f450636 - 2024-06-11 - mukmckenzie <mukmckenzie@users.noreply.translate.codeberg.org>
c61f2cb8b - 2024-06-11 - tentsbet <tentsbet@users.noreply.translate.codeberg.org>
7c74be3d3 - 2024-06-10 - nebras <nebras@users.noreply.translate.codeberg.org>
b5aace1de - 2024-06-07 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
fc187ae6e - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
cf3a8d3f5 - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
bfc316b9d - 2024-06-07 - diodio <diodio@users.noreply.translate.codeberg.org>
a27e1586d - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
6bd0bf14d - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
9b2b3aa36 - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
41716759a - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
08c9fef67 - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
dd2555fe2 - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
e69dc5dc6 - 2024-06-07 - ganoci <ganoci@users.noreply.translate.codeberg.org>
a3503130d - 2024-06-08 - ghose <ghose@users.noreply.translate.codeberg.org>
a2a2f0725 - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
35b9d1be7 - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
d53560df2 - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
58c3c041f - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
d7847aa9d - 2024-06-07 - EifionLlwyd <EifionLlwyd@users.noreply.translate.codeberg.org>
3a114bf44 - 2024-06-07 - Fjuro <fjuro@alius.cz>
1f2fc0ff2 - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
17a78625f - 2024-06-07 - return42 <return42@users.noreply.translate.codeberg.org>
6e8bdfd99 - 2024-06-07 - diodio <diodio@users.noreply.translate.codeberg.org>
2024-06-14 09:27:29 +02:00
Ember cb945276b6 Change 'his/her' to 'them' 2024-06-13 10:23:01 +02:00
Bnyro f5eb56b63f [refactor] hostnames plugin: add fallback for old hostname_replace plugin
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-07 14:42:52 +02:00
Markus Heiser 845a0b678d [doc] add 'hostnames' plugin to the online documentation
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-07 14:42:52 +02:00
Bnyro aa59bfbf60 [feat] hostname replace plugin: support for external list file 2024-06-07 14:42:52 +02:00
Bnyro 3bec04079c [feat] hostname replace plugin: possibility to prioritize certain websites
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-07 14:42:52 +02:00
dependabot[bot] d4c3d30995 [upd] pypi: Bump nose2[coverage_plugin] from 0.14.2 to 0.15.1
Bumps [nose2[coverage_plugin]](https://github.com/nose-devs/nose2) from 0.14.2 to 0.15.1.
- [Changelog](https://github.com/nose-devs/nose2/blob/main/docs/changelog.rst)
- [Commits](https://github.com/nose-devs/nose2/compare/0.14.2...0.15.1)

---
updated-dependencies:
- dependency-name: nose2[coverage_plugin]
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-07 11:32:36 +02:00
Bnyro 46c5309888 [feat] mojeek: implement dedicated module 2024-06-07 11:31:05 +02:00
Markus Heiser 32a2175f38 [feat] add engines for discourse forums (python, caddy, pi-hole)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-07 10:16:09 +02:00
allendema_searxng_pi ee146dbc07 [enh] Add engine for discourse forums 2024-06-07 10:16:09 +02:00
searxng-bot 91882aedf1 [l10n] update translations from Weblate
00cfc653d - 2024-06-06 - ghose <ghose@users.noreply.translate.codeberg.org>
a89cbc458 - 2024-06-06 - artnay <artnay@users.noreply.translate.codeberg.org>
b58008c90 - 2024-06-06 - EifionLlwyd <EifionLlwyd@users.noreply.translate.codeberg.org>
2c92cadcb - 2024-06-05 - ghose <ghose@users.noreply.translate.codeberg.org>
2d159a175 - 2024-06-02 - sygmamess <sygmamess@users.noreply.translate.codeberg.org>
a9ab96e6e - 2024-06-01 - chjtxwd <chjtxwd@users.noreply.translate.codeberg.org>
2488cff09 - 2024-06-01 - return42 <return42@users.noreply.translate.codeberg.org>
22626a0f2 - 2024-06-01 - return42 <return42@users.noreply.translate.codeberg.org>
2024-06-07 10:14:03 +02:00
dependabot[bot] cbd8ecdaad [upd] pypi: Bump redis from 5.0.4 to 5.0.5
Bumps [redis](https://github.com/redis/redis-py) from 5.0.4 to 5.0.5.
- [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.4...v5.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-07 10:13:38 +02:00
dependabot[bot] 312c922ce1 [upd] pypi: Bump certifi from 2024.2.2 to 2024.6.2
Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.2.2 to 2024.6.2.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.02.02...2024.06.02)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-07 10:12:40 +02:00
dependabot[bot] 4f119936cb [upd] pypi: Bump pylint from 3.2.2 to 3.2.3
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.2.2...v3.2.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-06-07 10:11:51 +02:00
searxng-bot 18fb701be2 [l10n] update translations from Weblate
61aa303a4 - 2024-05-28 - return42 <return42@users.noreply.translate.codeberg.org>
170248b24 - 2024-05-28 - morenewsavailable <morenewsavailable@users.noreply.translate.codeberg.org>
7c2fee870 - 2024-05-28 - return42 <return42@users.noreply.translate.codeberg.org>
5b4a84c9c - 2024-05-28 - return42 <return42@users.noreply.translate.codeberg.org>
dd076ef55 - 2024-05-28 - return42 <return42@users.noreply.translate.codeberg.org>
3d1c529d7 - 2024-05-28 - ghose <ghose@users.noreply.translate.codeberg.org>
c48bd4b50 - 2024-05-26 - wintryexit <weatherdowner@proton.me>
f8cd9e63d - 2024-05-25 - unoyoa <unoyoa@users.noreply.translate.codeberg.org>
211935324 - 2024-05-25 - Linerly <Linerly@users.noreply.translate.codeberg.org>
e3cdb5196 - 2024-05-24 - return42 <return42@users.noreply.translate.codeberg.org>
bba8b66d1 - 2024-05-25 - return42 <return42@users.noreply.translate.codeberg.org>
538af5393 - 2024-05-24 - yannickmaes <yannickmaes@users.noreply.translate.codeberg.org>
e9c4b55ae - 2024-05-25 - return42 <return42@users.noreply.translate.codeberg.org>
ea54474ea - 2024-05-24 - lloydsmart <lloydsmart@users.noreply.translate.codeberg.org>
f870f76af - 2024-05-25 - MusfiquerRhman <MusfiquerRhman@users.noreply.translate.codeberg.org>
b4a320991 - 2024-05-24 - krlsk <krlsk@users.noreply.translate.codeberg.org>
2024-05-31 11:16:35 +02:00
Markus Heiser 5fc93b6c34 [fix] comment in settings.yml 'Calculator plugin' --> 'Basic Calculator'
Reported by @GitTimeraider in [1]

[1] https://github.com/searxng/searxng/discussions/3529#discussioncomment-9605018
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-30 14:34:25 +02:00
Allen 0fa81fc782 [enh] add re-usable func to filter text 2024-05-29 17:56:17 +02:00
Jeff Alyanak 0fb3f0e4ae [fix] do not show DDG IP from zero click
The zero click result from DuckDuckGo for IP should not be displayed.  It will
return the IP of the searxng server, not the user's IP, and looks a bit strange
when the `self_info` plugin is enabled as two different IPs get returned.
2024-05-29 11:23:26 +02:00
Markus Heiser bb7c5bd44c [data] update searx.data - update_engine_traits.py
$ make data.traits

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-29 07:52:18 +02:00
Markus Heiser a20dfbbcbd [fix] engine startpage: fetch_traits() / if lang name unknown by babel
Workflow "Update data - update_engine_traits.py" fails last night [1].
This issue has already been reported by @allendema [2].

[1] https://github.com/searxng/searxng/actions/runs/9278028691/job/25528337485#step:6:168
[2] https://github.com/searxng/searxng/pull/3504/files#r1613559565

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-29 07:52:18 +02:00
return42 8713aa6c4b [data] update searx.data - update_wikidata_units.py 2024-05-29 06:54:24 +02:00
return42 c16a143239 [data] update searx.data - update_currencies.py 2024-05-29 06:53:45 +02:00
return42 8a78d7b64d [data] update searx.data - update_firefox_version.py 2024-05-29 06:53:14 +02:00
return42 f2763e5efc [data] update searx.data - update_ahmia_blacklist.py 2024-05-29 06:52:39 +02:00
return42 8250773ace [data] update searx.data - update_engine_descriptions.py 2024-05-29 06:52:17 +02:00
Austin-Olacsi 9bb75a6644 [feat] engine: implementation of findthatmeme 2024-05-28 18:18:13 +02:00
dependabot[bot] e992e888a0 [upd] pypi: Bump pylint from 3.1.0 to 3.2.2
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.1.0 to 3.2.2.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.1.0...v3.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 18:10:04 +02:00
Markus Heiser c19bffde4d [fix] issues reported by pylint-3.2.2
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-28 18:10:04 +02:00
dependabot[bot] e03c7e4dcd [upd] pypi: Bump sphinx-notfound-page from 1.0.0 to 1.0.2
Bumps [sphinx-notfound-page](https://github.com/readthedocs/sphinx-notfound-page) from 1.0.0 to 1.0.2.
- [Changelog](https://github.com/readthedocs/sphinx-notfound-page/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/readthedocs/sphinx-notfound-page/compare/1.0.0...1.0.2)

---
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-05-28 18:01:21 +02:00
Markus Heiser 056968cc39 [fix] unit converter operating backwards (from_si <-> to_si)
The factors for from_si and to_si were reversed.

Closes: https://github.com/searxng/searxng/issues/3497
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-28 11:58:13 +02:00
dependabot[bot] 99d6f51626 [upd] pypi: Bump lxml from 5.2.1 to 5.2.2
Bumps [lxml](https://github.com/lxml/lxml) from 5.2.1 to 5.2.2.
- [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.1...lxml-5.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 11:57:45 +02:00
Daniel Kukula 87165ac532 [mod] engine hex: add sort_criteria & page_size to configuration 2024-05-28 11:55:59 +02:00
Alexandre Flament 75e4b65127 [fix] ResultContainer: use self._lock and self._closed for all properties
Close #3474
2024-05-24 15:38:03 +02:00
allendema_searxng_pi 68365c8c1d [enh] add instant answers from ddg 2024-05-24 10:44:17 +02:00
searxng-bot 6c74bc8908 [l10n] update translations from Weblate
775bb0f22 - 2024-05-23 - lolmeOzzi <lolmeOzzi@users.noreply.translate.codeberg.org>
ccf70529b - 2024-05-23 - cynedex <cynedex@users.noreply.translate.codeberg.org>
4a3b70d10 - 2024-05-23 - Obligate <Obligate@users.noreply.translate.codeberg.org>
4e3be8012 - 2024-05-22 - ecevinoth <ecevinoth@users.noreply.translate.codeberg.org>
5fcd0b233 - 2024-05-21 - SilentWord <SilentWord@users.noreply.translate.codeberg.org>
3b73c20da - 2024-05-21 - SilentWord <SilentWord@users.noreply.translate.codeberg.org>
a579173a1 - 2024-05-21 - bukutulis <bukutulis@users.noreply.translate.codeberg.org>
0b91ff3ad - 2024-05-20 - Kran21 <Kran21@users.noreply.translate.codeberg.org>
bc3096ae1 - 2024-05-17 - lcaopcn <lcaopcn@users.noreply.translate.codeberg.org>
2024-05-24 10:28:48 +02:00
dependabot[bot] ec41b53587 [upd] pypi: Bump selenium from 4.20.0 to 4.21.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.20.0 to 4.21.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.20.0...selenium-4.21.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-05-17 16:52:09 +02:00
Daniel Kukula a49232ee29 [feat] engine: implementation of cargo search (crates.io) 2024-05-17 16:37:39 +02:00
searxng-bot 3585d71f99 [l10n] update translations from Weblate
0712f8fb7 - 2024-05-16 - 0ko <0ko@users.noreply.translate.codeberg.org>
9a9d04302 - 2024-05-16 - eaglclaws <eaglclaws@users.noreply.translate.codeberg.org>
4c6da9e2a - 2024-05-16 - Utsushime <Utsushime@users.noreply.translate.codeberg.org>
e0b941276 - 2024-05-14 - dkuku <dkuku@users.noreply.translate.codeberg.org>
bee37a08a - 2024-05-14 - sacred-serpent <sacred-serpent@users.noreply.translate.codeberg.org>
d29eca2ba - 2024-05-14 - return42 <return42@users.noreply.translate.codeberg.org>
719ed9054 - 2024-05-14 - gallegonovato <gallegonovato@users.noreply.translate.codeberg.org>
b57b75920 - 2024-05-10 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
ecf4ce2dc - 2024-05-10 - Pyrbor <Pyrbor@users.noreply.translate.codeberg.org>
2024-05-17 09:16:38 +02:00
Markus Heiser 2f2d93b292 [build] /static 2024-05-16 07:30:38 +02:00
Markus Heiser 916739d6b4 [mod] simple theme: drop img_src from default results
The use of img_src AND thumbnail in the default results makes no sense (only a
thumbnail is needed).  In the current state this is rather confusing, because
img_src is displayed like a thumbnail (small) and thumbnail is displayed like an
image (large).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-16 07:30:38 +02:00
Bnyro 0f2f52f0b5 [fix] google: don't display that keyword is missing in content field 2024-05-15 16:03:35 +02:00
Markus Heiser 949a73103f [mod] hex engine: normalize (some of) the linked terms
The names of the links are rather tags than real names, and they sometimes vary
greatly in their spelling:

- GitHub: github, Github
- Source code: Repository, SCM, Project Source Code
- Documentation: docs, Documentation

It was standardized to terms such as 'Source code' and 'Documentation', as
translations already exist for these terms.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-15 12:50:35 +02:00
Daniel Kukula cc8b537e34 [mod] package.html template: additional links (a python dict)
- Closes: https://github.com/searxng/searxng/issues/3456
2024-05-15 12:50:35 +02:00
Bnyro 645a840d82 [refactor] codeberg: use gitea engine 2024-05-15 07:23:57 +02:00
Bnyro 82b6c0d05f [feat] engine: implementation of gitea 2024-05-15 07:23:57 +02:00
Bnyro 60a373ad89 [fix] chefkoch: use German words in content field 2024-05-12 18:36:49 +02:00
Markus Heiser ffb1001f80 [fix] engine wikidata - WIKIDATA_UNITS has been changed in #3378
This patch is a leftover from [1] in which the WIKIDATA_UNITS values has become
a dictionary.

[1] https://github.com/searxng/searxng/pull/3378

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-10 16:04:27 +02:00
Markus Heiser 901819359c [update] make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-10 10:00:31 +02:00
dependabot[bot] 4c63846c8d [upd] pypi: Bump pygments from 2.17.2 to 2.18.0
Bumps [pygments](https://github.com/pygments/pygments) from 2.17.2 to 2.18.0.
- [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.17.2...2.18.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-10 10:00:31 +02:00
dependabot[bot] a615df8acc [upd] pypi: Bump nose2[coverage_plugin] from 0.14.1 to 0.14.2
Bumps [nose2[coverage_plugin]](https://github.com/nose-devs/nose2) from 0.14.1 to 0.14.2.
- [Changelog](https://github.com/nose-devs/nose2/blob/main/docs/changelog.rst)
- [Commits](https://github.com/nose-devs/nose2/compare/0.14.1...0.14.2)

---
updated-dependencies:
- dependency-name: nose2[coverage_plugin]
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-10 09:59:44 +02:00
dependabot[bot] a8d5126c56 [upd] pypi: Bump babel from 2.14.0 to 2.15.0
Bumps [babel](https://github.com/python-babel/babel) from 2.14.0 to 2.15.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.14.0...v2.15.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-05-10 09:58:12 +02:00
searxng-bot 4b6eebd312 [l10n] update translations from Weblate
9487de41b - 2024-05-10 - return42 <return42@users.noreply.translate.codeberg.org>
20d3b1158 - 2024-05-10 - nouoneq <nouoneq@users.noreply.translate.codeberg.org>
60cf6e36d - 2024-05-10 - return42 <return42@users.noreply.translate.codeberg.org>
0a8e99dff - 2024-05-10 - return42 <return42@users.noreply.translate.codeberg.org>
4055cd1c3 - 2024-05-10 - return42 <return42@users.noreply.translate.codeberg.org>
77f2c8d9a - 2024-05-09 - Eryk Michalak <gnu.ewm@protonmail.com>
beb16006a - 2024-05-09 - tentsbet <tentsbet@users.noreply.translate.codeberg.org>
54b5123e2 - 2024-05-10 - ghose <ghose@users.noreply.translate.codeberg.org>
4f372ab44 - 2024-05-09 - German <German@users.noreply.translate.codeberg.org>
fa9b9aae8 - 2024-05-09 - Fjuro <fjuro@alius.cz>
2024-05-10 09:29:22 +02:00
Bnyro 383d873597 [fix] unit converter plugin: can't be disabled in settings 2024-05-09 17:40:37 +02:00
Markus Heiser fb32425d78 [mod] yacy engine: pick base_url randomly from a list of instances
Inspired by post [1] in the disscussion we had, while yacy.searchlab.eu was
broken.

[1] https://github.com/searxng/searxng/issues/3428#issuecomment-2101080101

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-09 17:29:15 +02:00
Bnyro 72be98e12f [feat] plugins: new calculator plugin 2024-05-09 17:23:38 +02:00
Markus Heiser 742303d030 [mod] improve unit converter plugin
- l10n support: parse and format decimal numbers by babel
- ability to add additional units
- improved unit detection (symbols are not unique)
- support for alias units (0,010C to F --> 32,018 °F)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-09 17:16:31 +02:00
Markus Heiser 63cf80aae5 [fix] docutils dependencies (docutils>=0.21.2)
Another trip into the hell of dependencies: docutils tends to put major changes
in minor patches: the executables have been renamed / e.g.

     rst2html.py --> rts2html

so we have to use docutils at least from version 0.21.2, but this version of
docutils is only supported by myst-parser from version 3.0.1 on.

Additionally, docutils decided to drop python 3.8 in version 0.21 [1]

Further, linuxdoc needed an update to cope with docutils 0.21 [2]

[1] https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-21-2024-04-09
[2] https://github.com/return42/linuxdoc/pull/36

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-09 17:15:21 +02:00
dependabot[bot] 58320222e2 Bump jinja2 from 3.1.3 to 3.1.4
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [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.3...3.1.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 07:21:25 +02:00
Alexandre Flament ac430a9eaf Drop pytomlpp dependency for Python >= 3.11
Rely on tomllib for Python >= 3.11
2024-05-05 17:35:29 +02:00
Markus Heiser dbed8da284 [fix] startpage engine: XPath expressions adapted for new HTML layout
Startpage has changed its HTML layout, classes like ``w-gl__result__main`` do no
longer exists and the result items have been slightly changed in their
structure.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-04 19:45:52 +02:00
Yaksh Bariya d577817646 [fix] respect user preferences to open links in new tab for short answers
Previously only result urls were set to open in new tab by default, this should
make the behaviour consistent.

Also adds the missing rel="noreferrer" to the anchor tag. Although this should
not be needed as long as the `referrer-policy: no-referrer` header is set, it's
always nice to play safer than to have to say sorry.  For example some reverse
proxy configurations might strip off unwhitelisted headers in which case it's
nice to have this set.
2024-05-04 06:55:37 +02:00
Bnyro 78077126f2 [feat] wikimedia commons: support for videos, audio and other files 2024-05-04 06:23:04 +02:00
Daniel Kukula 46d7a8289b [feat] engine: implementation of https://hex.pm
The package manager for the Erlang ecosystem Find packages.

Co-authored-by: Bnyro <82752168+Bnyro@users.noreply.github.com>
2024-05-03 21:37:37 +02:00
dependabot[bot] 04271e555b [upd] pypi: Bump pallets-sphinx-themes from 2.1.2 to 2.1.3
Bumps [pallets-sphinx-themes](https://github.com/pallets/pallets-sphinx-themes) from 2.1.2 to 2.1.3.
- [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.2...2.1.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-03 18:22:13 +02:00
searxng-bot 8225f88404 [l10n] update translations from Weblate
377c34a74 - 2024-05-02 - lspepinho <lspepinho@users.noreply.translate.codeberg.org>
079ba625b - 2024-05-01 - alexgabi <alexgabi@users.noreply.translate.codeberg.org>
fe48c8a08 - 2024-04-30 - return42 <return42@users.noreply.translate.codeberg.org>
e04560acc - 2024-04-30 - return42 <return42@users.noreply.translate.codeberg.org>
2fb6a2cfa - 2024-04-29 - Heyian <Heyian@users.noreply.translate.codeberg.org>
b374205cc - 2024-04-30 - return42 <return42@users.noreply.translate.codeberg.org>
d284cdd1d - 2024-04-29 - Fjuro <fjuro@alius.cz>
87edf2cb3 - 2024-04-27 - return42 <return42@users.noreply.translate.codeberg.org>
f6971a077 - 2024-04-27 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
f88e23f2c - 2024-04-27 - return42 <return42@users.noreply.translate.codeberg.org>
c7e8506c1 - 2024-04-28 - ghose <ghose@users.noreply.translate.codeberg.org>
795e14ddd - 2024-04-27 - return42 <return42@users.noreply.translate.codeberg.org>
143bc6cf0 - 2024-04-27 - Implosion <Implosion@users.noreply.translate.codeberg.org>
5d96b3d53 - 2024-04-27 - return42 <return42@users.noreply.translate.codeberg.org>
b2cc8a6cd - 2024-04-27 - return42 <return42@users.noreply.translate.codeberg.org>
2024-05-03 09:15:13 +02:00
Markus Heiser 11fe88bb40 [fix] update wikidata units - remove URL prefix from Q-name
Sometimes the URL prefix switches from a http to a https, this patch harden the
code that removes the URL prefix from wikidata Q-name, issue has been reported
in [1].

[1] https://github.com/searxng/searxng/pull/3437#issuecomment-2082121730

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-01 18:58:28 +02:00
Austin-Olacsi c8d0b6529b [feat] engine: implementation of searchmysite 2024-04-30 05:47:18 +02:00
Markus Heiser f8bdf61976 [fix] yep engine: invcrease timeout from defaul 3sec to 5sec
In the "Engines" tab on searx.space [1] nearly all engines report a

    TimeoutException: yep engine

As documented in issue #2444 [2], this problem can be fixed by increasing the
timeout. Note: on a local instance (`make run`) the timeout of 3sec was
sufficient / at least in my local test, but the balance of searx.space leads me
to believe that this tight timeout is usually not sufficient.

[1] https://searx.space/
[2] https://github.com/searxng/searxng/issues/2444

Closes https://github.com/searxng/searxng/issues/3421
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-30 05:46:15 +02:00
return42 e45a7cc063 [data] update searx.data - update_engine_traits.py 2024-04-29 10:02:48 +02:00
return42 c0b6c26eea [data] update searx.data - update_firefox_version.py 2024-04-29 10:02:16 +02:00
return42 0ec406cb7e [data] update searx.data - update_ahmia_blacklist.py 2024-04-29 10:01:52 +02:00
return42 ea585d4e77 [data] update searx.data - update_currencies.py 2024-04-29 09:48:56 +02:00
return42 d4e98c03a0 [data] update searx.data - update_engine_descriptions.py 2024-04-29 09:46:26 +02:00
Markus Heiser e6c345f890 [fix] ccc_media engine: filter video formats and ignore audio & SubRip
CCC media serves several recording formats, to name a few:

- application/x-subrip
- video/mp4
- video/webm
- audio/mpeg
- audio/opus
- audio/mpeg

not all of them are suitable for a video frame.  If available we should prefer
video/mp4 due to its minimal data rates.

Closes: https://github.com/searxng/searxng/issues/3431
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-28 08:42:18 +02:00
Jinyuan Huang ecee56533c improve "search existing issues from github" link 2024-04-27 20:01:27 +02:00
Markus Heiser 11fdc2f56a [fix] drop broken azlyrics XPath engine
Unfortunately, azlyrics has a bot blocker that makes it impossible to implement
an XPath engine for it [1][2].

[1] https://github.com/searxng/searxng/pull/3302#issuecomment-2013529271
[2] https://github.com/searxng/searxng/issues/3280

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-27 18:43:14 +02:00
Markus Heiser 648f43be1d [build] /static 2024-04-27 18:26:23 +02:00
Bnyro 3ea278aff4 [feat] preferences: button to enable/disable all engines 2024-04-27 18:26:23 +02:00
Bnyro 46efb2f36d [feat] plugins: new unit converter plugin 2024-04-27 18:11:33 +02:00
Bnyro b3b1258e4e [data] wikidata: update wikidata_units.json 2024-04-27 18:11:33 +02:00
dependabot[bot] 1e1fb59bea [upd] pypi: Bump sphinx from 7.2.6 to 7.3.7
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.6 to 7.3.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.2.6...v7.3.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-04-27 10:05:51 +02:00
Markus Heiser d593055888 [fix] ionic.io/ionicons - add back missing class="ionicon"
Seems to me svg2jinja added the class in the past .. but no longer in new builds
/ this patch adds the class back by using addAttributesToSVGElement [1].

To test this patch use:

    $ ./manage themes.simple
    $ cat searx/templates/simple/icons.html

and check `class="ionicon"` is in the outer `<svg ..>` tags.

[1] https://svgo.dev/docs/plugins/add-attributes-to-svg-elements/
[2] https://ionic.io/ionicons

Closes: https://github.com/searxng/searxng/issues/3383
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-27 09:33:20 +02:00
Bnyro 42b58eb448 [feat] media.ccc.de: implement module with pagination and iframe 2024-04-27 08:55:26 +02:00
dependabot[bot] a56b4a1648 [upd] pypi: Bump pallets-sphinx-themes from 2.1.1 to 2.1.2
Bumps [pallets-sphinx-themes](https://github.com/pallets/pallets-sphinx-themes) from 2.1.1 to 2.1.2.
- [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.1...2.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 08:30:17 +02:00
dependabot[bot] 4719c004ea [upd] pypi: Bump redis from 5.0.3 to 5.0.4
Bumps [redis](https://github.com/redis/redis-py) from 5.0.3 to 5.0.4.
- [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.3...v5.0.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 08:24:23 +02:00
Ivan G 0e09014df5
Add uWSGI `die-on-term` flag (#3429) 2024-04-26 23:42:29 +02:00
searxng-bot 41f415aabf [l10n] update translations from Weblate
f4861e2c3 - 2024-04-26 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
2024-04-26 09:14:03 +02:00
dependabot[bot] 0081870305 [upd] pypi: Bump selenium from 4.19.0 to 4.20.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.19.0 to 4.20.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.19.0...selenium-4.20.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-04-26 09:10:46 +02:00
Markus Heiser ddaa6ed759 [fix] add missing localizable (gettext) messages to searxng.msg
To test this patch I used .. and checked the diff of the `messages.pot` file::

    $ ./manage pyenv.cmd pybabel extract -F babel.cfg \
              -o ./searx/translations/messages.pot searx/
    $ git diff ./searx/translations/messages.pot

----

hint from @dalf: f-string are not supported [1] but there is no error [2].

[1] python-babel/babel#594
[2] python-babel/babel#715

Closes: https://github.com/searxng/searxng/issues/3412
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-26 07:34:32 +02:00
Bnyro 0a4280a137 [refactor] translation engines: add translate category
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-26 07:33:28 +02:00
Bnyro 91522f3801 [feat] engine: implementation of LibreTranslate
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-26 07:33:28 +02:00
Grant Lanham Jr e0214412f8 Update .gitignore to ignore .python-version 2024-04-24 16:01:50 +02:00
searxng-bot af3be2b12b [l10n] update translations from Weblate
b58f11366 - 2024-04-17 - Right202209 <Right202209@users.noreply.translate.codeberg.org>
43b601950 - 2024-04-17 - return42 <return42@users.noreply.translate.codeberg.org>
5cac16eaf - 2024-04-17 - return42 <return42@users.noreply.translate.codeberg.org>
88b5396d5 - 2024-04-17 - return42 <return42@users.noreply.translate.codeberg.org>
515161ddc - 2024-04-17 - return42 <return42@users.noreply.translate.codeberg.org>
7f8e70b10 - 2024-04-17 - return42 <return42@users.noreply.translate.codeberg.org>
247777e50 - 2024-04-10 - Right202209 <Right202209@users.noreply.translate.codeberg.org>
1b0c91d0f - 2024-04-07 - shadow3x3x3 <shadow3x3x3@users.noreply.translate.codeberg.org>
f7f160fd0 - 2024-04-06 - vducong <vducong@users.noreply.translate.codeberg.org>
62cc9ce67 - 2024-04-06 - mrintegrity <mrintegrity@users.noreply.translate.codeberg.org>
131bec469 - 2024-04-06 - omfj <omfj@users.noreply.translate.codeberg.org>
bceb0dbec - 2024-04-06 - Uzakmo <Uzakmo@users.noreply.translate.codeberg.org>
51330ae18 - 2024-04-05 - tegcope <tegcope@users.noreply.translate.codeberg.org>
79a2eb668 - 2024-04-05 - sserra <sserra@users.noreply.translate.codeberg.org>
b3c2827e5 - 2024-04-05 - sserra <sserra@users.noreply.translate.codeberg.org>
ba46f8672 - 2024-04-03 - meskobalazs <meskobalazs@users.noreply.translate.codeberg.org>
b58a3eff1 - 2024-04-04 - return42 <return42@users.noreply.translate.codeberg.org>
3a9c022ea - 2024-04-03 - meskobalazs <meskobalazs@users.noreply.translate.codeberg.org>
424ea8188 - 2024-04-03 - Kita Ikuyo <searinminecraft@courvix.com>
2024-04-21 11:16:40 +02:00
Bnyro 644ae51417 [fix] yahoo: result titles are getting mixed together 2024-04-20 17:00:17 +02:00
dependabot[bot] 0f70e4d305 [upd] pypi: Bump sphinx-issues from 4.0.0 to 4.1.0
Bumps [sphinx-issues](https://github.com/sloria/sphinx-issues) from 4.0.0 to 4.1.0.
- [Commits](https://github.com/sloria/sphinx-issues/compare/4.0.0...4.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 10:43:53 +02:00
mrpaulblack 5e4ab964b7 [feat] template: add apple-touch-icon in html header
* this makes it possible to add SearXNG to iOS devices homescreen with a proper icon
2024-04-18 12:34:17 +02:00
singletail 1746eecf2b [fix] engine: youtube_api - ignore channels / prevent exceptions
`youtube_api.py` throws an exception if the search results contain a channel, as
channels have no videoId.  This PR adds a keycheck for parsing the json response.
2024-04-13 08:41:00 +02:00
Austin-Olacsi c92846dca8 [fix] dead URL in settings.yml 2024-04-13 07:03:45 +02:00
dependabot[bot] c8dca20548 [upd] npm: Bump eslint in /searx/static/themes/simple
Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 9.0.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/v8.57.0...v9.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 18:11:42 +02:00
dependabot[bot] 9631e213fe [upd] pypi: Bump flask from 3.0.2 to 3.0.3
Bumps [flask](https://github.com/pallets/flask) from 3.0.2 to 3.0.3.
- [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.2...3.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 17:32:40 +02:00
dependabot[bot] bbd2a4350a [upd] pypi: Bump lxml from 5.1.0 to 5.2.1
Bumps [lxml](https://github.com/lxml/lxml) from 5.1.0 to 5.2.1.
- [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.1.0...lxml-5.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 17:31:38 +02:00
Diagonalo 6458490271 [mod] engine 'mwmbl: Update API URL 2024-04-10 06:51:28 +02:00
Markus Heiser f1a148f53e [fix] ddg engine: if no vqd value can be determined, don't save None
Closes: https://github.com/searxng/searxng/issues/3370
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-08 10:56:11 +02:00
Markus Heiser bd6ff29f8f [fix] remove usage of no longer existing names from lxml
In lxml 5.1.1 the private name `_ElementStringResult` in module `lxml.etree`
does no longer exists.

This code was written nearly a decade ago, its no longer clear what the
intention `_ElementStringResult` and `_ElementUnicodeResult` had been. It can be
assumed that these classes will no longer occur.

Closes: https://github.com/searxng/searxng/issues/3368
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-08 10:55:23 +02:00
Markus Heiser 26a92c1a8d [fix] new builds of icons.html do miss class="ionicon"
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-08 09:38:18 +02:00
Markus Heiser dddd628f48 [build] /static 2024-04-08 09:07:45 +02:00
Yaksh Bariya 9f5268b4a7 [enh] add keybindings for copying URLs
'y': for in Vim-mode (yank)
'c': for SearXNG-mode (copy)

This should help keyboard heavy users
2024-04-08 09:07:45 +02:00
Yaksh Bariya 8bf2da9ce5 [enh] add editorconfig rules for javascript files
SearXNG has a bunch of javascript files which have an indentation of
two, but the '*' rule tells my editor to use 4 spaces.
2024-04-08 09:07:45 +02:00
Markus Heiser 4acb52f68f [fix] even if limiter not activated, botdetection must be activated
Closes: #2975
Closes: #2995

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-08 07:53:04 +02:00
Austin-Olacsi b6fe2cad71 [mod] Ask engine: remove tracking paramaters and set max page to 5 2024-04-08 07:50:14 +02:00
Bnyro bf3845b093 [feat] engine: implementation of Open Meteo 2024-04-07 19:02:53 +02:00
Markus Heiser f5bb64cca8 [fix] .dir-locals.el -> .dir-locals-template.el
The settungs in the .dir-locals.el do not work well for every emacs setup:

Add .dir-locals.el to the git-ignore list and move content to a template file.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-29 08:57:02 +01:00
return42 ad9537065a [data] update searx.data - update_firefox_version.py 2024-03-29 08:44:18 +01:00
return42 531942ed16 [data] update searx.data - update_ahmia_blacklist.py 2024-03-29 08:43:50 +01:00
dependabot[bot] e8ee27e43c [upd] pypi: Bump selenium from 4.18.1 to 4.19.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.18.1 to 4.19.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.18.1...selenium-4.19.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-03-29 08:43:24 +01:00
return42 433cfd868a [data] update searx.data - update_currencies.py 2024-03-29 08:42:16 +01:00
return42 22d68aa2a7 [data] update searx.data - update_engine_traits.py 2024-03-29 08:41:44 +01:00
return42 cc124b8f14 [data] update searx.data - update_engine_descriptions.py 2024-03-29 08:41:00 +01:00
searxng-bot 550ca55778 [l10n] update translations from Weblate
cd974f62f - 2024-03-27 - matheuspolachini <matheuspolachini@users.noreply.translate.codeberg.org>
98335c289 - 2024-03-27 - pixrobot <pixrobot@users.noreply.translate.codeberg.org>
986969118 - 2024-03-25 - pixrobot <pixrobot@users.noreply.translate.codeberg.org>
285674006 - 2024-03-24 - Yahya-Lando <Yahya-Lando@users.noreply.translate.codeberg.org>
2024-03-29 08:23:44 +01:00
Mikkel Denker b21aaa8907 Add user-agent to stract requests 2024-03-22 13:40:46 +01:00
searxng-bot 32bd55e268 [l10n] update translations from Weblate
522463f6a - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
8ec374759 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
ac6b5dff0 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
66b28f3e4 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
a8e6cb73b - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
cd153923a - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
06110caf7 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
6bc307e8a - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
eef184a70 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
e5d537357 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
d592adfb0 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
0645b3404 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
da95a5907 - 2024-03-18 - jianhanquwan <jianhanquwan@users.noreply.translate.codeberg.org>
122a67a1f - 2024-03-17 - Oğuz Ersen <ersen@users.noreply.translate.codeberg.org>
39a7e1553 - 2024-03-15 - MonsoonRain <MonsoonRain@users.noreply.translate.codeberg.org>
2024-03-22 08:15:19 +01:00
dependabot[bot] bec34cf690 Bump black from 24.2.0 to 24.3.0
Bumps [black](https://github.com/psf/black) from 24.2.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.2.0...24.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-21 07:37:23 +01:00
dependabot[bot] e2af3e4970 [upd] pypi: Bump redis from 5.0.2 to 5.0.3
Bumps [redis](https://github.com/redis/redis-py) from 5.0.2 to 5.0.3.
- [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.2...v5.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15 09:59:21 +01:00
searxng-bot f78cf94507 [l10n] update translations from Weblate
5ab8a4123 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
8fdac20fd - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
f904a2b41 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
da78b59cb - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
c3ee00845 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
a1a4001e9 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
b8ddc37d9 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
257c6e52b - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
de6899977 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
06f9a81ee - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
0b916dcc0 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
2f78ef012 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
098a44813 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
1bcbfb4b9 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
1c561b9ca - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
44ab09c8b - 2024-03-12 - GeoffreyGx <GeoffreyGx@users.noreply.translate.codeberg.org>
5b767a16c - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
8dec572be - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
28e8c648d - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
77ce67845 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
1d044f989 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
a10834f13 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
eaa1cdd6e - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
b49e3879a - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
f55b61fb7 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
4954e6e49 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
33b08dc66 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
58df517d4 - 2024-03-11 - GeoffreyGx <GeoffreyGx@users.noreply.translate.codeberg.org>
cee7ec3f0 - 2024-03-10 - alexgabi <alexgabi@disroot.org>
2024-03-15 09:49:09 +01:00
Markus Heiser 74f6dfb576 [fix] .pylintrc mode signature to conf-unix
In pylint and python's config parser [1] the default symbol for comments is '#'.
The dialect is based on unix, while the classic dialect comes from windows and
uses a semicolon for comments.

[1] https://docs.python.org/3/library/configparser.html#module-configparser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-14 14:18:26 +01:00
Markus Heiser 542f7d0d7b [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION
In the past, some files were tested with the standard profile, others with a
profile in which most of the messages were switched off ... some files were not
checked at all.

- ``PYLINT_SEARXNG_DISABLE_OPTION`` has been abolished
- the distinction ``# lint: pylint`` is no longer necessary
- the pylint tasks have been reduced from three to two

  1. ./searx/engines -> lint engines with additional builtins
  2. ./searx ./searxng_extra ./tests -> lint all other python files

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-11 14:55:38 +01:00
Markus Heiser 8205f170ff [mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTION
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-11 14:55:38 +01:00
Markus Heiser 707d6270c8 [doc] engine: mullvad leta
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 18:20:07 +01:00
Grant Lanham 9d6896a771 [feat] engine: implementation of mullvad leta 2024-03-10 18:20:07 +01:00
Markus Heiser 3edaa26dae [data] make data.all
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 15:56:50 +01:00
Markus Heiser ce4aaf6cad [mod] comprehensive revision of the searxng_extra/update/ scripts
- pylint all scripts
- fix some errors reported by pyright
- from searx.data import data_dir (Path.open)
- fix import from pygments.formatters.html

NOTE: none functional changes!

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 15:56:50 +01:00
Markus Heiser 0ffec440b2 [doc] annas_archive: ctegs journal_article & book_any has been removed
In commit 8af181533 in PR:

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

the category `journal_article` has been removed, `book_any` has been removed
longer time ago.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 12:46:00 +01:00
return42 33b4ffee29 [data] update searx.data - update_engine_traits.py 2024-03-10 12:46:00 +01:00
return42 a5d36211a3 [data] update searx.data - update_ahmia_blacklist.py 2024-03-10 12:45:15 +01:00
return42 2cb389e9ce [data] update searx.data - update_currencies.py 2024-03-10 12:44:44 +01:00
return42 4a8867e646 [data] update searx.data - update_engine_descriptions.py 2024-03-10 12:01:33 +01:00
return42 7bbcf1be9a [data] update searx.data - update_external_bangs.py 2024-03-10 12:01:00 +01:00
Markus Heiser cff0097289 [fix] update_external_bangs: BANGS_URL 'https://duckduckgo.com/bang.js'
JSON file which contains the bangs / there is no longer a versioning of this
file.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 11:58:20 +01:00
Markus Heiser e97e1f9110 [fix] duckduckgo.fetch_traist - URL of region definitions has changed
- https://duckduckgo.com/dist/util/u.7669f071a13a7daa57cb.js

updated from u661.js to u.7669f071a13a7daa57cb / should be updated
automatically?  The last change was on March 23rd in dba8977b09 [1]

- [1] https://github.com/searxng/searxng/pull/2269

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 10:32:54 +01:00
Markus Heiser 33c099022b [drop] engine framalibre - sarch URL is no longer supported
Closes: https://github.com/searxng/searxng/issues/3286
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 18:00:45 +01:00
Markus Heiser 691390b443 [fix] CI YAML config files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 14:56:12 +01:00
Markus Heiser a48da9b28a [fix] CI YAML config files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 14:08:00 +01:00
Markus Heiser 18028f3c13 [mod] CI: tag commits with leading scope/type of the modification
Add a leading tag (in square brackets) about the scope/type to commit messages
from automated tasks (commits from CI).

dependantbot::

    [upd] pypi: Bump .. from .. to ..
    [upd] npm: Bump .. from .. to .. in /searx/static/themes/simple

Weblate translation updates::

    [l10n] update translations from Weblate

updates of ./data::

    [data] update searx.data ...

build commit of gh-pages::

    [doc] build from commit ...

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 12:17:23 +01:00
Alexandre Flament 42515d98f7 engine npm use the packages.html template 2024-03-09 10:24:49 +01:00
Bnyro 6dd07b88a4 [feat] lib.rs: use packages.html template 2024-03-09 10:17:16 +01:00
Markus Heiser 50d5a9ff60 [fix] issues reported by pylint 3.1.0
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 09:28:13 +01:00
dependabot[bot] 3bea2e7e3a Bump pylint from 3.0.3 to 3.1.0
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.0.3 to 3.1.0.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.0.3...v3.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-09 09:28:13 +01:00
Markus Heiser a7b51f023e [black] upgrade black 22.12.0 --> 24.2.0
The issue discussed in [1] has been solved since [2] has been merged into black
/ now we can upgrade without touching 69 files as it was needed with black
23.1.0 [3].

[1] https://github.com/searxng/searxng/pull/2159#issuecomment-1425723977
[2] https://github.com/psf/black/pull/4060
[3] https://github.com/searxng/searxng/pull/2159/files

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 08:15:50 +01:00
dependabot[bot] 48d04871a4 Bump python-dateutil from 2.8.2 to 2.9.0.post0
Bumps [python-dateutil](https://github.com/dateutil/dateutil) from 2.8.2 to 2.9.0.post0.
- [Release notes](https://github.com/dateutil/dateutil/releases)
- [Changelog](https://github.com/dateutil/dateutil/blob/master/NEWS)
- [Commits](https://github.com/dateutil/dateutil/compare/2.8.2...2.9.0.post0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-08 18:46:18 +01:00
Bnyro 44decaa524 [feat] pkg.go.dev: use packages.html template 2024-03-08 17:18:54 +01:00
centralscrutinizer21 fbea0dd3ce [l10n] Italian translation of infopages 2024-03-08 17:18:29 +01:00
searxng-bot 9c08a0cddd [translations] update from Weblate
184c000d8 - 2024-03-07 - 0ko <0ko@users.noreply.translate.codeberg.org>
7a107e46c - 2024-03-04 - Bubowny <outcheesed@proton.me>
f02911c4b - 2024-03-04 - tentsbet <remendne@pentrens.jp>
e4e8977cc - 2024-03-02 - marcelStangenberger <codeberg@xo.nl>
4a9923cee - 2024-03-02 - Integral <integral@member.fsf.org>
05e7bb2f8 - 2024-03-01 - return42 <markus.heiser@darmarit.de>
4b466efdc - 2024-03-01 - syobon <syobon@syobon.net>
2024-03-08 08:21:21 +01:00
Markus Heiser fba8371396 [fix] XPath engine hoogle - hoogle.haskell.org has no paging support
Search on hoogle.haskell.org does no longer have pages.

Closes: https://github.com/searxng/searxng/issues/3278
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-07 17:31:25 +01:00
Markus Heiser a5b81e2555 [fix] nyaa engine - paging support & filesize (GiB)
BTW: pylint engine

Closes: https://github.com/searxng/searxng/issues/3290
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-07 07:38:31 +01:00
Markus Heiser 3179993847 [fix] XPath engine lobste.rs - argument utf8 is no longer needed
Closes: https://github.com/searxng/searxng/issues/3279
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-06 13:24:50 +01:00
Markus Heiser 3529f0af50 [fix] engine searchcode.com - paging is broken in searchcode.com's API
paging is broken in searchcode.com's API .. not sure it will ever been fixed /
this commit disables paging in the engine and BTW pylint `searchcode_code.py`.

Closes: https://github.com/searxng/searxng/issues/3287
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-06 12:33:29 +01:00
Markus Heiser 76b18545e4 [fix] XPath engine naver - content selector needed an update
Closes: https://github.com/searxng/searxng/issues/3282
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-06 11:11:31 +01:00
Markus Heiser 5602f0bf96 [fix] engine pinterest - ignore result type 'story'
Close: https://github.com/searxng/searxng/issues/3289
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-06 07:33:43 +01:00
Markus Heiser d97b84bea2 [fix] ddg engines (get_vqd) - the vqd value is no longer in the form
Closes: https://github.com/searxng/searxng/issues/3276
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-05 16:27:04 +01:00
Alexandre Flament b7be53bb90 Docker: use Alpine 3.19 2024-03-04 19:40:57 +01:00
Alexandre Flament 0e2566db68 internetarchivescholar engine: set timeout to 15 seconds 2024-03-03 20:16:32 +01:00
Alexandre Flament 7c5c11949b Checker: tests for wikispecies 2024-03-03 20:00:46 +01:00
Alexandre Flament 8fed5798ab Checker: tests for bahnhof 2024-03-03 20:00:46 +01:00
Yaksh Bariya b1431e1670 [feat] engine: implementation of cppreference 2024-03-03 17:07:29 +01:00
Alexandre Flament 1a66bfa66c checker: display results at the end 2024-03-03 11:18:43 +01:00
Alexandre Flament 08e7c37a35 GitHub workflows: run checker on Friday 2024-03-03 11:18:43 +01:00
Alexandre Flament b56449d3fa Fix make search.checker 2024-03-03 11:18:43 +01:00
Alexandre Flament 38fdd2288a
Drop typing-extensions dependency (#3265)
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-02 13:10:31 +01:00
searxng-bot 1892a87fd2 [translations] update from Weblate
663d8815b - 2024-03-01 - return42 <markus.heiser@darmarit.de>
f97823239 - 2024-02-28 - return42 <markus.heiser@darmarit.de>
480a0ec8d - 2024-02-28 - eownerdead <wlpx0yii@anonaddy.me>
905211981 - 2024-02-26 - gallegonovato <fran-carro@hotmail.es>
10e90be9a - 2024-02-25 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
3b803ba23 - 2024-02-26 - feather1 <verdimario2015@gmail.com>
8bbaaa43e - 2024-02-25 - return42 <markus.heiser@darmarit.de>
6950cdb97 - 2024-02-26 - Linerly <linerly@protonmail.com>
807c9891d - 2024-02-26 - ghose <correo@xmgz.eu>
e16ca50cd - 2024-02-25 - return42 <markus.heiser@darmarit.de>
85241d9ce - 2024-02-25 - Fjuro <ifjuro@proton.me>
2024-03-02 09:37:52 +01:00
dependabot[bot] 858b2071df Bump redis from 5.0.1 to 5.0.2
Bumps [redis](https://github.com/redis/redis-py) from 5.0.1 to 5.0.2.
- [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.1...v5.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 08:13:44 +01:00
dependabot[bot] dd2379b96f Bump wlc from 1.13 to 1.14
Bumps [wlc](https://github.com/WeblateOrg/wlc) from 1.13 to 1.14.
- [Changelog](https://github.com/WeblateOrg/wlc/blob/main/CHANGES.rst)
- [Commits](https://github.com/WeblateOrg/wlc/compare/1.13...1.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 08:11:51 +01:00
Bnyro f3b4bf86a7 [feat] engine: implementation of void linux packages
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-29 13:12:40 +01:00
Alexandre Flament d58760ef75 [mod] pypi engine: use packages.html 2024-02-29 07:48:44 +01:00
dalf 35873b5a1c Update searx.data - update_ahmia_blacklist.py 2024-02-29 07:47:54 +01:00
dalf df74b5b59b Update searx.data - update_firefox_version.py 2024-02-29 07:47:01 +01:00
dalf 473b2dd42f Update searx.data - update_wikidata_units.py 2024-02-29 07:46:27 +01:00
dalf 9a474715e8 Update searx.data - update_engine_descriptions.py 2024-02-29 07:46:02 +01:00
Markus Heiser c0b97c6543 [fix] re-add opensearch_url / its used in based.html
The URL was accidentally deleted in a85907a98, but is still required in
base.html for auto-discovery / from base.html::

  <link title="{{ instance_name }}"
        type="application/opensearchdescription+xml"
	rel="search" href="{{ opensearch_url }}"
	/>

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 18:26:16 +01:00
templehasfallen e8bd6c03bf Update settings.yml
Changed value of "extra_proxy_timeout" from 10.0 to 10 as the variable expects an int.
Uncommenting this value with a non-int value will throw many errors and crash all engines.
2024-02-25 16:35:13 +01:00
Austin-Olacsi 9330a072eb [feat] engine: implementation of pixiv 2024-02-25 16:29:57 +01:00
Bnyro cf57914359 [build] /static 2024-02-25 16:22:37 +01:00
Bnyro db1f9b31c9 [feat] images: show resolution inside the image and fix image details overflow
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 16:22:37 +01:00
Bnyro e76ab1a4b3 [refactor] images: add resolution, image format and filesize fields
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 16:22:37 +01:00
Markus Heiser b683aa63fb [feat] github: use packages template
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 14:56:57 +01:00
Bnyro 1d6f475fbc [feat] dockerhub: use packages template 2024-02-25 14:56:57 +01:00
Bnyro 60d8414ef1 [docs] engine_overview: add packages result template 2024-02-25 14:56:57 +01:00
Markus Heiser 34fa2b7cca [build] /static 2024-02-25 14:56:57 +01:00
Bnyro 938391b050 [feat] templates: add package result template
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 14:56:57 +01:00
Markus Heiser a85907a98f [fix] opensearxh.xml: firefox v123 does not except self-URI (URL with param)
Before this patch we had a address in the rel-self-template with params [1]:

GET::

    <Url method="GET"
         rel="self"
         template="/opensearch.xml?method=GET&amp;autocomplete=google"
         type="application/opensearchdescription+xml"/>

POST::

    <Url method="POST"
         rel="self"
         template="/opensearch.xml?method=POST&amp;autocomplete=google"
         type="application/opensearchdescription+xml"/>

The first one (GET) is no longer accepted by firefox since v123, the latter one
was always been wrong (since it mixes GET params with a POST request).

Since Firefox v123 a template syntax [2] in the rel-self-template is no longer
supported / Firefox will report an error::

    Firefox could not download the search plugin from:
    http://127.0.0.1:8888//opensearch.xml?method=GET&autocomplete=google

This patch reduce the URL to::

    template="http://127.0.0.1:8888/opensearch.xml"

[1] https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md#url-rel-values
[2] https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md#opensearch-url-template-syntax

Closes: https://github.com/searxng/searxng/issues/3227
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 07:33:04 +01:00
Markus Heiser d72fa99bd0 [fix] setup.py - needed bugfixes to build a valid package
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-24 07:22:26 +01:00
dependabot[bot] c7309a0869 Bump selenium from 4.17.2 to 4.18.1
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.17.2 to 4.18.1.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits/selenium-4.18.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-23 08:55:09 +01:00
dependabot[bot] 8a11e6ac55 Bump yamllint from 1.35.0 to 1.35.1
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.35.0 to 1.35.1.
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.35.0...v1.35.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-23 08:35:41 +01:00
searxng-bot 671333081c [translations] update from Weblate
946267db3 - 2024-02-23 - return42 <markus.heiser@darmarit.de>
2024-02-23 08:14:58 +01:00
Bnyro cfbe59b6b3 [feat] engine: implementation of mozhi 2024-02-23 07:50:48 +01:00
Xinos 3c42252c78 [feat] engine: implementation of yandex music
Access to music is limited to a few countries:

- https://yandex.com/support/music/access.html
2024-02-21 17:17:12 +01:00
KalokaK fb36a06acd [fix] utils/searxng.sh uses searx.shared module which no longer exists
Issue exists since #1954 has been merged / the PR fixed all searx.shared except
this one fixed here in this commit.

Related: https://github.com/searxng/searxng/pull/1954
Closes: https://github.com/searxng/searxng/issues/3224
2024-02-20 15:18:40 +01:00
micsthepick fde21c8f99 [feat] engine: Add LiveSpace livestreams 2024-02-20 14:45:07 +01:00
searxng-bot 3b80f9fe03 [translations] update from Weblate
df7653397 - 2024-02-19 - return42 <markus.heiser@darmarit.de>
c62c03816 - 2024-02-19 - return42 <markus.heiser@darmarit.de>
a48235060 - 2024-02-18 - tentsbet <remendne@pentrens.jp>
445545961 - 2024-02-19 - return42 <markus.heiser@darmarit.de>
275a77e51 - 2024-02-16 - hankskyjames777 <iamjuanz30312@gmail.com>
0772d9b4c - 2024-02-16 - Fjuro <ifjuro@proton.me>
2024-02-20 12:33:32 +01:00
Markus Heiser 894f164869 [fix] sort RTL_LOCALES before written into locales.json
To avoid unnecessary changes to the file, the list should be sorted before it is
written to the file.

You can test it by calling multiple times::

    make data.locales

and searx/data/locales.json should be unchanged.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-20 12:29:13 +01:00
Alexandre Flament ed66ed758d [mod] reduce memory footprint by not calling babel.Locale.parse at runtime
babel.Locale.parse loads more than 60MB in RAM.  The only purpose is to get:

    LOCALE_NAMES   - searx.data.LOCALES["LOCALE_NAMES"]
    RTL_LOCALES    - searx.data.LOCALES["RTL_LOCALES"]

This commit calls babel.Locale.parse when the translations are update from
weblate and stored in::

    searx/data/locales.json

This file can be build by::

    ./manage data.locales

By store these variables in searx.data when the translations are updated we save
round about 65MB (usually 4 worker = 260MB of RAM saved.

Suggested-by: https://github.com/searxng/searxng/discussions/2633#discussioncomment-8490494
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-20 10:43:20 +01:00
Markus Heiser 76845ea42c [mod] engine ask.com - parse JS result to JSON
Parse the result list from ask.com given in the variable named
window.MESON.initialState::

    <script nonce="..">
        window.MESON = window.MESON || {};
        window.MESON.initialState = {"siteConfig": ...
          ...}};
        window.MESON.loadedLang = "en";
    </script>

The result list is in field::

    json_resp['search']['webResults']['results']

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-18 09:17:22 +01:00
Hackurei 3df53d6e50 [feat] engine: implementation of ask.com 2024-02-18 09:17:22 +01:00
Markus Heiser c197c0e35e [fix] remove twine from requirements-dev
SearXNG is a rolling release / we do not deploy packages on PyPi

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-16 18:29:40 +01:00
dependabot[bot] 08e524fc35 Bump yamllint from 1.34.0 to 1.35.0
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.34.0 to 1.35.0.
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.34.0...v1.35.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-16 15:48:28 +01:00
searxng-bot 2aef3a556f [translations] update from Weblate
be989636e - 2024-02-14 - return42 <markus.heiser@darmarit.de>
0e3455cb8 - 2024-02-13 - return42 <markus.heiser@darmarit.de>
edc279680 - 2024-02-14 - pietro395 <me@pietro.in>
e0d3b7f9f - 2024-02-14 - kratos <makesocialfoss32@keemail.me>
f68fc5440 - 2024-02-13 - gallegonovato <fran-carro@hotmail.es>
980f3846c - 2024-02-12 - tentsbet <remendne@pentrens.jp>
711618f3a - 2024-02-12 - return42 <markus.heiser@darmarit.de>
1d12e762f - 2024-02-12 - ghose <correo@xmgz.eu>
ab319100b - 2024-02-12 - return42 <markus.heiser@darmarit.de>
9854a5a4a - 2024-02-12 - return42 <markus.heiser@darmarit.de>
ebfb23f13 - 2024-02-10 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
2024-02-16 15:48:10 +01:00
Bnyro 11c0651ef4 [fix] lingva: redirect and parsing error 2024-02-11 11:28:47 +01:00
dalf bffc4905ce Update searx.data - update_currencies.py 2024-02-10 23:55:41 +01:00
Markus Heiser bfcd41f04a [clean] drop obsolete py3.7 compatibility
- https://github.com/searxng/searxng/discussions/2356

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-10 09:27:19 +01:00
Hackurei b0fe0924a3 [feat] engine: implementation of brave goggles 2024-02-10 08:09:50 +01:00
Markus Heiser 53898b8c37 [mod] footer: i18n for the link names in the footer
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-10 08:03:43 +01:00
Bnyro 7e1b5f6cc8 [feat] footer: support for custom entries 2024-02-10 08:03:43 +01:00
dependabot[bot] 596b9b7864 Bump certifi from 2023.11.17 to 2024.2.2
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.11.17 to 2024.2.2.
- [Commits](https://github.com/certifi/python-certifi/compare/2023.11.17...2024.02.02)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-10 07:47:15 +01:00
dependabot[bot] bbe42ea81d Bump yamllint from 1.33.0 to 1.34.0
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.33.0 to 1.34.0.
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.33.0...v1.34.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-10 07:41:03 +01:00
dependabot[bot] b7740e4922 Bump flask from 3.0.1 to 3.0.2
Bumps [flask](https://github.com/pallets/flask) from 3.0.1 to 3.0.2.
- [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.1...3.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-10 07:39:58 +01:00
Markus Heiser a1c38d5965 Revert "[fix] remove certifi from requirements.txt [1]"
This reverts commit 36ae1c7034.
2024-02-10 07:32:41 +01:00
Markus Heiser 36ae1c7034 [fix] remove certifi from requirements.txt [1]
[1] https://github.com/searxng/searxng/commit/93f7f7eee2e8

forensics:

- Requirement certify was added in 35a2bc5650

- Since commit 93f7f7eee certifi is no longer needed.  Not sure why 93f7f7eee
  upgraded certifi while removing the usage of this package from the source code
  in the same commit.

Closes: https://github.com/searxng/searxng/pull/3182
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-10 07:17:56 +01:00
searxng-bot 459389a2da [translations] update from Weblate
2b940307e - 2024-02-08 - return42 <markus.heiser@darmarit.de>
e7cdce39e - 2024-02-08 - return42 <markus.heiser@darmarit.de>
171fae67d - 2024-02-08 - return42 <markus.heiser@darmarit.de>
d6a760466 - 2024-02-08 - return42 <markus.heiser@darmarit.de>
8cc4c51a9 - 2024-02-04 - return42 <markus.heiser@darmarit.de>
2e76559ba - 2024-02-04 - return42 <markus.heiser@darmarit.de>
2024-02-09 08:15:45 +01:00
Markus Heiser df1a774003 [fix] KeyError: 'title' in results using key-value.html template
Since #2508 a title is required --> this is a bug when an engine uses the
key-value.html template [1], where no title is needed.

[1] https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/key-value.html

Closes: https://github.com/searxng/searxng/issues/3130
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-06 07:53:39 +01:00
dependabot[bot] fcfff92017 Bump nose2[coverage_plugin] from 0.14.0 to 0.14.1
Bumps [nose2[coverage_plugin]](https://github.com/nose-devs/nose2) from 0.14.0 to 0.14.1.
- [Changelog](https://github.com/nose-devs/nose2/blob/main/docs/changelog.rst)
- [Commits](https://github.com/nose-devs/nose2/compare/0.14.0...0.14.1)

---
updated-dependencies:
- dependency-name: nose2[coverage_plugin]
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-03 09:41:52 +01:00
searxng-bot 11f918296f [translations] update from Weblate
a00154946 - 2024-02-01 - yuttct <yuttct@yahoo.com>
9f220b2aa - 2024-02-02 - return42 <markus.heiser@darmarit.de>
71951ae12 - 2024-02-02 - return42 <markus.heiser@darmarit.de>
a2f344a70 - 2024-02-02 - return42 <markus.heiser@darmarit.de>
0f2944179 - 2024-02-01 - return42 <markus.heiser@darmarit.de>
f0d42961f - 2024-02-01 - return42 <markus.heiser@darmarit.de>
a5cc1c6d5 - 2024-02-01 - return42 <markus.heiser@darmarit.de>
c5a39252d - 2024-02-01 - return42 <markus.heiser@darmarit.de>
fa01c9758 - 2024-02-01 - return42 <markus.heiser@darmarit.de>
51a86de3d - 2024-02-01 - return42 <markus.heiser@darmarit.de>
4a55d6d8d - 2024-02-01 - return42 <markus.heiser@darmarit.de>
3bb8adf1f - 2024-02-01 - return42 <markus.heiser@darmarit.de>
1b2e23dcb - 2024-02-01 - return42 <markus.heiser@darmarit.de>
7589d6bbc - 2024-02-01 - return42 <markus.heiser@darmarit.de>
c04d8739c - 2024-01-31 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
2024-02-02 08:18:01 +01:00
Markus Heiser be0d756ad5 [fix] libgen.fun is down, switch to libgen.rs
Closes: https://github.com/searxng/searxng/issues/3178
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-01 20:32:10 +01:00
allixx 6d31ca28b5 [fix] remove missing link icon macro 2024-02-01 08:13:43 +01:00
Hermógenes Oliveira 100a150a33 Remove rtl exception
This right-to-left exception doesn't seem to be called for.
2024-01-31 20:03:10 +01:00
Hermógenes Oliveira f9f0c2ec03 Fix media exposure toggle
Make initially hidden and the toggle button consistent.
2024-01-31 20:03:10 +01:00
Hermógenes Oliveira fa7fef7d87 Provide template for results in file category
This is used, for instance, by the recoll engine.
2024-01-31 20:03:10 +01:00
Markus Heiser ab8e5383fb [mod] remove X-XSS-Protection headers
Deprecated header not used by browsers nowadays[1]:

"""In modern browsers, X-XSS-Protection has been deprecated in favor of the
Content-Security-Policy to disable the use of inline JavaScript. Its use can
introduce XSS vulnerabilities in otherwise safe websites. This should not be
used unless you need to support older web browsers that don’t yet support CSP.
It is thus recommended to set the header as X-XSS-Protection: 0."""[2]

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
[2] https://infosec.mozilla.org/guidelines/web_security#x-xss-protection

Closes: https://github.com/searxng/searxng/issues/3171
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-31 17:23:41 +01:00
allixx dca78f920f [build] /static 2024-01-31 17:22:03 +01:00
allixx c85f706601 [fix] wrong engines padding 2024-01-31 17:22:03 +01:00
allixx 30dcaf1db6 [fix] equalize cached/proxied links left margin 2024-01-31 17:22:03 +01:00
allixx 1e03094dee [fix] justify engines/cached/proxied vertically 2024-01-31 17:22:03 +01:00
Markus Heiser c14b117121 [fix] brave.search - update result selectors to fit to new layout
Closes: https://github.com/searxng/searxng/issues/3167
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-31 16:21:56 +01:00
Bnyro efbee96b1d [feat] brave: fix empty content and parse published dates 2024-01-30 07:41:45 +01:00
Bnyro 90072eb6ff [build] /static 2024-01-29 18:09:22 +01:00
Bnyro a5decfb838 [feat] preferences: button to copy input to restore preferences hash 2024-01-29 18:09:22 +01:00
Markus Heiser a8aaf5719b [test.robot] update gecko driver / v0.34.0 required by firefox 121.*
Update gecko driver to v0.34.0 [1]

[1] https://github.com/mozilla/geckodriver/releases/tag/v0.34.0

Closes: https://github.com/searxng/searxng/issues/3141
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-29 17:37:30 +01:00
Bnyro 559b860618 [feat] engine: implementation of goodreads 2024-01-29 16:07:24 +01:00
dependabot[bot] c2f1e760a1 Bump selenium from 4.16.0 to 4.17.2
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.16.0 to 4.17.2.
- [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-01-29 15:33:35 +01:00
dependabot[bot] b3691c6421 Bump flask from 3.0.0 to 3.0.1
Bumps [flask](https://github.com/pallets/flask) from 3.0.0 to 3.0.1.
- [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.0...3.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 15:32:10 +01:00
dependabot[bot] 6d819c2879 Bump typing-extensions from 4.8.0 to 4.9.0
Bumps [typing-extensions](https://github.com/python/typing_extensions) from 4.8.0 to 4.9.0.
- [Release notes](https://github.com/python/typing_extensions/releases)
- [Changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/python/typing_extensions/compare/4.8.0...4.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 15:25:39 +01:00
searxng-bot a962aab9b0 [translations] update from Weblate
c1a3532a2 - 2024-01-23 - return42 <markus.heiser@darmarit.de>
603c6894b - 2024-01-23 - return42 <markus.heiser@darmarit.de>
2920c7342 - 2024-01-22 - Eshan-K-I <2027eiyer@tjhsst.edu>
64cc1168a - 2024-01-20 - return42 <markus.heiser@darmarit.de>
21ec41823 - 2024-01-20 - return42 <markus.heiser@darmarit.de>
2024-01-29 15:01:37 +01:00
dependabot[bot] 7f025a421b Bump sphinx-tabs from 3.4.4 to 3.4.5
Bumps [sphinx-tabs](https://github.com/executablebooks/sphinx-tabs) from 3.4.4 to 3.4.5.
- [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.4...v3.4.5)

---
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-01-29 15:00:06 +01:00
dependabot[bot] 74e28a570a Bump sphinx-issues from 3.0.1 to 4.0.0
Bumps [sphinx-issues](https://github.com/sloria/sphinx-issues) from 3.0.1 to 4.0.0.
- [Commits](https://github.com/sloria/sphinx-issues/compare/3.0.1...4.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-01-29 14:51:43 +01:00
dalf 62fa85287a Update searx.data - update_wikidata_units.py 2024-01-29 14:04:24 +01:00
dalf 0ed7548d83 Update searx.data - update_firefox_version.py 2024-01-29 14:04:03 +01:00
dalf d763934a7a Update searx.data - update_ahmia_blacklist.py 2024-01-29 14:03:03 +01:00
dalf 14f73ef3d9 Update searx.data - update_engine_traits.py 2024-01-29 14:02:30 +01:00
dalf a393341403 Update searx.data - update_engine_descriptions.py 2024-01-29 13:34:12 +01:00
allixx e4cf0a7d4f [fix] do highlight replacement at once
Highlights all search queries in search result in one go.

Fixes the case where search query contains word from highlight HTML code,
which causes broken HTML to appear in search results.

Closes #3057
2024-01-29 13:15:37 +01:00
Bnyro 8c73aa772b [fix] semantic scholar: bad request 2024-01-25 06:12:08 +01:00
dependabot[bot] 047c7a7cf6 Bump splinter from 0.20.1 to 0.21.0
Bumps [splinter](https://github.com/cobrateam/splinter) from 0.20.1 to 0.21.0.
- [Release notes](https://github.com/cobrateam/splinter/releases)
- [Changelog](https://github.com/cobrateam/splinter/blob/master/docs/news.rst)
- [Commits](https://github.com/cobrateam/splinter/compare/0.20.1...0.21.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 12:11:10 +01:00
searxng-bot ab5d2f32bb [translations] update from Weblate
0f8246b81 - 2024-01-17 - return42 <markus.heiser@darmarit.de>
ce23e8ce9 - 2024-01-16 - return42 <markus.heiser@darmarit.de>
1112731cb - 2024-01-17 - return42 <markus.heiser@darmarit.de>
2024-01-19 08:29:29 +01:00
Émilien (perso) 7c80807bb8
Block HeadlessChrome (#3116) 2024-01-17 09:14:36 +01:00
Jinyuan Huang 9c5f9735cf [fix] engine: safesearch parameter in Google Videos engine (#2762)
Closes: https://github.com/searxng/searxng/issues/2762
2024-01-16 15:29:09 +01:00
Markus Heiser 8762863ebf [mod] presearch: set WEB timeout to 4sec & single network for all request
timeout: 4.0
  The timeout of presearch-WEB is left up from the default of 3sec to 4sec.  The
  engine has to send two HTTP requests, they often exceed the default timeout of
  3sec. Since all other presearch categories (images, videos, news) also have a
  timeout of 4 sec, the WEB search should also have the same timeout.

network: presearch
  Place all HTTP requests in the same network, named ``presearch``.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-15 19:23:26 +01:00
Markus Heiser e560d7e373 [mod] presearch: add language & region support
In Presearch there are languages for the UI and regions for narrowing down the
search.  With this change the SearXNG engine supports a search by region.  The
details can be found in the documentation of the source code.

To test, you can search terms like::

   !presearch bmw :zh-TW
   !presearch bmw :en-CA

1. You should get results corresponding to the region (Taiwan, Canada)
2. and in the language (Chinese, Englisch).
3. The context in info box content is in the same language.

Exceptions:

1. Region or language is not supported by Presearch or
2. SearXNG user did not selected a region tag, example::

    !presearch bmw :en

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-15 19:23:26 +01:00
Markus Heiser a2c269bbac [mod] presearch: hardening engine's response against KeyErrors
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-15 19:23:26 +01:00
Bnyro 0a78f59aba [fix] presearch: safesearch, time ranges, crash when no result found 2024-01-15 19:23:26 +01:00
Markus Heiser 87f18b98ec [fix] SyntaxWarning: invalid escape sequence '\>'
This patch fixes issue reported by ``make test.unit``::

   searx/search/checker/impl.py:39: SyntaxWarning: invalid escape sequence '\>'
      rep = ['<' + tag + '[^\>]*>' for tag in HTML_TAGS]

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-15 18:27:21 +01:00
searxng-bot b0b2efdc8d [translations] update from Weblate
3dafa37f3 - 2024-01-10 - return42 <markus.heiser@darmarit.de>
a641db83f - 2024-01-10 - Rick1029 <yoshibear1029@gmail.com>
a3d2b083f - 2024-01-08 - johnmartzbuntia <johnmartibuntia@jmtb.xyz>
b6dec1f75 - 2024-01-08 - return42 <markus.heiser@darmarit.de>
eb76d8b8d - 2024-01-09 - Rick1029 <yoshibear1029@gmail.com>
2024-01-13 09:33:41 +01:00
dependabot[bot] a19028bd90 Bump lxml from 5.0.0 to 5.1.0
Bumps [lxml](https://github.com/lxml/lxml) from 5.0.0 to 5.1.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.0.0...lxml-5.1.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-01-12 10:28:26 +01:00
dependabot[bot] 065e95cd05 Bump jinja2 from 3.1.2 to 3.1.3
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [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.2...3.1.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 09:29:59 +01:00
Markus Heiser 54a6626582 [fix] issues reported by shellcheck v0.9.0
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-09 16:31:19 +01:00
Markus Heiser f9c5727ddc [mod] get rid of ./utils/brand.env and its workflow
All the environments defined in ./utils/brand.env are generated on the fly, so
there is no longer a need to define the brand environment in this file and all
the workflows to handle this file.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-09 16:31:19 +01:00
Alexandre Flament 60bc5baea3 [mod] ./utils/get_setting.py tiny YAML parser for settings.yml
This allow to read settings on the fly even without virtualenv.  The ultimate
goal of the commit is to remove utils/brand.env from the git repository.

The code includes a tiny yaml parser that **should** be good enough.  The code
read searx/settings.yml directly (and ignore the environment variables).

yq [1] is a more reliable alternative but this require to download a binary from
github which is not great.

[1] https://github.com/mikefarah/yq/#install
2024-01-09 16:31:19 +01:00
Bnyro 3dea7e609b [feat] autocompleter: implementation of stract (beta) 2024-01-07 11:18:16 +01:00
Bnyro 621e1313af [feat] engine: implementation of stract (beta) 2024-01-07 11:18:16 +01:00
dependabot[bot] 2f7c800f6f Bump lxml from 4.9.4 to 5.0.0
Bumps [lxml](https://github.com/lxml/lxml) from 4.9.4 to 5.0.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-4.9.4...lxml-5.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-06 16:26:05 +01:00
Myzel394 55568051d4 fix(docs): Fix development quickstart url 2024-01-06 16:20:38 +01:00
searxng-bot c90dc201fc [translations] update from Weblate
a04e3b59c - 2024-01-02 - return42 <markus.heiser@darmarit.de>
a4d387847 - 2024-01-02 - return42 <markus.heiser@darmarit.de>
80521c1b3 - 2024-01-02 - return42 <markus.heiser@darmarit.de>
e90952815 - 2024-01-02 - return42 <markus.heiser@darmarit.de>
2debd5992 - 2023-12-29 - alextecplayz <alextec70@outlook.com>
c4d54c3e5 - 2023-12-29 - alexgabi <alexgabi@disroot.org>
1a0c9c025 - 2023-12-29 - SecularSteve <fairfull.playing@gmail.com>
dc99d1390 - 2023-12-29 - ETRB <codeberg-cm58mk@r.acmrb.uk>
477e01149 - 2023-12-29 - SecularSteve <fairfull.playing@gmail.com>
65dacdd30 - 2023-12-29 - staram <gritty.year0043@fastmail.com>
6a20c8853 - 2023-12-29 - SecularSteve <fairfull.playing@gmail.com>
2024-01-06 16:20:13 +01:00
Émilien (perso) 3535377c9a Searx to SearXNG change error message 2023-12-31 16:19:14 +01:00
searxng-bot 27e26b3d65 [translations] update from Weblate
966bbd849 - 2023-12-29 - staram <gritty.year0043@fastmail.com>
d4680cb39 - 2023-12-29 - 1024mb <aberetta@protonmail.com>
b2cf5fbaf - 2023-12-27 - Linuks <linuks@skiff.com>
fa8654087 - 2023-12-27 - tentsbet <remendne@pentrens.jp>
fc759fe0b - 2023-12-27 - Linerly <linerly@protonmail.com>
cf9b03bfd - 2023-12-27 - return42 <markus.heiser@darmarit.de>
03bd73400 - 2023-12-27 - Linerly <linerly@protonmail.com>
88ffa01ec - 2023-12-27 - return42 <markus.heiser@darmarit.de>
736c44d3f - 2023-12-25 - err_connection_closed <err_connection_closed@users.noreply.translate.codeberg.org>
dd3a15279 - 2023-12-26 - ghose <correo@xmgz.eu>
fd68404ee - 2023-12-26 - return42 <markus.heiser@darmarit.de>
941e60232 - 2023-12-23 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
41dfd42d7 - 2023-12-23 - mittwerk <w0o0y8jt@duck.com>
1ca048b0b - 2023-12-23 - Fjuro <ifjuro@proton.me>
2023-12-29 08:48:24 +01:00
dalf 4647981419 Update searx.data - update_wikidata_units.py 2023-12-29 06:09:04 +01:00
dalf a8cc101c35 Update searx.data - update_ahmia_blacklist.py 2023-12-29 06:08:35 +01:00
dalf 59a67f30c8 Update searx.data - update_firefox_version.py 2023-12-29 06:07:46 +01:00
dalf 81e8638de0 Update searx.data - update_currencies.py 2023-12-29 06:06:51 +01:00
Markus Heiser d676ae8ab3 [build] /static 2023-12-28 19:15:04 +01:00
Jinyuan Huang f6d797ef43 [fix] fix a display problem in the image detail preview. 2023-12-28 19:15:04 +01:00
Markus Heiser 0d47322ac8 [build] /static 2023-12-28 18:59:14 +01:00
ahmad-alkadri 07e846e91a Prevent default browser behavior on click event 2023-12-28 18:59:14 +01:00
Markus Heiser 8dfc1dbc5c [fix] engine - offical URL moved to https://lingva.thedaviddelta.com/
The ML top-level domain has been removed from Freenom ... moved the official
instance to https://lingva.thedaviddelta.com  [1]

To test use translation syntax:

    !lv en-de Alternative front-end for Google Translate

[1] https://fosstodon.org/@thedaviddelta/111376540936289966

Closes: https://github.com/searxng/searxng/issues/2718
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-25 09:57:35 +01:00
Markus Heiser 2863b0f6da Update searx.data - update_engine_traits.py
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-24 08:28:32 +01:00
Markus Heiser 6df922b9da [fix] fetch_traits of google and zlibrary
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-24 08:28:32 +01:00
Bnyro d6ac2b5a55 [feat] engine: implementation of bahnhof.de 2023-12-23 17:38:38 +01:00
Markus Heiser 6129b16165 [mod] simplify no results on pages > 1 to "There are no more results."
BTW: remove not needed whitespaces in the generated HTML

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-23 09:50:39 +01:00
obfuscated-loop 2179a418c4 [mod] Change no results error message based on page number 2023-12-23 09:50:39 +01:00
Jay b4de72a96f [mod] Capitalize theme names/styles in theme.html view file 2023-12-23 09:07:08 +01:00
Markus Heiser 91737f719a [mod] nodejs v16 reaached EOL / upgrade to v20.10
[1] https://nodejs.org/en/about/previous-releases

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-23 07:49:03 +01:00
dependabot[bot] 26737fda1b Bump sharp from 0.32.6 to 0.33.0 in /searx/static/themes/simple
Bumps [sharp](https://github.com/lovell/sharp) from 0.32.6 to 0.33.0.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Changelog](https://github.com/lovell/sharp/blob/main/docs/changelog.md)
- [Commits](https://github.com/lovell/sharp/compare/v0.32.6...v0.33.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-23 07:49:03 +01:00
Markus Heiser 3665b32aff Revert "[fix] update user agent"
This reverts commit 3c6549a17f.

Related:

- https://github.com/searxng/searxng/pull/2826
2023-12-23 07:48:38 +01:00
searxng-bot 518dd97c89 [translations] update from Weblate
fc2dfc108 - 2023-12-21 - return42 <markus.heiser@darmarit.de>
3938cfbac - 2023-12-21 - return42 <markus.heiser@darmarit.de>
7b7286fba - 2023-12-21 - return42 <markus.heiser@darmarit.de>
1d066d218 - 2023-12-20 - sriramsekar <srirams_24@yahoo.com>
2023-12-23 07:40:02 +01:00
dependabot[bot] 2e52d06d18 Bump babel from 2.13.1 to 2.14.0
Bumps [babel](https://github.com/python-babel/babel) from 2.13.1 to 2.14.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.13.1...v2.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-23 07:39:26 +01:00
dependabot[bot] ed085a38bd Bump pylint from 3.0.2 to 3.0.3
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.0.2...v3.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-23 07:31:57 +01:00
dependabot[bot] 2136c978ff Bump lxml from 4.9.3 to 4.9.4
Bumps [lxml](https://github.com/lxml/lxml) from 4.9.3 to 4.9.4.
- [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-4.9.3...lxml-4.9.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-23 07:30:50 +01:00
Bnyro 8a4104b992 [feat] engine: implementation of rotten tomatoes 2023-12-11 18:59:36 +01:00
Bnyro dda74fc9c9 [feat] engine: implementation of mdn 2023-12-11 18:57:40 +01:00
Bnyro b5b81c9806 [feat] engine: implementation of fyyd 2023-12-11 18:56:32 +01:00
Bnyro 527e13ab46 [feat] engine: implementation of podcastindex.org 2023-12-11 18:55:16 +01:00
Bnyro 3bc85c511c [mod] tootfinder: implement python module 2023-12-11 18:54:24 +01:00
Brock Vojkovic 0bcff32dd7 [fix] update check.searx.space IP addresses 2023-12-11 15:21:02 +01:00
dependabot[bot] 8effefa8db Bump selenium from 4.15.2 to 4.16.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.15.2 to 4.16.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits/selenium-4.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-10 19:26:02 +01:00
searxng-bot 574ed29d3e [translations] update from Weblate
fa2970d07 - 2023-12-08 - return42 <markus.heiser@darmarit.de>
f19144327 - 2023-12-07 - artnay <jiri.gronroos@iki.fi>
110f1b4db - 2023-12-05 - Ivan Gabaldon <admin@inetol.net>
c791e0c81 - 2023-12-07 - APoniatowski <adam@poniatowski.dev>
1f45cc83a - 2023-12-04 - akwceles <abadcopovisamuel@gmail.com>
5f93c2a39 - 2023-12-04 - return42 <markus.heiser@darmarit.de>
0d735b7aa - 2023-12-04 - return42 <markus.heiser@darmarit.de>
9cad06b09 - 2023-12-04 - akwceles <abadcopovisamuel@gmail.com>
97554eaa2 - 2023-12-03 - kirisameSoup <kirisoup@skiff.com>
2f4e19946 - 2023-12-03 - kirisameSoup <kirisoup@skiff.com>
d1dac8b5b - 2023-12-01 - Luna <github@luwuna.gay>
5c57f6eb5 - 2023-12-01 - return42 <markus.heiser@darmarit.de>
4e3908a20 - 2023-12-01 - return42 <markus.heiser@darmarit.de>
4d2b58e40 - 2023-12-01 - return42 <markus.heiser@darmarit.de>
43a40da4d - 2023-12-01 - return42 <markus.heiser@darmarit.de>
89f08502e - 2023-12-01 - return42 <markus.heiser@darmarit.de>
2023-12-08 08:42:24 +01:00
Markus Heiser 3829c253ff [mod] add option max_page to bing, brave, qwant, startpage & mojeek
[1] https://github.com/searxng/searxng/issues/2982#issuecomment-1808975780

Reported-by: @Damaj301damaj-lol [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-03 13:47:17 +01:00
Markus Heiser 2274d55d5a [mod] add option max_page
Related: https://github.com/searxng/searxng/issues/2982
Closes: https://github.com/searxng/searxng/issues/2972

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-03 13:47:17 +01:00
dependabot[bot] 1e0813fd3a Bump redis from 4.6.0 to 5.0.1
Bumps [redis](https://github.com/redis/redis-py) from 4.6.0 to 5.0.1.
- [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/v4.6.0...v5.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-03 13:31:02 +01:00
dalf 5a72977efa Update searx.data - update_currencies.py 2023-11-29 06:34:25 +01:00
dalf b18bef17a7 Update searx.data - update_engine_descriptions.py 2023-11-29 06:24:03 +01:00
dalf a136b0b44d Update searx.data - update_ahmia_blacklist.py 2023-11-29 06:18:21 +01:00
dalf 3ca84cb8d7 Update searx.data - update_wikidata_units.py 2023-11-29 06:17:32 +01:00
Coccocoa's Helper a85274eff5 Change the brand.env file to the original state 2023-11-28 09:31:54 +01:00
Bnyro bf75a8c2a0 [feat] engine: implementation of bpb 2023-11-27 16:46:41 +01:00
Bnyro 04cfce2eb8 [feat] yep: support for images and news (and safesearch) 2023-11-27 15:07:26 +01:00
Markus Heiser ee2675c999 [update] make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-27 14:43:43 +01:00
dependabot[bot] f23948eecc Bump pygments from 2.16.1 to 2.17.2
Bumps [pygments](https://github.com/pygments/pygments) from 2.16.1 to 2.17.2.
- [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.16.1...2.17.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 14:43:43 +01:00
dependabot[bot] a18761662a Bump certifi from 2023.7.22 to 2023.11.17
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.7.22 to 2023.11.17.
- [Commits](https://github.com/certifi/python-certifi/compare/2023.07.22...2023.11.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 14:39:03 +01:00
dependabot[bot] e06c720820 Bump splinter from 0.19.0 to 0.20.1
Bumps [splinter](https://github.com/cobrateam/splinter) from 0.19.0 to 0.20.1.
- [Release notes](https://github.com/cobrateam/splinter/releases)
- [Changelog](https://github.com/cobrateam/splinter/blob/master/docs/news.rst)
- [Commits](https://github.com/cobrateam/splinter/compare/0.19.0...0.20.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 14:34:38 +01:00
Markus Heiser 44392bd436 [mod] improve implementation of presearch engine
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-27 14:16:42 +01:00
Bnyro 23582aac5c [feat] implementation of presearch engine 2023-11-27 14:16:42 +01:00
obfuscated-loop 99fb565b39 [mod] Retain page numbers even when there are no results 2023-11-27 14:07:04 +01:00
Bnyro c3cc24be12 [feat] engine: implementation of destatis 2023-11-27 13:54:48 +01:00
searxng-bot a36eae1d68 [translations] update from Weblate
d0511fe50 - 2023-11-22 - return42 <markus.heiser@darmarit.de>
e5d09a011 - 2023-11-21 - 0que <0que@users.noreply.translate.codeberg.org>
111634b33 - 2023-11-21 - return42 <markus.heiser@darmarit.de>
29df37609 - 2023-11-21 - return42 <markus.heiser@darmarit.de>
bb415aca1 - 2023-11-21 - RTRedreovic <RTRedreovic@users.noreply.translate.codeberg.org>
4b05dce9f - 2023-11-21 - return42 <markus.heiser@darmarit.de>
2f730019b - 2023-11-20 - return42 <markus.heiser@darmarit.de>
389a46a05 - 2023-11-19 - alextecplayz <alextec70@outlook.com>
2620f6911 - 2023-11-20 - return42 <markus.heiser@darmarit.de>
716d7001d - 2023-11-20 - return42 <markus.heiser@darmarit.de>
30f17f24c - 2023-11-20 - return42 <markus.heiser@darmarit.de>
b7c4062e2 - 2023-11-19 - RTRedreovic <RTRedreovic@users.noreply.translate.codeberg.org>
7ba200bc5 - 2023-11-18 - Azharjan <alexander.um.edu@gmail.com>
2023-11-27 07:32:05 +01:00
obfuscated-loop cc6058057d [build] /static 2023-11-23 07:30:56 +01:00
obfuscated-loop 355d2dc678 [fix] Remove anchor tag outline in image results 2023-11-23 07:30:56 +01:00
searxng-bot e99ebb3dec [translations] update from Weblate
e245d1bd0 - 2023-11-16 - return42 <markus.heiser@darmarit.de>
8ee33fca3 - 2023-11-16 - return42 <markus.heiser@darmarit.de>
1c8c1557c - 2023-11-16 - return42 <markus.heiser@darmarit.de>
925c63f41 - 2023-11-16 - return42 <markus.heiser@darmarit.de>
15908183b - 2023-11-14 - return42 <markus.heiser@darmarit.de>
dd57115ef - 2023-11-12 - return42 <markus.heiser@darmarit.de>
9db7544d8 - 2023-11-11 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
23ce4d1f2 - 2023-11-12 - return42 <markus.heiser@darmarit.de>
902b8bafd - 2023-11-13 - tentsbet <remendne@pentrens.jp>
2350f4a05 - 2023-11-13 - ghose <correo@xmgz.eu>
10e6293fd - 2023-11-11 - gallegonovato <fran-carro@hotmail.es>
477881443 - 2023-11-13 - return42 <markus.heiser@darmarit.de>
556b2f611 - 2023-11-13 - Fjuro <ifjuro@proton.me>
3133818f8 - 2023-11-12 - return42 <markus.heiser@darmarit.de>
2023-11-22 09:43:45 +01:00
Paul Braeuning b3d29cb86d
Merge pull request #3006 from BernieHuang2008/fix-3003
fix: [BUG] Images cannot be clicked anymore
2023-11-14 16:11:29 +01:00
Jinyuan Huang 3601badd84 [build] /static 2023-11-14 13:34:44 +01:00
Jinyuan Huang 903449e0b5 [fix] Images cannot be clicked anymore #3006
URL in sidedbar only exists in HTTP POST requests.  On HTTP GET requests the
selector ``#search_url button#copy_url`` results in a ``null`` type and a
``.style.display`` raises::

   Uncaught TypeError: d.querySelector(...) is null

As a result, the initialization of the event handler is no longer carried out.

Closes: https://github.com/searxng/searxng/issues/3003
Suggested-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-14 13:28:50 +01:00
Markus Heiser 76b91a3ef6 [dev] manage runtime versions with asdf
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-12 20:54:57 +01:00
searxng-bot 79db70f2b7 [translations] update from Weblate
2b7f195db - 2023-11-09 - proton-penguin <cgshyuankai@proton.me>
411951c72 - 2023-11-09 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
878199f48 - 2023-11-06 - RTRedreovic <RTRedreovic@users.noreply.translate.codeberg.org>
512f9981a - 2023-11-05 - return42 <markus.heiser@darmarit.de>
adcaeb0c6 - 2023-11-05 - return42 <markus.heiser@darmarit.de>
acc01d46d - 2023-11-05 - return42 <markus.heiser@darmarit.de>
32f1dd13c - 2023-11-05 - RTRedreovic <RTRedreovic@users.noreply.translate.codeberg.org>
aafe161aa - 2023-11-03 - quenty_occitania <quentinantonin@free.fr>
c910601c9 - 2023-11-03 - return42 <markus.heiser@darmarit.de>
2023-11-12 20:54:35 +01:00
dependabot[bot] 6368f845c5 Bump yamllint from 1.32.0 to 1.33.0
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.32.0 to 1.33.0.
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.32.0...v1.33.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-12 20:52:09 +01:00
dependabot[bot] 3c1725bc9e Bump selenium from 4.15.1 to 4.15.2
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.15.1 to 4.15.2.
- [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>
2023-11-12 20:51:32 +01:00
dependabot[bot] db7abeee06 Bump fasttext-predict from 0.9.2.1 to 0.9.2.2
Bumps [fasttext-predict](https://github.com/searxng/fasttext-predict) from 0.9.2.1 to 0.9.2.2.
- [Release notes](https://github.com/searxng/fasttext-predict/releases)
- [Commits](https://github.com/searxng/fasttext-predict/compare/v0.9.2.1...v0.9.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-12 20:50:56 +01:00
Alexandre Flament bd3f526859
Docker: add UWSGI_WORKERS and UWSGI_THREAD environment variables (#2992)
* Docker: add UWSGI_WORKERS and UWSGI_THREAD.

UWSGI_WORKERS specifies the number of process.
UWSGI_THREADS specifies the number of threads.

The Docker convention is to specify the whole configuration
through environment variables. While not done in SearXNG, these two
additional variables allows admins to skip uwsgi.ini

In additional, https://github.com/searxng/preview-environments starts Docker
without additional files through searxng-helm-chat.
Each instance consumes 1Go of RAM which is a lot especially when there are a
lot of instances / pull requests.

* [scripts] add environments UWSGI_WORKERS and UWSGI_THREADS

- UWSGI_WORKERS specifies the number of process.
- UWSGI_THREADS specifies the number of threads.

Templates for uwsgi scripts can be tested by::

    UWSGI_WORKERS=8 UWSGI_THREADS=9 \
      ./utils/searxng.sh --cmd\
      eval "echo \"$(cat utils/templates/etc/uwsgi/*/searxng.ini*)\""\
      | grep "workers\|threads"

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

---------

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-12 16:46:34 +00:00
Paul Braeuning 7b1951aa97
Merge pull request #2835 from BernieHuang2008/auto-copy
[feature] added a "copy" button in `search url` sidebar.
2023-11-11 16:19:58 +01:00
Jinyuan Huang 727de1c4ef [build] /static 2023-11-10 13:28:28 +00:00
Jinyuan Huang 8adc7b0433 add a "copy" button to the "search-url" sidebar 2023-11-10 13:28:04 +00:00
searxng-bot 96ccec1aa6 [translations] update from Weblate
acdcdace8 - 2023-11-01 - Ivan Gabaldon <admin@inetol.net>
31a1602a9 - 2023-10-29 - return42 <markus.heiser@darmarit.de>
a1d1070d3 - 2023-10-29 - return42 <markus.heiser@darmarit.de>
2023-11-03 10:01:28 +01:00
dependabot[bot] dd0ccd7904 Bump selenium from 4.14.0 to 4.15.1
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.14.0 to 4.15.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>
2023-11-03 10:00:54 +01:00
dependabot[bot] baef837eb6 Bump linuxdoc from 20230827 to 20231020
Bumps [linuxdoc](https://github.com/return42/linuxdoc) from 20230827 to 20231020.
- [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>
2023-11-03 09:59:06 +01:00
Markus Heiser b5a8ddfec8
Revert "[fix] limit maximum page number of a search query to page 50." (#2979)
This reverts commit 7e2e335dd1.
2023-11-01 16:55:20 +00:00
Markus Heiser d13a8f6453 [mod] document server:public_instance & remove it out of the botdetection
- the option server:public_instance lacks some documentation
- the processing of this option belongs in the limiter and not
  in botdetection module

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-01 06:44:56 +01:00
Markus Heiser fd814aac86 [mod] isolation of botdetection from the limiter
This patch was inspired by the discussion around PR-2882 [2].  The goals of this
patch are:

1. Convert plugin searx.plugin.limiter to normal code [1]
2. isolation of botdetection from the limiter [2]
3. searx/{tools => botdetection}/config.py and drop searx.tools
4. in URL /config, 'limiter.enabled' is true only if the limiter is really
   enabled (Redis is available).

This patch moves all the code that belongs to botdetection into namespace
searx.botdetection and code that belongs to limiter is placed in namespace
searx.limiter.

Tthe limiter used to be a plugin at some point botdetection was added, it was
not a plugin.  The modularization of these two components was long overdue.
With the clear modularization, the documentation could then also be organized
according to the architecture.

[1] https://github.com/searxng/searxng/pull/2882
[2] https://github.com/searxng/searxng/pull/2882#issuecomment-1741716891

To test:

- check the app works without the limiter, check `/config`
- check the app works with the limiter and with the token, check `/config`
- make docs.live .. and read
  - http://0.0.0.0:8000/admin/searx.limiter.html
  - http://0.0.0.0:8000/src/searx.botdetection.html#botdetection

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-01 06:44:56 +01:00
sev b05a15540e Check `public_instance` in simple theme
Fix #2975
2023-10-31 10:40:19 +01:00
Markus Heiser 7e2e335dd1 [fix] limit maximum page number of a search query to page 50.
To test this PR run a local instance and try to query page 51:

    http://127.0.0.1:8888/search?q=foo&pageno=51

A parameter exception will be raised:

    searx.exceptions.SearxParameterException: Invalid value "51" for parameter pageno

And the client will receive a HTTP 400 (Bad request).

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-29 16:17:25 +01:00
Alexandre Flament 9aeae2142b Add support for Python 3.12 2023-10-29 11:25:58 +01:00
dalf b63841f0a1 Update searx.data - update_engine_traits.py 2023-10-29 09:04:24 +01:00
dependabot[bot] 12a83b8cb3 Bump babel from 2.13.0 to 2.13.1
Bumps [babel](https://github.com/python-babel/babel) from 2.13.0 to 2.13.1.
- [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.13.0...v2.13.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 09:03:43 +01:00
dependabot[bot] 15c8301e52 Bump sphinx-tabs from 3.4.1 to 3.4.4
Bumps [sphinx-tabs](https://github.com/executablebooks/sphinx-tabs) from 3.4.1 to 3.4.4.
- [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.1...v3.4.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 08:58:07 +01:00
dependabot[bot] cf605cf899 Bump uvloop from 0.18.0 to 0.19.0
Bumps [uvloop](https://github.com/MagicStack/uvloop) from 0.18.0 to 0.19.0.
- [Release notes](https://github.com/MagicStack/uvloop/releases)
- [Commits](https://github.com/MagicStack/uvloop/compare/v0.18.0...v0.19.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 08:54:32 +01:00
dalf a9d778ee0f Update searx.data - update_wikidata_units.py 2023-10-29 08:45:15 +01:00
dalf 92efb941d8 Update searx.data - update_firefox_version.py 2023-10-29 08:44:59 +01:00
dalf fa494b9be3 Update searx.data - update_currencies.py 2023-10-29 08:44:35 +01:00
dalf 1b92ea4e70 Update searx.data - update_engine_descriptions.py 2023-10-29 08:44:17 +01:00
dalf 55e7cb3e33 Update searx.data - update_ahmia_blacklist.py 2023-10-29 08:17:29 +01:00
dependabot[bot] dbe94f111a Bump pylint from 3.0.1 to 3.0.2
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.0.1...v3.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 10:47:10 +02:00
searxng-bot 6af8644ead [translations] update from Weblate
4e5e5db44 - 2023-10-26 - quenty_occitania <quentinantonin@free.fr>
e1a8d3508 - 2023-10-26 - quenty_occitania <quentinantonin@free.fr>
84bddfb89 - 2023-10-26 - return42 <markus.heiser@darmarit.de>
d67a4114d - 2023-10-26 - quenty_occitania <quentinantonin@free.fr>
62fe8e328 - 2023-10-26 - return42 <markus.heiser@darmarit.de>
6e37ab975 - 2023-10-26 - quenty_occitania <quentinantonin@free.fr>
2cdab3247 - 2023-10-25 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
cf7ea7234 - 2023-10-23 - clsty <celestial.y@outlook.com>
0ea313893 - 2023-10-23 - return42 <markus.heiser@darmarit.de>
22151e440 - 2023-10-23 - return42 <markus.heiser@darmarit.de>
e4eaf42b6 - 2023-10-22 - clsty <celestial.y@outlook.com>
2023-10-27 09:23:23 +02:00
dependabot[bot] 526d5c7b30 Bump uvloop from 0.17.0 to 0.18.0
Bumps [uvloop](https://github.com/MagicStack/uvloop) from 0.17.0 to 0.18.0.
- [Release notes](https://github.com/MagicStack/uvloop/releases)
- [Commits](https://github.com/MagicStack/uvloop/compare/v0.17.0...v0.18.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-22 11:01:41 +02:00
Markus Heiser ef56e1d684 [fix] HTMLParser: undocumented not implemented method
In python versions <py3.10 there is an issue with an undocumented method
HTMLParser.error() [1][2] that was deprecated in Python 3.4 and removed
in Python 3.5.

To be compatible to higher versions (>=py3.10) an error method is implemented
which throws an AssertionError exception like the higher Python versions do [3].

[1] https://github.com/python/cpython/issues/76025
[2] https://bugs.python.org/issue31844
[3] https://github.com/python/cpython/pull/8562

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-22 10:35:02 +02:00
searxng-bot 01b5b9cb8e [translations] update from Weblate
2325f1583 - 2023-10-20 - return42 <markus.heiser@darmarit.de>
5090c6a8e - 2023-10-18 - return42 <markus.heiser@darmarit.de>
3a38219d8 - 2023-10-18 - return42 <markus.heiser@darmarit.de>
94a9f4164 - 2023-10-16 - return42 <markus.heiser@darmarit.de>
bdbeb4b30 - 2023-10-16 - return42 <markus.heiser@darmarit.de>
f9b483f48 - 2023-10-16 - return42 <markus.heiser@darmarit.de>
7f1ca1997 - 2023-10-16 - return42 <markus.heiser@darmarit.de>
c5a701dc4 - 2023-10-14 - alexgabi <alexgabi@disroot.org>
2023-10-20 10:44:11 +02:00
Markus Heiser b013cbb4cc [build] /static 2023-10-13 12:56:29 +02:00
Bnyro df2e41c150 [fix] search.js: crash on homepage when setting form listeners 2023-10-13 12:56:29 +02:00
Markus Heiser 70521339d9 [fix] black --exclude option is a regular expression
When ``searx/static/themes/simple/node_modules`` are installed the test from
black runs into this path / Error::

    $ make test
    TEST      [yamllint] $YAMLLINT_FILES
    TEST      [black] $BLACK_TARGETS
    --- searx/static/themes/simple/node_modules/flatted/python/test.py	2023-10-13 10:09:50.460026 +0000
    +++ searx/static/themes/simple/node_modules/flatted/python/test.py	2023-10-13 10:10:04.974335 +0000
    @@ -1,9 +1,11 @@
    from flatted import stringify as _stringify, parse
    ...

black --exclude option is not a comma separated list, its a regular expression /
see:

    $ black --help
    ...
    --exclude TEXT   A regular expression that matches files and
                     directories that should be excluded on recursive
                     searches ...

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-13 12:44:18 +02:00
dependabot[bot] 7ee1d035bf Bump flask from 2.3.3 to 3.0.0
Bumps [flask](https://github.com/pallets/flask) from 2.3.3 to 3.0.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/2.3.3...3.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-13 11:49:17 +02:00
Émilien (perso) 4280318fc5 fixing results parsing brave 2023-10-13 11:47:30 +02:00
dependabot[bot] 7f59b6d62e Bump flask-babel from 3.1.0 to 4.0.0
Bumps [flask-babel](https://github.com/python-babel/flask-babel) from 3.1.0 to 4.0.0.
- [Release notes](https://github.com/python-babel/flask-babel/releases)
- [Changelog](https://github.com/python-babel/flask-babel/blob/master/CHANGELOG)
- [Commits](https://github.com/python-babel/flask-babel/compare/v3.1.0...v4.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-13 09:51:30 +02:00
dependabot[bot] 32d52cd856 Bump selenium from 4.13.0 to 4.14.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.13.0 to 4.14.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.13.0...selenium-4.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-13 09:33:04 +02:00
searxng-bot ac82daf58d [translations] update from Weblate
74e401e68 - 2023-10-09 - return42 <markus.heiser@darmarit.de>
897dd8db1 - 2023-10-09 - return42 <markus.heiser@darmarit.de>
6ed046a90 - 2023-10-09 - tentsbet <remendne@pentrens.jp>
815ecb336 - 2023-10-09 - return42 <markus.heiser@darmarit.de>
65d9a0c2f - 2023-10-07 - return42 <markus.heiser@darmarit.de>
3ec249ef9 - 2023-10-07 - return42 <markus.heiser@darmarit.de>
53dc6c108 - 2023-10-07 - return42 <markus.heiser@darmarit.de>
2023-10-13 09:20:54 +02:00
Hackurei efada7cba2 [fix] hackernews keyerror problem 2023-10-13 08:16:47 +02:00
Hackurei af071121de [fix] imgur - incorrect wikidata id 2023-10-12 09:14:00 +02:00
Markus Heiser 14323d683f [fix] ddg-lite & ddg-extra: don't send empty vqd value
DDG's bot detection is sensitive to the vqd value.  For some search terms (such
as extremely long search terms that are often sent by bots), no vqd value can be
determined.

If SearXNG cannot determine a vqd value, then no request should go out to
DDG (WEB): a request with a wrong vqd value leads to DDG temporarily putting
SearXNG's IP on a block list.

Requests from IPs in this block list run into timeouts.

Not sure, but it seems the block list is a sliding window: to get my IP rid from
the bot list I had to cool down my IP for 1h (send no requests from that IP to
DDG).

Since such issues can't reproduce in a local instance I tested this patch 24h on
my public SearXNG instance: There are still errors (rare), but the reliability
is still 100%.

Related:

- https://github.com/searxng/searxng/pull/2922
- https://github.com/searxng/searxng/pull/2923

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-12 08:52:28 +02:00
Umut Ucak 24561370b7 readme typo 2023-10-11 06:19:31 +02:00
Markus Heiser 3388441917 [fix] ddg-lite vqd value: some search terms do not have a vqd value
Some search terms do not have results and therefore no vqd value

BTW: remove a leftover from 9197efa

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-10 09:12:30 +02:00
Markus Heiser 9197efa2a7 [fix] duckduckgo lite engine: set HTTP header 'Referer'
We have had problems with this before, the bot protection from ddg-lite seems to
have included this referer in the rating [1][2].

From reverse engineering:

- The Referer ``https://google.com/`` was set in commt 257dc7d6c4 --> DDG lite
  does not like this referer anymore!

- The 'Referer' header is only set on second and follow up pages but not on the
  first page

- The vqd value is not needed on the first page, the ddg-lite client sets this
  value only on follow up pages / this can help to reduce the vqd requests from
  SearXNG.

Related to 'Referer' header & ddg requests:

[1] https://github.com/searxng/searxng/pull/2161
[2] https://github.com/searxng/searxng/pull/2081

Closes: https://github.com/searxng/searxng/issues/2796
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-10 08:40:53 +02:00
Bnyro fa5b2a7948 [mod] yacy: use official instance by default and fix crashes 2023-10-09 20:50:24 +02:00
Alex Balgavy 5d53aac20f [mod] add hotkeys option to settings.yml
The change in the hotkey mechanism introduced in 317db5b04 does not allow
configuration via `settings.yml`.  This commit adds that functionality.

Closes: #2898
2023-10-09 18:13:00 +02:00
Hackurei ff78b1a902 [feat] implement hackernews engine - news.ycombinator.com 2023-10-09 14:00:04 +02:00
Aine 213cb74378 [fix] matrixrooms add proper MRS integration
Related:

- https://github.com/searxng/searxng/issues/2918
2023-10-09 13:25:13 +02:00
Bnyro 48cb58bd2e [feat] duckduckgo: support for videos and news 2023-10-09 06:53:43 +02:00
Bnyro c3ab49cd90 [fix] kickass: crash when no results 2023-10-07 11:48:23 +02:00
Bnyro f22daf8b47 [mod] piped: always show video length if available 2023-10-07 11:45:46 +02:00
Bnyro ce270961e8 [feat] engine: implementation of mastodon 2023-10-06 10:58:23 +02:00
dependabot[bot] e5e3e22f7c Bump nose2[coverage_plugin] from 0.13.0 to 0.14.0
Bumps [nose2[coverage_plugin]](https://github.com/nose-devs/nose2) from 0.13.0 to 0.14.0.
- [Changelog](https://github.com/nose-devs/nose2/blob/main/docs/changelog.rst)
- [Commits](https://github.com/nose-devs/nose2/compare/0.13.0...0.14.0)

---
updated-dependencies:
- dependency-name: nose2[coverage_plugin]
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 10:29:40 +02:00
dependabot[bot] 60fecf5125 Bump setproctitle from 1.3.2 to 1.3.3
Bumps [setproctitle](https://github.com/dvarrazzo/py-setproctitle) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/dvarrazzo/py-setproctitle/releases)
- [Changelog](https://github.com/dvarrazzo/py-setproctitle/blob/master/HISTORY.rst)
- [Commits](https://github.com/dvarrazzo/py-setproctitle/compare/version-1.3.2...version-1.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 10:29:12 +02:00
dependabot[bot] f7ca979c8a Bump pylint from 2.17.6 to 3.0.1
Bumps [pylint](https://github.com/pylint-dev/pylint) from 2.17.6 to 3.0.1.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v2.17.6...v3.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 10:22:57 +02:00
dependabot[bot] 4d3c4ff738 Bump babel from 2.12.1 to 2.13.0
Bumps [babel](https://github.com/python-babel/babel) from 2.12.1 to 2.13.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.12.1...v2.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 10:22:30 +02:00
searxng-bot 48f8ac48d1 [translations] update from Weblate
68d743281 - 2023-10-05 - return42 <markus.heiser@darmarit.de>
42f091b7f - 2023-10-05 - return42 <markus.heiser@darmarit.de>
2479c0d7b - 2023-10-05 - ghose <correo@xmgz.eu>
a4e6cd592 - 2023-10-05 - return42 <markus.heiser@darmarit.de>
9d4e5f5c3 - 2023-10-05 - return42 <markus.heiser@darmarit.de>
b79d44775 - 2023-10-05 - gallegonovato <fran-carro@hotmail.es>
746291184 - 2023-10-06 - return42 <markus.heiser@darmarit.de>
f24d7e8b1 - 2023-10-05 - return42 <markus.heiser@darmarit.de>
6140911f9 - 2023-10-05 - Fjuro <ifjuro@proton.me>
2023-10-06 09:19:00 +02:00
Markus Heiser fd1422a670 [mod] engine - simplify region & lang handling, make filters configurable
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-05 10:55:08 +02:00
Bnyro 3e2ae756f0 [feat] engine: implementation of radio-browser.info 2023-10-05 10:55:08 +02:00
Markus Heiser d56b31d674 [fix] limiter / botdetection: remove http_connection method
Related:

- https://github.com/searxng/searxng/issues/2892#issuecomment-1742153932

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-01 20:24:22 +02:00
Jinyuan Huang e509cb7c45 [typo] solved a typo in yahoo error message. 2023-10-01 08:29:06 +02:00
Jinyuan Huang d4d9f2073e [fix] Bug: Yahoo results for simplified Chinese search sometimes have the first character cut off #2866
Co-authored-by: Blair Noctis <n@sail.ng>
2023-10-01 08:29:06 +02:00
Alexandre Flament fb88721532 Upgrade dependencies
* geckodriver: 0.33.0
* node 16.20.2
* pyright 1.1.329
* eslint 8.50.0
2023-10-01 08:25:00 +02:00
Bnyro fe9386b58d [fix] emojipedia: fix engine 2023-10-01 08:19:45 +02:00
Markus Heiser 32a4ea350e [fix] Revision of the Bing engines
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-01 08:01:38 +02:00
jazzzooo 079636c079 [fix] engine - bing fix search, pagination, remove safesearch 2023-10-01 08:01:38 +02:00
Bnyro 5ce1792432 [feat] engine: implementation of pinterest 2023-09-30 15:01:45 +02:00
Bnyro 6096457e4d [fix] matrixrooms.info: pagination not working properly 2023-09-30 14:51:07 +02:00
Markus Heiser e1a8b8189f [fix] engine - moviepilot instead of thumbnail use img_src
Instead of thumbnail use img_src in the result item, otherwise the "movies"
categories looks clunky.

Related:

- b4e0d2eedc (r128785388)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-30 11:29:19 +02:00
Bnyro 159629c588 [mod] tagesschau: add option to only use tagesschau urls 2023-09-30 11:00:11 +02:00
Bnyro 2ca60a19fc [feat] engine: implementation of matrixrooms.info 2023-09-30 09:09:23 +02:00
Bnyro d1a3fc5be6 [feat] engine: implementation of tootfinder 2023-09-29 23:00:30 +02:00
Bnyro fc4a20f734 [mod] add movies category for tmdb, imdb and moviepilot 2023-09-29 22:37:51 +02:00
Émilien (perso) 0330648b98 [mod] warn to info for failed ping limiter 2023-09-29 22:20:56 +02:00
Bnyro 26fed56d51 [mod] settings.yml: remove plugin settings for plugins that don't exist anymore 2023-09-29 11:26:49 +02:00
dependabot[bot] 7c8a744ae1 Bump selenium from 4.12.0 to 4.13.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.12.0...selenium-4.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 10:46:52 +02:00
dependabot[bot] 81b7291613 Bump pylint from 2.17.5 to 2.17.6
Bumps [pylint](https://github.com/pylint-dev/pylint) from 2.17.5 to 2.17.6.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v2.17.5...v2.17.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 09:57:28 +02:00
searxng-bot 9a065832e0 [translations] update from Weblate
80bbf74ef - 2023-09-27 - return42 <markus.heiser@darmarit.de>
5d554ef71 - 2023-09-27 - BernieHuang2008 <berniehuang2008@163.com>
771fd1b90 - 2023-09-27 - return42 <markus.heiser@darmarit.de>
d412012c8 - 2023-09-27 - y0nei <y0nei@proton.me>
1ac171d0a - 2023-09-27 - return42 <markus.heiser@darmarit.de>
a004c40cc - 2023-09-27 - return42 <markus.heiser@darmarit.de>
47e729f89 - 2023-09-27 - return42 <markus.heiser@darmarit.de>
f85b28cc4 - 2023-09-26 - Fjuro <ifjuro@proton.me>
75ce5d581 - 2023-09-27 - return42 <markus.heiser@darmarit.de>
40ce06009 - 2023-09-24 - nonepork <ptohrek@gmail.com>
21f343f71 - 2023-09-25 - tentsbet <remendne@pentrens.jp>
4c80f80fd - 2023-09-22 - return42 <markus.heiser@darmarit.de>
ef3c859e4 - 2023-09-22 - artnay <jiri.gronroos@iki.fi>
2023-09-29 09:12:12 +02:00
dalf ae2762eb78 Update searx.data - update_firefox_version.py 2023-09-29 06:58:11 +02:00
dalf 18da3d65c5 Update searx.data - update_ahmia_blacklist.py 2023-09-29 06:57:40 +02:00
dalf 4a66fa3e7d Update searx.data - update_wikidata_units.py 2023-09-29 06:56:50 +02:00
dalf 9be6e20256 Update searx.data - update_engine_traits.py 2023-09-29 06:56:10 +02:00
dalf d821ec44dd Update searx.data - update_currencies.py 2023-09-29 06:55:04 +02:00
dalf cdee5aa3b9 Update searx.data - update_engine_descriptions.py 2023-09-29 06:53:05 +02:00
Bnyro 75587d03a6 [fix] categories.html: can't select social media category using search on category select 2023-09-28 10:45:49 +02:00
jazzzooo e37d775fa2 [fix] engine - currency fix and simplify 2023-09-28 08:29:38 +02:00
Jinyuan Huang ae28d429c9 [fix] bilibili new api used 2023-09-28 08:24:51 +02:00
jazzzooo 1a66d74673 [fix] engine - kickass update url, fix parsing, use multiple mirrors 2023-09-27 10:19:41 +02:00
Markus Heiser 0c39064d60 Update searx.data - update_engine_traits.py
Update searx.data - update_engine_traits.py

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-27 09:12:38 +02:00
Markus Heiser b428ccc5a0 [fix] engine brave - fetch traits (modified settings menu)
Brave has changed it settings menu fundamental.  Region codes are no longer in
the HTML page, we have to read the regional codes from a JS:

  https://cdn.search.brave.com/serp/v2/_app/immutable/chunks/parameters.734c106a.js

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-27 09:12:38 +02:00
Markus Heiser 3a456b1282 [fix] engine annas archive - fetch traits (modified xpath selectors)
Anna’s Archive has cleaned up their languages, available file extensions and
changed the HTML form.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-27 09:12:38 +02:00
Jinyuan Huang 1f835a9f1f solve #2839 2023-09-25 23:01:14 +02:00
Markus Heiser 51bcd95a75 [fix] harmonize default settings for caching of /static files
Caching files on the client side for more than a day can confuse the end user
when updating static files[1].

Depending on the way of providing a SearXNG instance via HTTP, there are several
ways to optimize the access to the /static files.  However, since we don't know
what optimization an admin has provided for his static files, we should have
moderate settings in the defaults that run robustly in a wide variety of
installations.

In this sense, all caches on the client side should be cleared after one day at
the latest.  So far the files were cached for one year on client side; as soon
as changes are made to the static files (with the option `static_use_hash:
true`) the old static files are kept for one year on the CLient side / which can
also be evaluated as unnecessary caching.

[1] https://github.com/searxng/searxng/discussions/2821

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-25 22:52:23 +02:00
jazzzooo 3c6549a17f [fix] update user agent 2023-09-25 22:46:22 +02:00
Emilien Devos ffec8d1b4c add warning about enabling public_instance setting 2023-09-25 22:31:14 +02:00
Emilien Devos 47721a3485 add new parameter called server.public_instance
for enabling by default advanced limiter functions
in the future allow us to add features just for the public instances
2023-09-25 22:31:14 +02:00
Jinyuan Huang 1df4588279 [build] /static 2023-09-25 17:45:21 +02:00
Jinyuan Huang 98366bcf90 [fix] settings icon invisble on mobile devices 2023-09-25 17:45:21 +02:00
Alexandre Flament 19383921d7 /config: expose limiter configuration 2023-09-24 11:01:11 +02:00
Émilien (perso) 1851f27154
[mod] remove twitter (#2843) 2023-09-24 08:32:53 +00:00
Emilien Devos 827af00d9e Revert "[mod] activate limiter & link_token method (aka CSS ping) by default"
This reverts commit 3af629ec09.
2023-09-23 14:16:29 +02:00
Markus Heiser 3af629ec09 [mod] activate limiter & link_token method (aka CSS ping) by default
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-23 14:00:03 +02:00
Markus Heiser 597c68b4aa [doc] move dosc of botdetection from developer to admin section
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-23 14:00:03 +02:00
596 changed files with 115752 additions and 70590 deletions

View File

@ -16,6 +16,9 @@ max_line_length = 119
[*.html] [*.html]
indent_size = 4 indent_size = 4
[*.js]
indent_size = 2
[*.json] [*.json]
indent_size = 4 indent_size = 4
insert_final_newline = ignore insert_final_newline = ignore

View File

@ -1,4 +1,4 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2 version: 2
updates: updates:
- package-ecosystem: "pip" - package-ecosystem: "pip"
@ -8,6 +8,9 @@ updates:
day: "friday" day: "friday"
open-pull-requests-limit: 5 open-pull-requests-limit: 5
target-branch: "master" target-branch: "master"
commit-message:
prefix: "[upd] pypi:"
- package-ecosystem: "npm" - package-ecosystem: "npm"
directory: "/searx/static/themes/simple" directory: "/searx/static/themes/simple"
schedule: schedule:
@ -15,3 +18,5 @@ updates:
day: "friday" day: "friday"
open-pull-requests-limit: 5 open-pull-requests-limit: 5
target-branch: "master" target-branch: "master"
commit-message:
prefix: "[upd] npm:"

31
.github/workflows/checker.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: "Checker"
on:
schedule:
- cron: "0 4 * * 5"
workflow_dispatch:
jobs:
checker:
name: Checker
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: |
sudo ./utils/searxng.sh install packages
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- name: Install Python dependencies
run: |
make V=1 install
- name: Checker
run: |
make search.checker

View File

@ -7,7 +7,7 @@ on:
jobs: jobs:
updateData: updateData:
name: Update data - ${{ matrix.fetch }} name: Update data - ${{ matrix.fetch }}
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
if: ${{ github.repository_owner == 'searxng'}} if: ${{ github.repository_owner == 'searxng'}}
strategy: strategy:
fail-fast: false fail-fast: false
@ -29,9 +29,9 @@ jobs:
sudo ./utils/searxng.sh install packages sudo ./utils/searxng.sh install packages
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.12'
architecture: 'x64' architecture: 'x64'
- name: Install Python dependencies - name: Install Python dependencies
@ -46,18 +46,18 @@ jobs:
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v6
with: with:
commit-message: Update searx.data - ${{ matrix.fetch }} commit-message: '[data] update searx.data - ${{ matrix.fetch }}'
committer: searxng-bot <noreply@github.com> committer: searxng-bot <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false signoff: false
branch: update_data_${{ matrix.fetch }} branch: update_data_${{ matrix.fetch }}
delete-branch: true delete-branch: true
draft: false draft: false
title: 'Update searx.data - ${{ matrix.fetch }}' title: '[data] update searx.data - ${{ matrix.fetch }}'
body: | body: |
Update searx.data - ${{ matrix.fetch }} update searx.data - ${{ matrix.fetch }}
labels: | labels: |
data data

View File

@ -16,7 +16,7 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04] os: [ubuntu-20.04]
python-version: ["3.8", "3.9", "3.10", "3.11"] python-version: ["3.9", "3.10", "3.11", "3.12",]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -25,7 +25,7 @@ jobs:
sudo ./utils/searxng.sh install packages sudo ./utils/searxng.sh install packages
sudo apt install firefox sudo apt install firefox
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
architecture: 'x64' architecture: 'x64'
@ -45,14 +45,6 @@ jobs:
make V=1 gecko.driver make V=1 gecko.driver
- name: Run tests - name: Run tests
run: make V=1 ci.test 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
themes: themes:
name: Themes name: Themes
@ -63,9 +55,9 @@ jobs:
- name: Install Ubuntu packages - name: Install Ubuntu packages
run: sudo ./utils/searxng.sh install buildhost run: sudo ./utils/searxng.sh install buildhost
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.12'
architecture: 'x64' architecture: 'x64'
- name: Cache Python dependencies - name: Cache Python dependencies
id: cache-python id: cache-python
@ -75,7 +67,7 @@ jobs:
./local ./local
./.nvm ./.nvm
./node_modules ./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: Install node dependencies - name: Install node dependencies
run: make V=1 node.env run: make V=1 node.env
- name: Build themes - name: Build themes
@ -95,9 +87,9 @@ jobs:
- name: Install Ubuntu packages - name: Install Ubuntu packages
run: sudo ./utils/searxng.sh install buildhost run: sudo ./utils/searxng.sh install buildhost
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.12'
architecture: 'x64' architecture: 'x64'
- name: Cache Python dependencies - name: Cache Python dependencies
id: cache-python id: cache-python
@ -107,7 +99,7 @@ jobs:
./local ./local
./.nvm ./.nvm
./node_modules ./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: Build documentation - name: Build documentation
run: | run: |
make V=1 docs.clean docs.html make V=1 docs.clean docs.html
@ -120,7 +112,7 @@ jobs:
FOLDER: dist/docs FOLDER: dist/docs
CLEAN: true # Automatically remove deleted files from the deploy branch CLEAN: true # Automatically remove deleted files from the deploy branch
SINGLE_COMMIT: True SINGLE_COMMIT: True
COMMIT_MESSAGE: build from commit ${{ github.sha }} COMMIT_MESSAGE: '[doc] build from commit ${{ github.sha }}'
babel: babel:
name: Update translations branch name: Update translations branch
@ -139,9 +131,9 @@ jobs:
fetch-depth: '0' fetch-depth: '0'
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }} token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.12'
architecture: 'x64' architecture: 'x64'
- name: Cache Python dependencies - name: Cache Python dependencies
id: cache-python id: cache-python
@ -151,7 +143,7 @@ jobs:
./local ./local
./.nvm ./.nvm
./node_modules ./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: weblate & git setup - name: weblate & git setup
env: env:
WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }} WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }}
@ -163,7 +155,6 @@ jobs:
- name: Update transations - name: Update transations
id: update id: update
run: | run: |
git restore utils/brand.env
make V=1 weblate.push.translations make V=1 weblate.push.translations
dockers: dockers:
@ -184,9 +175,9 @@ jobs:
# make sure "make docker.push" can get the git history # make sure "make docker.push" can get the git history
fetch-depth: '0' fetch-depth: '0'
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.12'
architecture: 'x64' architecture: 'x64'
- name: Cache Python dependencies - name: Cache Python dependencies
id: cache-python id: cache-python
@ -196,7 +187,7 @@ jobs:
./local ./local
./.nvm ./.nvm
./node_modules ./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 - name: Set up QEMU
if: env.DOCKERHUB_USERNAME != null if: env.DOCKERHUB_USERNAME != null
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1

View File

@ -16,9 +16,9 @@ jobs:
fetch-depth: '0' fetch-depth: '0'
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }} token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.12'
architecture: 'x64' architecture: 'x64'
- name: Cache Python dependencies - name: Cache Python dependencies
id: cache-python id: cache-python
@ -28,7 +28,7 @@ jobs:
./local ./local
./.nvm ./.nvm
./node_modules ./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: weblate & git setup - name: weblate & git setup
env: env:
WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }} WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }}
@ -45,15 +45,15 @@ jobs:
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v3
with: with:
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }} token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
commit-message: Update translations commit-message: '[l10n] update translations from Weblate'
committer: searxng-bot <searxng-bot@users.noreply.github.com> committer: searxng-bot <searxng-bot@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false signoff: false
branch: translations_update branch: translations_update
delete-branch: true delete-branch: true
draft: false draft: false
title: 'Update translations' title: '[l10n] update translations from Weblate'
body: | body: |
Update translations update translations from Weblate
labels: | labels: |
translation translation

3
.gitignore vendored
View File

@ -23,3 +23,6 @@ gh-pages/
.idea/ .idea/
searx/version_frozen.py searx/version_frozen.py
.dir-locals.el
.python-version

2
.nvmrc
View File

@ -1 +1 @@
v16.15.1 v20.10

View File

@ -1,4 +1,4 @@
# -*- coding: utf-8; mode: conf -*- # -*- coding: utf-8; mode: conf-unix -*-
# lint Python modules using external checkers. # lint Python modules using external checkers.
# #
# This is the main checker controlling the other ones and the reports # This is the main checker controlling the other ones and the reports
@ -27,7 +27,7 @@ ignore-patterns=
#init-hook= #init-hook=
# Use multiple processes to speed up Pylint. # Use multiple processes to speed up Pylint.
jobs=1 jobs=0
# List of plugins (as comma separated values of python modules names) to load, # List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers. # usually to register additional checkers.
@ -338,6 +338,7 @@ valid-metaclass-classmethod-first-arg=mcs
# Maximum number of arguments for function / method # Maximum number of arguments for function / method
max-args=8 max-args=8
max-positional-arguments=14
# Maximum number of attributes for a class (see R0902). # Maximum number of attributes for a class (see R0902).
max-attributes=20 max-attributes=20

2
.tool-versions Normal file
View File

@ -0,0 +1,2 @@
python 3.12.0
shellcheck 0.9.0

View File

@ -170,3 +170,7 @@ features or generally made searx better:
- @blob42 `<https://blob42.xyz>`_ - @blob42 `<https://blob42.xyz>`_
- Paolo Basso `<https://github.com/paolobasso99>` - Paolo Basso `<https://github.com/paolobasso99>`
- Bernie Huang `<https://github.com/BernieHuang2008>` - Bernie Huang `<https://github.com/BernieHuang2008>`
- Austin Olacsi `<https://github.com/Austin-Olacsi>`
- @micsthepick
- Daniel Kukula `<https://github.com/dkuku>`
- Patrick Evans `https://github.com/holysoles`

View File

@ -2,7 +2,7 @@
## Resources in the documentation ## Resources in the documentation
* [Development quickstart](https://docs.searxng.org/dev/contribution_guide.html) * [Development quickstart](https://docs.searxng.org/dev/quickstart.html)
* [Contribution guide](https://docs.searxng.org/dev/contribution_guide.html) * [Contribution guide](https://docs.searxng.org/dev/contribution_guide.html)
## Submitting PRs ## Submitting PRs

View File

@ -1,4 +1,4 @@
FROM alpine:3.18 FROM alpine:3.20
ENTRYPOINT ["/sbin/tini","--","/usr/local/searxng/dockerfiles/docker-entrypoint.sh"] ENTRYPOINT ["/sbin/tini","--","/usr/local/searxng/dockerfiles/docker-entrypoint.sh"]
EXPOSE 8080 EXPOSE 8080
VOLUME /etc/searxng VOLUME /etc/searxng
@ -15,7 +15,9 @@ ENV INSTANCE_NAME=searxng \
MORTY_KEY= \ MORTY_KEY= \
MORTY_URL= \ MORTY_URL= \
SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml \ SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml \
UWSGI_SETTINGS_PATH=/etc/searxng/uwsgi.ini UWSGI_SETTINGS_PATH=/etc/searxng/uwsgi.ini \
UWSGI_WORKERS=%k \
UWSGI_THREADS=4
WORKDIR /usr/local/searxng WORKDIR /usr/local/searxng
@ -33,7 +35,6 @@ RUN apk add --no-cache -t build-dependencies \
git \ git \
&& apk add --no-cache \ && apk add --no-cache \
ca-certificates \ ca-certificates \
su-exec \
python3 \ python3 \
py3-pip \ py3-pip \
libxml2 \ libxml2 \
@ -43,7 +44,7 @@ RUN apk add --no-cache -t build-dependencies \
uwsgi \ uwsgi \
uwsgi-python3 \ uwsgi-python3 \
brotli \ brotli \
&& pip3 install --no-cache -r requirements.txt \ && pip3 install --break-system-packages --no-cache -r requirements.txt \
&& apk del build-dependencies \ && apk del build-dependencies \
&& rm -rf /root/.cache && rm -rf /root/.cache

View File

@ -44,10 +44,10 @@ lxc.clean:
PHONY += search.checker search.checker.% PHONY += search.checker search.checker.%
search.checker: install search.checker: install
$(Q)./manage pyenv.cmd searx-checker -v $(Q)./manage pyenv.cmd searxng-checker -v
search.checker.%: install search.checker.%: install
$(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))" $(Q)./manage pyenv.cmd searxng-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
PHONY += test ci.test test.shell PHONY += test ci.test test.shell
ci.test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.pybabel ci.test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.pybabel
@ -56,7 +56,7 @@ test.shell:
$(Q)shellcheck -x -s dash \ $(Q)shellcheck -x -s dash \
dockerfiles/docker-entrypoint.sh dockerfiles/docker-entrypoint.sh
$(Q)shellcheck -x -s bash \ $(Q)shellcheck -x -s bash \
utils/brand.env \ utils/brand.sh \
$(MTOOLS) \ $(MTOOLS) \
utils/lib.sh \ utils/lib.sh \
utils/lib_sxng*.sh \ utils/lib_sxng*.sh \
@ -74,16 +74,14 @@ test.shell:
# wrap ./manage script # wrap ./manage script
MANAGE += buildenv
MANAGE += weblate.translations.commit weblate.push.translations MANAGE += weblate.translations.commit weblate.push.translations
MANAGE += data.all data.traits data.useragents MANAGE += data.all data.traits data.useragents data.locales
MANAGE += docs.html docs.live docs.gh-pages docs.prebuild docs.clean MANAGE += docs.html docs.live docs.gh-pages docs.prebuild docs.clean
MANAGE += docker.build docker.push docker.buildx MANAGE += docker.build docker.push docker.buildx
MANAGE += gecko.driver MANAGE += gecko.driver
MANAGE += node.env node.env.dev node.clean MANAGE += node.env node.env.dev node.clean
MANAGE += py.build py.clean MANAGE += py.build py.clean
MANAGE += pyenv pyenv.install pyenv.uninstall MANAGE += pyenv pyenv.install pyenv.uninstall
MANAGE += pypi.upload pypi.upload.test
MANAGE += format.python 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 += 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 += themes.all themes.simple themes.simple.test pygments.less

View File

@ -66,7 +66,7 @@ A user_, admin_ and developer_ handbook is available on the homepage_.
Contact Contact
======= =======
Ask questions or just chat about SearXNG on Ask questions or chat with the SearXNG community (this not a chatbot) on
IRC IRC
`#searxng on libera.chat <https://web.libera.chat/?channel=#searxng>`_ `#searxng on libera.chat <https://web.libera.chat/?channel=#searxng>`_
@ -121,9 +121,9 @@ You can contribute from your browser using `GitHub Codespaces`_:
- Click on the ``Codespaces`` tab instead of ``Local`` - Click on the ``Codespaces`` tab instead of ``Local``
- Click on ``Create codespace on master`` - Click on ``Create codespace on master``
- VSCode is going to start in the browser - VSCode is going to start in the browser
- Wait for ``git pull && make install`` to appears and then to disapear - Wait for ``git pull && make install`` to appear and then disappear
- You have `120 hours per month`_ (see also your `list of existing Codespaces`_) - You have `120 hours per month`_ (see also your `list of existing Codespaces`_)
- You can start SearXNG using ``make run`` in the terminal or by pressing ``Ctrl+Shift+B``. - You can start SearXNG using ``make run`` in the terminal or by pressing ``Ctrl+Shift+B``
.. _GitHub Codespaces: https://docs.github.com/en/codespaces/overview .. _GitHub Codespaces: https://docs.github.com/en/codespaces/overview
.. _120 hours per month: https://github.com/settings/billing .. _120 hours per month: https://github.com/settings/billing

View File

@ -175,4 +175,4 @@ unset MORTY_KEY
# Start uwsgi # Start uwsgi
printf 'Listen on %s\n' "${BIND_ADDRESS}" 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

@ -4,8 +4,12 @@ uid = searxng
gid = searxng gid = searxng
# Number of workers (usually CPU count) # Number of workers (usually CPU count)
workers = %k # default value: %k (= number of CPU core, see Dockerfile)
threads = 4 workers = $(UWSGI_WORKERS)
# Number of threads per worker
# default value: 4 (see Dockerfile)
threads = $(UWSGI_THREADS)
# The right granted on the created socket # The right granted on the created socket
chmod-socket = 666 chmod-socket = 666
@ -38,9 +42,13 @@ buffer-size = 8192
# See https://github.com/searx/searx-docker/issues/24 # See https://github.com/searx/searx-docker/issues/24
add-header = Connection: close add-header = Connection: close
# Follow SIGTERM convention
# See https://github.com/searxng/searxng/issues/3427
die-on-term
# uwsgi serves the static files # uwsgi serves the static files
# expires set to one year since there are hashes
static-map = /static=/usr/local/searxng/searx/static static-map = /static=/usr/local/searxng/searx/static
static-expires = /* 31557600 # expires set to one day
static-expires = /* 86400
static-gzip-all = True static-gzip-all = True
offload-threads = %k offload-threads = %k

View File

@ -69,10 +69,6 @@ Sample response
{ {
"enabled": true, "enabled": true,
"name": "HTTPS rewrite" "name": "HTTPS rewrite"
},
{
"enabled": false,
"name": "Vim-like hotkeys"
} }
], ],
"safe_search": 0 "safe_search": 0
@ -88,9 +84,9 @@ HTML of the site. URL of the SearXNG instance and values are customizable.
.. code:: html .. code:: html
<form method="post" action="https://example.org/"> <form method="post" action="https://example.org/">
<!-- search --> <input type="text" name="q" /> <!-- search --> <input type="text" name="q">
<!-- categories --> <input type="hidden" name="categories" value="general,social media" /> <!-- categories --> <input type="hidden" name="categories" value="general,social media">
<!-- language --> <input type="hidden" name="lang" value="all" /> <!-- language --> <input type="hidden" name="lang" value="all">
<!-- locale --> <input type="hidden" name="locale" value="en" /> <!-- locale --> <input type="hidden" name="locale" value="en">
<!-- date filter --> <input type="hidden" name="time_range" value="month" /> <!-- date filter --> <input type="hidden" name="time_range" value="month">
</form> </form>

View File

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

View File

@ -92,6 +92,9 @@ instance using `docker run <https://docs.docker.com/engine/reference/run/>`_:
searxng/searxng searxng/searxng
2f998.... # container's ID 2f998.... # container's ID
The environment variables UWSGI_WORKERS and UWSGI_THREADS overwrite the default
number of UWSGI processes and UWSGI threads specified in `/etc/searxng/uwsgi.ini`.
Open your WEB browser and visit the URL: Open your WEB browser and visit the URL:
.. code:: sh .. code:: sh

View File

@ -96,7 +96,7 @@ Modify the ``/etc/searxng/settings.yml`` to your needs:
.. literalinclude:: ../../utils/templates/etc/searxng/settings.yml .. literalinclude:: ../../utils/templates/etc/searxng/settings.yml
:language: yaml :language: yaml
:end-before: # hostname_replace: :end-before: # hostnames:
To see the entire file jump to :origin:`utils/templates/etc/searxng/settings.yml` To see the entire file jump to :origin:`utils/templates/etc/searxng/settings.yml`
@ -104,7 +104,7 @@ Modify the ``/etc/searxng/settings.yml`` to your needs:
.. literalinclude:: ../../searx/settings.yml .. literalinclude:: ../../searx/settings.yml
:language: yaml :language: yaml
:end-before: # hostname_replace: :end-before: # hostnames:
To see the entire file jump to :origin:`searx/settings.yml` To see the entire file jump to :origin:`searx/settings.yml`

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

@ -0,0 +1,17 @@
.. _limiter:
=======
Limiter
=======
.. sidebar:: info
The limiter requires a :ref:`Redis <settings redis>` database.
.. contents::
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.limiter
:members:

View File

@ -1,3 +1,5 @@
.. _searxng settings.yml:
======== ========
Settings Settings
======== ========

View File

@ -204,7 +204,7 @@ Example configuration to restrict access to the Arch Linux Wiki engine:
tokens: [ 'my-secret-token' ] tokens: [ 'my-secret-token' ]
Unless a user has configured the right token, the engine is going to be hidden Unless a user has configured the right token, the engine is going to be hidden
from him/her. It is not going to be included in the list of engines on the from them. It is not going to be included in the list of engines on the
Preferences page and in the output of `/config` REST API call. Preferences page and in the output of `/config` REST API call.
Tokens can be added to one's configuration on the Preferences page under "Engine Tokens can be added to one's configuration on the Preferences page under "Engine

View File

@ -9,6 +9,7 @@
search: search:
safe_search: 0 safe_search: 0
autocomplete: "" autocomplete: ""
favicon_resolver: ""
default_lang: "" default_lang: ""
ban_time_on_fail: 5 ban_time_on_fail: 5
max_ban_time_on_fail: 120 max_ban_time_on_fail: 120
@ -41,6 +42,11 @@
- ``qwant`` - ``qwant``
- ``wikipedia`` - ``wikipedia``
``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_lang``:
Default search language - leave blank to detect from browser information or Default search language - leave blank to detect from browser information or
use codes from :origin:`searx/languages.py`. use codes from :origin:`searx/languages.py`.

View File

@ -12,39 +12,42 @@
bind_address: "127.0.0.1" bind_address: "127.0.0.1"
secret_key: "ultrasecretkey" # change this! secret_key: "ultrasecretkey" # change this!
limiter: false limiter: false
public_instance: false
image_proxy: false image_proxy: false
default_http_headers: default_http_headers:
X-Content-Type-Options : nosniff X-Content-Type-Options : nosniff
X-XSS-Protection : 1; mode=block
X-Download-Options : noopen X-Download-Options : noopen
X-Robots-Tag : noindex, nofollow X-Robots-Tag : noindex, nofollow
Referrer-Policy : no-referrer Referrer-Policy : no-referrer
``base_url`` : ``$SEARXNG_URL``
``base_url`` : ``$SEARXNG_URL`` :ref:`buildenv <make buildenv>`
The base URL where SearXNG is deployed. Used to create correct inbound links. The base URL where SearXNG is deployed. Used to create correct inbound links.
If you change the value, don't forget to rebuild instance's environment
(:ref:`utils/brand.env <make buildenv>`)
``port`` & ``bind_address``: ``$SEARXNG_PORT`` & ``$SEARXNG_BIND_ADDRESS`` :ref:`buildenv <make buildenv>` ``port`` & ``bind_address``: ``$SEARXNG_PORT`` & ``$SEARXNG_BIND_ADDRESS``
Port number and *bind address* of the SearXNG web application if you run it Port number and *bind address* of the SearXNG web application if you run it
directly using ``python searx/webapp.py``. Doesn't apply to a SearXNG directly using ``python searx/webapp.py``. Doesn't apply to a SearXNG
services running behind a proxy and using socket communications. If you services running behind a proxy and using socket communications.
change the value, don't forget to rebuild instance's environment
(:ref:`utils/brand.env <make buildenv>`)
``secret_key`` : ``$SEARXNG_SECRET`` ``secret_key`` : ``$SEARXNG_SECRET``
Used for cryptography purpose. Used for cryptography purpose.
.. _limiter: ``limiter`` : ``$SEARXNG_LIMITER``
``limiter`` :
Rate limit the number of request on the instance, block some bots. The Rate limit the number of request on the instance, block some bots. The
:ref:`limiter src` requires a :ref:`settings redis` database. :ref:`limiter` requires a :ref:`settings redis` database.
.. _public_instance:
``public_instance`` : ``$SEARXNG_PUBLIC_INSTANCE``
Setting that allows to enable features specifically for public instances (not
needed for local usage). By set to ``true`` the following features are
activated:
- :py:obj:`searx.botdetection.link_token` in the :ref:`limiter`
.. _image_proxy: .. _image_proxy:
``image_proxy`` : ``image_proxy`` : ``$SEARXNG_IMAGE_PROXY``
Allow your instance of SearXNG of being able to proxy images. Uses memory space. Allow your instance of SearXNG of being able to proxy images. Uses memory space.
.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers .. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers

View File

@ -20,10 +20,11 @@
theme_args: theme_args:
simple_style: auto simple_style: auto
search_on_category_select: true search_on_category_select: true
hotkeys: default
.. _static_use_hash: .. _static_use_hash:
``static_use_hash`` : ``static_use_hash`` : ``$SEARXNG_STATIC_USE_HASH``
Enables `cache busting`_ of static files. Enables `cache busting`_ of static files.
``default_locale`` : ``default_locale`` :
@ -57,10 +58,13 @@
Name of the theme you want to use by default on your SearXNG instance. Name of the theme you want to use by default on your SearXNG instance.
``theme_args.simple_style``: ``theme_args.simple_style``:
Style of simple theme: ``auto``, ``light``, ``dark`` Style of simple theme: ``auto``, ``light``, ``dark``, ``black``
``results_on_new_tab``: ``results_on_new_tab``:
Open result links in a new tab by default. Open result links in a new tab by default.
``search_on_category_select``: ``search_on_category_select``:
Perform search immediately if a category selected. Disable to select multiple categories. Perform search immediately if a category selected. Disable to select multiple categories.
``hotkeys``:
Hotkeys to use in the search interface: ``default``, ``vim`` (Vim-like).

View File

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

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
import sys, os import sys, os
from pathlib import Path
from pallets_sphinx_themes import ProjectLink from pallets_sphinx_themes import ProjectLink
from searx import get_setting from searx import get_setting
@ -13,7 +13,6 @@ project = 'SearXNG'
copyright = 'SearXNG team' copyright = 'SearXNG team'
author = 'SearXNG team' author = 'SearXNG team'
release, version = VERSION_STRING, VERSION_STRING release, version = VERSION_STRING, VERSION_STRING
SEARXNG_URL = get_setting('server.base_url') or 'https://example.org/searxng' SEARXNG_URL = get_setting('server.base_url') or 'https://example.org/searxng'
ISSUE_URL = get_setting('brand.issue_url') ISSUE_URL = get_setting('brand.issue_url')
DOCS_URL = get_setting('brand.docs_url') DOCS_URL = get_setting('brand.docs_url')
@ -22,6 +21,9 @@ PRIVACYPOLICY_URL = get_setting('general.privacypolicy_url')
CONTACT_URL = get_setting('general.contact_url') CONTACT_URL = get_setting('general.contact_url')
WIKI_URL = get_setting('brand.wiki_url') WIKI_URL = get_setting('brand.wiki_url')
SOURCEDIR = Path(__file__).parent.parent / "searx"
os.environ['SOURCEDIR'] = str(SOURCEDIR)
# hint: sphinx.ext.viewcode won't highlight when 'highlight_language' [1] is set # hint: sphinx.ext.viewcode won't highlight when 'highlight_language' [1] is set
# to string 'none' [2] # to string 'none' [2]
# #
@ -125,6 +127,7 @@ extensions = [
"sphinx_tabs.tabs", # https://github.com/djungelorm/sphinx-tabs "sphinx_tabs.tabs", # https://github.com/djungelorm/sphinx-tabs
'myst_parser', # https://www.sphinx-doc.org/en/master/usage/markdown.html 'myst_parser', # https://www.sphinx-doc.org/en/master/usage/markdown.html
'notfound.extension', # https://github.com/readthedocs/sphinx-notfound-page 'notfound.extension', # https://github.com/readthedocs/sphinx-notfound-page
'sphinxcontrib.autodoc_pydantic', # https://github.com/mansenfranzen/autodoc_pydantic
] ]
autodoc_default_options = { autodoc_default_options = {

View File

@ -271,22 +271,54 @@ type.
``images`` ``images``
---------- ----------
.. table:: Parameter of the **images** media type: .. list-table:: Parameter of the **images** media type
:header-rows: 2
:width: 100% :width: 100%
========================= ===================================================== * - result-parameter
result-parameter information - Python type
------------------------- ----------------------------------------------------- - information
template is set to ``images.html``
========================= ===================================================== * - template
url string, url to the result site - :py:class:`str`
title string, title of the result *(partly implemented)* - is set to ``images.html``
content *(partly implemented)*
publishedDate :py:class:`datetime.datetime`, * - url
time of publish *(partly implemented)* - :py:class:`str`
img\_src string, url to the result image - url to the result site
thumbnail\_src string, url to a small-preview image
========================= ===================================================== * - 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: .. _template videos:
@ -307,6 +339,8 @@ type.
content *(not implemented yet)* content *(not implemented yet)*
publishedDate :py:class:`datetime.datetime`, time of publish publishedDate :py:class:`datetime.datetime`, time of publish
thumbnail string, url to a small-preview image thumbnail string, url to a small-preview image
length :py:class:`datetime.timedelta`, duration of result
views string, view count in humanized number format
========================= ===================================================== ========================= =====================================================
@ -466,3 +500,72 @@ type.
- :py:class:`str` - :py:class:`str`
- URL to full article, HTML version - 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

@ -25,7 +25,7 @@ Relational Database Management System (RDBMS) are supported:
- :ref:`engine sqlite` - :ref:`engine sqlite`
- :ref:`engine postgresql` - :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 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 <searx/settings.yml>`, as you have to set the required attributes for the
@ -119,3 +119,16 @@ MySQL
.. automodule:: searx.engines.mysql_server .. automodule:: searx.engines.mysql_server
:members: :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 @@
.. _alpinelinux engine:
=====================
Alpine Linux Packages
=====================
.. contents::
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.alpinelinux
:members:

View File

@ -0,0 +1,13 @@
.. _bpb engine:
===
Bpb
===
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.bpb
:members:

View File

@ -0,0 +1,8 @@
.. _discourse engine:
================
Discourse Forums
================
.. automodule:: searx.engines.discourse
:members:

View File

@ -12,7 +12,7 @@ DuckDuckGo Engines
.. automodule:: searx.engines.duckduckgo .. automodule:: searx.engines.duckduckgo
:members: :members:
.. automodule:: searx.engines.duckduckgo_images .. automodule:: searx.engines.duckduckgo_extra
:members: :members:
.. automodule:: searx.engines.duckduckgo_definitions .. automodule:: searx.engines.duckduckgo_definitions

View File

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

View File

@ -0,0 +1,8 @@
.. _gitea engine:
=====
Gitea
=====
.. automodule:: searx.engines.gitea
:members:

View File

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

View File

@ -0,0 +1,13 @@
.. _mastodon engine:
========
Mastodon
========
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.mastodon
:members:

View File

@ -0,0 +1,13 @@
.. _mrs engine:
=========================
Matrix Rooms Search (MRS)
=========================
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.mrs
:members:

View File

@ -0,0 +1,13 @@
.. _voidlinux mullvad_leta:
============
Mullvad-Leta
============
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.mullvad_leta
:members:

View File

@ -0,0 +1,13 @@
.. _engine presearch:
================
Presearch Engine
================
.. contents::
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.presearch
:members:

View File

@ -0,0 +1,13 @@
.. _RadioBrowser engine:
============
RadioBrowser
============
.. contents::
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.radio_browser
:members:

View File

@ -0,0 +1,13 @@
.. _voidlinux engine:
==========================
Void Linux binary packages
==========================
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.voidlinux
:members:

View File

@ -6,6 +6,7 @@ Developer documentation
:maxdepth: 2 :maxdepth: 2
quickstart quickstart
rtm_asdf
contribution_guide contribution_guide
engines/index engines/index
search_api search_api

View File

@ -61,13 +61,9 @@ working tree and release a ``make install`` to get a virtualenv with a
$ make install $ make install
PYENV [virtualenv] installing ./requirements*.txt into local/py3 PYENV [virtualenv] installing ./requirements*.txt into local/py3
... ...
PYENV OK PYENV [install] pip install --use-pep517 --no-build-isolation -e 'searx[test]'
PYENV [install] pip install -e 'searx[test]'
... ...
Successfully installed argparse-1.4.0 searx Successfully installed searxng-2023.7.19+a446dea1b
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
BUILDENV build utils/brand.env
If you release ``make install`` multiple times the installation will only If you release ``make install`` multiple times the installation will only
rebuild if the sha256 sum of the *requirement files* fails. With other words: rebuild if the sha256 sum of the *requirement files* fails. With other words:
@ -82,13 +78,9 @@ the check fails if you edit the requirements listed in
... ...
PYENV [virtualenv] installing ./requirements*.txt into local/py3 PYENV [virtualenv] installing ./requirements*.txt into local/py3
... ...
PYENV OK PYENV [install] pip install --use-pep517 --no-build-isolation -e 'searx[test]'
PYENV [install] pip install -e 'searx[test]'
... ...
Successfully installed argparse-1.4.0 searx Successfully installed searxng-2023.7.19+a446dea1b
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
BUILDENV build utils/brand.env
.. sidebar:: drop environment .. sidebar:: drop environment
@ -98,67 +90,6 @@ the check fails if you edit the requirements listed in
If you think, something goes wrong with your ./local environment or you change If you think, something goes wrong with your ./local environment or you change
the :origin:`setup.py` file, you have to call :ref:`make clean`. the :origin:`setup.py` file, you have to call :ref:`make clean`.
.. _make buildenv:
``make buildenv``
=================
Rebuild instance's environment with the modified settings from the
:ref:`settings brand` and :ref:`settings server` section of your
:ref:`settings.yml <settings location>`.
What is the :origin:`utils/brand.env` needed for and why do you need to rebuild
it if necessary?
Short answer: :ref:`installation and maintenance <searxng maintenance>`
scripts are running outside of instance's runtime environment and need some
values defined in the runtime environment.
All the SearXNG setups are centralized in the :ref:`settings.yml` file. This
setup is available as long we are in a *installed instance*. E.g. the
*installed instance* on the server or the *installed developer instance* at
``./local`` (the later one is created by a :ref:`make install <make install>` or
:ref:`make run <make run>`).
Tasks running outside of an *installed instance*, especially :ref:`installation
and maintenance <searxng maintenance>` tasks running at (pre-) installation time
do not have access to the SearXNG setup (from a *installed instance*). Those
tasks need a *build environment*.
The ``make buildenv`` target will update the *build environment* in:
- :origin:`utils/brand.env`
Tasks running outside of an *installed instance*, need the following settings
from the YAML configuration:
- ``SEARXNG_URL`` from :ref:`server.base_url <settings server>` (aka
``PUBLIC_URL``)
- ``SEARXNG_BIND_ADDRESS`` from :ref:`server.bind_address <settings server>`
- ``SEARXNG_PORT`` from :ref:`server.port <settings server>`
The ``GIT_URL`` and ``GIT_BRANCH`` in the origin:`utils/brand.env` file, are
read from the git VCS and the branch that is checked out when ``make
buildenv`` command runs.
.. _brand:
**I would like to create my own brand, how should I proceed?**
Create a remote branch (``example.org``), checkout the remote branch (on your
local developer desktop) and in the :origin:`searx/settings.yml` file in the
:ref:`settings server` section set ``base_url``. Run ``make buildenv`` and
create a commit for your brand.
On your server you clone the branch (``example.org``) into your HOME folder
``~`` from where you run the :ref:`installation <installation>` and
:ref:`maintenance <searxng maintenance>` task.
To upgrade you brand, rebase on SearXNG's master branch (on your local
developer desktop), force push it to your remote branch. Go to your server, do
a force pull and run :ref:`sudo -H ./utils/searxng.sh instance update <update
searxng>`.
.. _make node.env: .. _make node.env:
Node.js environment (``make node.env``) Node.js environment (``make node.env``)

View File

@ -292,7 +292,7 @@ content becomes smart.
files & folders origin :origin:`docs/dev/reST.rst` ``:origin:`docs/dev/reST.rst``` files & folders origin :origin:`docs/dev/reST.rst` ``:origin:`docs/dev/reST.rst```
pull request :pull:`4` ``:pull:`4``` pull request :pull:`4` ``:pull:`4```
patch :patch:`af2cae6` ``:patch:`af2cae6``` patch :patch:`af2cae6` ``:patch:`af2cae6```
PyPi package :pypi:`searx` ``:pypi:`searx``` PyPi package :pypi:`httpx` ``:pypi:`httpx```
manual page man :man:`bash` ``:man:`bash``` manual page man :man:`bash` ``:man:`bash```
intersphinx_ intersphinx_
-------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------

121
docs/dev/rtm_asdf.rst Normal file
View File

@ -0,0 +1,121 @@
==================
Runtime Management
==================
The runtimes are managed with asdf and are activated in this project via the
`.tool-versions <.tool-versions>`_. If you have not yet installed asdf_, then
chapter :ref:`introduce asdf` may be of help to you.
.. contents::
:depth: 2
:local:
:backlinks: entry
Get started
===========
If you have asdf installed you can install the runtimes of this project by:
.. code:: bash
$ cd /path/to/searxng
$ asdf install # will install runtimes listed in .tool-versions
...
Manage Versions
===============
If you want to perform a ``test`` with special runtime versions of nodejs,
python or shellcheck, you can patch the ``.tool-versions``:
.. code:: diff
--- a/.tool-versions
+++ b/.tool-versions
@@ -1,2 +1,2 @@
-python 3.12.0
-shellcheck 0.9.0
+python 3.11.6
+shellcheck 0.8.0
To install use ``asdf install`` again. If the runtime tools have changed, any
existing (nodejs and python) environments should be cleaned up with a ``make
clean``.
.. code:: bash
$ asdf install
...
$ make clean test
.. _introduce asdf:
Introduce asdf
==============
To `download asdf`_ and `install asdf`_:
.. code:: bash
$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch <version>
$ echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
$ echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc
Start a new shell and try to `install plugins`_:
.. code:: bash
$ asdf plugin-list-all | grep -E '(golang|python|nodejs|shellcheck).git'
golang https://github.com/asdf-community/asdf-golang.git
nodejs https://github.com/asdf-vm/asdf-nodejs.git
python https://github.com/danhper/asdf-python.git
shellcheck https://github.com/luizm/asdf-shellcheck.git
$ asdf plugin add golang https://github.com/asdf-community/asdf-golang.git
$ asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
$ asdf plugin add python https://github.com/danhper/asdf-python.git
$ asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git
Each plugin has dependencies, to compile runtimes visit the URLs from above and
look out for the dependencies you need to install on your OS, on Debian for the
runtimes listed above you will need:
.. code:: bash
$ sudo apt update
$ sudo apt install \
dirmngr gpg curl gawk coreutils build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
With dependencies installed you can install/compile runtimes:
.. code:: bash
$ asdf install golang latest
$ asdf install nodejs latest
$ asdf install python latest
$ asdf install shellcheck latest
Python will be compiled and will take a while.
In the repository the version is defined in `.tool-versions`_. Outside the
repository, its recommended that the runtime should use the versions of the OS
(`Fallback to System Version`_) / if not already done register the system
versions global:
.. code:: bash
$ cd /
$ asdf global golang system
$ asdf global nodejs system
$ asdf global python system
$ asdf global shellcheck system
.. _asdf: https://asdf-vm.com/
.. _download asdf: https://asdf-vm.com/guide/getting-started.html#_2-download-asdf
.. _install asdf: https://asdf-vm.com/guide/getting-started.html#_3-install-asdf
.. _install plugins: https://asdf-vm.com/guide/getting-started.html#install-the-plugin
.. _Fallback to System Version: https://asdf-vm.com/manage/versions.html#fallback-to-system-version

View File

@ -69,7 +69,7 @@ Parameters
``autocomplete`` : default from :ref:`settings search` ``autocomplete`` : default from :ref:`settings search`
[ ``google``, ``dbpedia``, ``duckduckgo``, ``mwmbl``, ``startpage``, [ ``google``, ``dbpedia``, ``duckduckgo``, ``mwmbl``, ``startpage``,
``wikipedia``, ``swisscows``, ``qwant`` ] ``wikipedia``, ``stract``, ``swisscows``, ``qwant`` ]
Service which completes words as you type. Service which completes words as you type.
@ -103,14 +103,14 @@ Parameters
.. disabled by default .. disabled by default
``Hostname_replace``, ``Open_Access_DOI_rewrite``, ``Hostnames_plugin``, ``Open_Access_DOI_rewrite``,
``Vim-like_hotkeys``, ``Tor_check_plugin`` ``Vim-like_hotkeys``, ``Tor_check_plugin``
``disabled_plugins``: optional ``disabled_plugins``: optional
List of disabled plugins. List of disabled plugins.
:default: :default:
``Hostname_replace``, ``Open_Access_DOI_rewrite``, ``Hostnames_plugin``, ``Open_Access_DOI_rewrite``,
``Vim-like_hotkeys``, ``Tor_check_plugin`` ``Vim-like_hotkeys``, ``Tor_check_plugin``
:values: :values:

View File

@ -78,6 +78,16 @@ Scripts to update static data in :origin:`searx/data/`
.. automodule:: searxng_extra.update.update_pygments .. automodule:: searxng_extra.update.update_pygments
:members: :members:
.. _update_locales.py:
``update_locales.py``
=====================
:origin:`[source] <searxng_extra/update/update_locales.py>`
.. automodule:: searxng_extra.update.update_locales
:members:
``update_wikidata_units.py`` ``update_wikidata_units.py``
============================ ============================

View File

@ -17,7 +17,7 @@ If you don't trust anyone, you can set up your own, see :ref:`installation`.
- :ref:`no user tracking / no profiling <SearXNG protect privacy>` - :ref:`no user tracking / no profiling <SearXNG protect privacy>`
- script & cookies are optional - script & cookies are optional
- secure, encrypted connections - secure, encrypted connections
- :ref:`about 130 search engines <configured engines>` - :ref:`about 200 search engines <configured engines>`
- `about 60 translations <https://translate.codeberg.org/projects/searxng/searxng/>`_ - `about 60 translations <https://translate.codeberg.org/projects/searxng/searxng/>`_
- about 100 `well maintained <https://uptime.searxng.org/>`__ instances on searx.space_ - about 100 `well maintained <https://uptime.searxng.org/>`__ instances on searx.space_
- :ref:`easy integration of search engines <demo online engine>` - :ref:`easy integration of search engines <demo online engine>`

View File

@ -2,9 +2,9 @@
Why use a private instance? 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. question, see what options a SearXNG user has.
.. contents:: .. contents::
@ -12,13 +12,13 @@ Why use a private instance?
:local: :local:
:backlinks: entry :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 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 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 VPN. Also it can be group of friends, or a company which can be accessed through a VPN. Instances can also be
single user one which runs on the user's laptop. 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. protects its users.
.. _SearXNG protect privacy: .. _SearXNG protect privacy:
@ -26,26 +26,26 @@ protects its users.
How does SearXNG protect privacy? How does SearXNG protect privacy?
================================= =================================
SearXNG protects the privacy of its users in multiple ways regardless of the type 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 of the instance (private or public). Removal of private data from search requests
comes in three forms: comes in three forms:
1. removal of private data from requests going to search services 1. Removing private data from requests going to search services
2. not forwarding anything from a third party services through search services 2. Not forwarding anything from third party services through search services
(e.g. advertisement) (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 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 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 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 configured to use proxy or Tor. `Result proxy
<https://github.com/asciimoo/morty>`__ is supported, too. <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 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 protecting users from search services, both the referring page and search query are
hidden from visited result pages. hidden from the results pages being visited.
What are the consequences of using public instances? 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 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 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 Also, public instances without proper protection are more vulnerable to abuse of
the search service, In this case the external service in exchange returns the search service, which may cause the external service to enforce
CAPTCHAs or bans the IP of the instance. Thus, search requests return less CAPTCHAs or to ban the IP address of the instance. Thus, search requests would return less
results. results.
I see. What about private instances? 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 control: the source code, logging settings and private data. Unknown instance
administrators do not have to be trusted. administrators do not have to be trusted.
Furthermore, as the default settings of their instance is editable, there is no Furthermore, as the default settings of their instance are editable, there is no
need to use cookies to tailor SearXNG to their needs. So preferences will not be 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 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. not compromised.
Conclusion 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 features of SearXNG are available to users no matter what kind of instance they
use. use.
If someone is on the go or just wants to try SearXNG for the first time public For those on the go, or just wanting to try SearXNG for the first time, public
instances are the best choices. Additionally, public instance are making a instances are the best choice. Public instances are also making the
world a better place, because those who cannot or do not want to run an world a better place by giving those who cannot, or do not want to, run an
instance, have access to a privacy respecting search service. instance access to a privacy-respecting search service.

View File

@ -12,13 +12,17 @@ Bot Detection
.. automodule:: searx.botdetection .. automodule:: searx.botdetection
:members: :members:
.. automodule:: searx.botdetection.limiter .. _botdetection ip_lists:
:members:
IP lists
========
.. automodule:: searx.botdetection.ip_lists .. automodule:: searx.botdetection.ip_lists
:members: :members:
.. _botdetection rate limit:
Rate limit Rate limit
========== ==========
@ -29,6 +33,8 @@ Rate limit
:members: :members:
.. _botdetection probe headers:
Probe HTTP headers Probe HTTP headers
================== ==================
@ -46,3 +52,11 @@ Probe HTTP headers
.. automodule:: searx.botdetection.http_user_agent .. automodule:: searx.botdetection.http_user_agent
:members: :members:
.. _botdetection config:
Config
======
.. automodule:: searx.botdetection.config
:members:

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

@ -13,8 +13,3 @@ Locales
:members: :members:
SearXNG's locale codes
======================
.. automodule:: searx.sxng_locales
:members:

View File

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

View File

@ -0,0 +1,9 @@
.. _unit converter plugin:
=====================
Unit converter plugin
=====================
.. automodule:: searx.plugins.unit_converter
: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:

View File

@ -1,25 +0,0 @@
categories = ['general'] # optional
def request(query, params):
'''pre-request callback
params<dict>:
method : POST/GET
headers : {}
data : {} # if method == POST
url : ''
category: 'search category'
pageno : 1 # number of the requested page
'''
params['url'] = 'https://host/%s' % query
return params
def response(resp):
'''post-response callback
resp: requests response object
'''
return [{'url': '', 'title': '', 'content': ''}]

78
manage
View File

@ -41,10 +41,10 @@ PATH="${REPO_ROOT}/node_modules/.bin:${PATH}"
PYOBJECTS="searx" PYOBJECTS="searx"
PY_SETUP_EXTRAS='[test]' PY_SETUP_EXTRAS='[test]'
GECKODRIVER_VERSION="v0.30.0" GECKODRIVER_VERSION="v0.35.0"
# SPHINXOPTS= # SPHINXOPTS=
BLACK_OPTIONS=("--target-version" "py311" "--line-length" "120" "--skip-string-normalization") 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") BLACK_TARGETS=("--exclude" "(searx/static|searx/languages.py)" "--include" 'searxng.msg|\.pyi?$' "searx" "searxng_extra" "tests")
_dev_redis_sock="/usr/local/searxng-redis/run/redis.sock" _dev_redis_sock="/usr/local/searxng-redis/run/redis.sock"
# set SEARXNG_REDIS_URL if it is not defined and "{_dev_redis_sock}" exists. # set SEARXNG_REDIS_URL if it is not defined and "{_dev_redis_sock}" exists.
@ -52,39 +52,20 @@ if [ -S "${_dev_redis_sock}" ] && [ -z "${SEARXNG_REDIS_URL}" ]; then
export SEARXNG_REDIS_URL="unix://${_dev_redis_sock}?db=0" export SEARXNG_REDIS_URL="unix://${_dev_redis_sock}?db=0"
fi fi
pylint.FILES() {
# List files tagged by comment:
#
# # lint: pylint
#
# These py files are linted by test.pylint()
grep -l -r --include \*.py '^#[[:blank:]]*lint:[[:blank:]]*pylint' searx searxng_extra tests
find . -name searxng.msg
}
YAMLLINT_FILES=() YAMLLINT_FILES=()
while IFS= read -r line; do while IFS= read -r line; do
if [ "$line" != "tests/unit/settings/syntaxerror_settings.yml" ]; then
YAMLLINT_FILES+=("$line") YAMLLINT_FILES+=("$line")
fi
done <<< "$(git ls-files './tests/*.yml' './searx/*.yml' './utils/templates/etc/searxng/*.yml')" done <<< "$(git ls-files './tests/*.yml' './searx/*.yml' './utils/templates/etc/searxng/*.yml')"
RST_FILES=( RST_FILES=(
'README.rst' 'README.rst'
) )
PYLINT_SEARXNG_DISABLE_OPTION="\
I,C,R,\
W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\
E1136"
PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES="traits,supported_languages,language_aliases,logger,categories"
PYLINT_OPTIONS="-m pylint -j 0 --rcfile .pylintrc"
help() { help() {
nvm.help nvm.help
cat <<EOF cat <<EOF
buildenv:
rebuild ./utils/brand.env
webapp.: webapp.:
run : run developer instance run : run developer instance
docs.: docs.:
@ -111,8 +92,6 @@ pyenv.:
uninstall : uninstall developer installation uninstall : uninstall developer installation
cmd ... : run command ... in virtualenv cmd ... : run command ... in virtualenv
OK : test if virtualenv is OK OK : test if virtualenv is OK
pypi.upload:
Upload python packages to PyPi (to test use pypi.upload.test)
format.: format.:
python : format Python code source using black python : format Python code source using black
pygments.: pygments.:
@ -155,29 +134,6 @@ webapp.run() {
SEARXNG_DEBUG=1 pyenv.cmd python -m searx.webapp SEARXNG_DEBUG=1 pyenv.cmd python -m searx.webapp
} }
buildenv() {
# settings file from repository's working tree are used by default
SEARXNG_SETTINGS_PATH="${REPO_ROOT}/searx/settings.yml"
if [ -f /etc/searx/settings.yml ]; then
err_msg "settings.yml in /etc/searx/ is deprecated, move file to folder /etc/searxng/"
fi
if [ -r '/etc/searxng/settings.yml' ]; then
if ask_yn "should settings read from: /etc/searxng/settings.yml"; then
SEARXNG_SETTINGS_PATH='/etc/searxng/settings.yml'
fi
fi
export SEARXNG_SETTINGS_PATH
(
set -e
SEARXNG_DEBUG=1 pyenv.cmd python utils/build_env.py 2>&1 \
| prefix_stdout "${_Blue}BUILDENV${_creset} "
)
return "${PIPESTATUS[0]}"
}
docker.push() { docker.push() {
docker.build push docker.build push
} }
@ -277,7 +233,7 @@ gecko.driver() {
build_msg INSTALL "geckodriver already installed" build_msg INSTALL "geckodriver already installed"
return return
fi 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 case "$PLATFORM" in
"linux 32bit" | "linux2 32bit") ARCH="linux32";; "linux 32bit" | "linux2 32bit") ARCH="linux32";;
"linux 64bit" | "linux2 64bit") ARCH="linux64";; "linux 64bit" | "linux2 64bit") ARCH="linux64";;
@ -343,9 +299,8 @@ pyenv.install() {
( set -e ( set -e
pyenv pyenv
build_msg PYENV "[install] pip install -e 'searx${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 -e ".${PY_SETUP_EXTRAS}" "${PY_ENV_BIN}/python" -m pip install --use-pep517 --no-build-isolation -e ".${PY_SETUP_EXTRAS}"
buildenv
) )
local exit_val=$? local exit_val=$?
if [ ! $exit_val -eq 0 ]; then if [ ! $exit_val -eq 0 ]; then
@ -360,31 +315,12 @@ pyenv.uninstall() {
} }
pypi.upload() {
py.clean
py.build
# https://github.com/pypa/twine
pyenv.cmd twine upload "${PYDIST}"/*
}
pypi.upload.test() {
py.clean
py.build
pyenv.cmd twine upload -r testpypi "${PYDIST}"/*
}
format.python() { format.python() {
build_msg TEST "[format.python] black \$BLACK_TARGETS" build_msg TEST "[format.python] black \$BLACK_TARGETS"
pyenv.cmd black "${BLACK_OPTIONS[@]}" "${BLACK_TARGETS[@]}" pyenv.cmd black "${BLACK_OPTIONS[@]}" "${BLACK_TARGETS[@]}"
dump_return $? dump_return $?
} }
PYLINT_FILES=()
while IFS= read -r line; do
PYLINT_FILES+=("$line")
done <<< "$(pylint.FILES)"
# shellcheck disable=SC2119 # shellcheck disable=SC2119
main() { main() {

View File

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

View File

@ -1,23 +1,24 @@
mock==5.1.0 mock==5.1.0
nose2[coverage_plugin]==0.13.0 nose2[coverage_plugin]==0.15.1
cov-core==1.15.0 cov-core==1.15.0
black==22.12.0 black==24.3.0
pylint==2.17.5 pylint==3.3.1
splinter==0.19.0 splinter==0.21.0
selenium==4.12.0 selenium==4.25.0
twine==4.0.2 Pallets-Sphinx-Themes==2.3.0
Pallets-Sphinx-Themes==2.1.1 Sphinx==7.4.7
Sphinx<=7.1.2; python_version == '3.8' sphinx-issues==5.0.0
Sphinx==7.2.6; python_version > '3.8'
sphinx-issues==3.0.1
sphinx-jinja==2.0.2 sphinx-jinja==2.0.2
sphinx-tabs==3.4.1 sphinx-tabs==3.4.7
sphinxcontrib-programoutput==0.17 sphinxcontrib-programoutput==0.17
sphinx-autobuild==2021.3.14 sphinx-autobuild==2024.10.3
sphinx-notfound-page==1.0.0 sphinx-notfound-page==1.0.4
myst-parser==2.0.0 myst-parser==3.0.1
linuxdoc==20230827 linuxdoc==20240924
aiounittest==1.4.2 aiounittest==1.4.2
yamllint==1.32.0 yamllint==1.35.1
wlc==1.13 wlc==1.15
coloredlogs==15.0.1 coloredlogs==15.0.1
docutils>=0.21.2
parameterized==0.9.0
autodoc_pydantic==2.2.0

View File

@ -1,19 +1,21 @@
certifi==2023.7.22 certifi==2024.8.30
babel==2.12.1 babel==2.16.0
flask-babel==3.1.0 flask-babel==4.0.0
flask==2.3.3 flask==3.0.3
jinja2==3.1.2 jinja2==3.1.4
lxml==4.9.3 lxml==5.3.0
pygments==2.16.1 pygments==2.18.0
python-dateutil==2.8.2 python-dateutil==2.9.0.post0
pyyaml==6.0.1 pyyaml==6.0.2
httpx[http2]==0.24.1 httpx[http2]==0.24.1
Brotli==1.1.0 Brotli==1.1.0
uvloop==0.17.0 uvloop==0.21.0
httpx-socks[asyncio]==0.7.7 httpx-socks[asyncio]==0.7.7
setproctitle==1.3.2 setproctitle==1.3.3
redis==4.6.0 redis==5.0.8
markdown-it-py==3.0.0 markdown-it-py==3.0.0
typing_extensions==4.8.0 fasttext-predict==0.9.2.2
fasttext-predict==0.9.2.1 tomli==2.0.2; python_version < '3.11'
pytomlpp==1.0.13 msgspec==0.18.6
eval_type_backport; python_version < '3.9'
typer-slim==0.12.5

View File

@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint # pylint: disable=missing-module-docstring, cyclic-import
# pylint: disable=missing-module-docstring
import sys import sys
import os import os
@ -104,3 +103,10 @@ if max_request_timeout is None:
logger.info('max_request_timeout=%s', repr(max_request_timeout)) logger.info('max_request_timeout=%s', repr(max_request_timeout))
else: else:
logger.info('max_request_timeout=%i second(s)', max_request_timeout) 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"
)

View File

@ -1,25 +1,30 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
import sys
from os import listdir from os import listdir
from os.path import realpath, dirname, join, isdir from os.path import realpath, dirname, join, isdir
from searx.utils import load_module
from collections import defaultdict from collections import defaultdict
from searx.utils import load_module
answerers_dir = dirname(realpath(__file__)) answerers_dir = dirname(realpath(__file__))
def load_answerers(): def load_answerers():
answerers = [] answerers = [] # pylint: disable=redefined-outer-name
for filename in listdir(answerers_dir): for filename in listdir(answerers_dir):
if not isdir(join(answerers_dir, filename)) or filename.startswith('_'): if not isdir(join(answerers_dir, filename)) or filename.startswith('_'):
continue continue
module = load_module('answerer.py', join(answerers_dir, filename)) module = load_module('answerer.py', join(answerers_dir, filename))
if not hasattr(module, 'keywords') or not isinstance(module.keywords, tuple) or not len(module.keywords): if not hasattr(module, 'keywords') or not isinstance(module.keywords, tuple) or not module.keywords:
exit(2) sys.exit(2)
answerers.append(module) answerers.append(module)
return answerers return answerers
def get_answerers_by_keywords(answerers): def get_answerers_by_keywords(answerers): # pylint:disable=redefined-outer-name
by_keyword = defaultdict(list) by_keyword = defaultdict(list)
for answerer in answerers: for answerer in answerers:
for keyword in answerer.keywords: for keyword in answerer.keywords:

View File

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

View File

@ -1,3 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
import hashlib import hashlib
import random import random
import string import string

View File

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

View File

@ -1,3 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
from functools import reduce from functools import reduce
from operator import mul from operator import mul
@ -17,27 +20,27 @@ def answer(query):
try: try:
args = list(map(float, parts[1:])) args = list(map(float, parts[1:]))
except: except: # pylint: disable=bare-except
return [] return []
func = parts[0] func = parts[0]
answer = None _answer = None
if func == 'min': if func == 'min':
answer = min(args) _answer = min(args)
elif func == 'max': elif func == 'max':
answer = max(args) _answer = max(args)
elif func == 'avg': elif func == 'avg':
answer = sum(args) / len(args) _answer = sum(args) / len(args)
elif func == 'sum': elif func == 'sum':
answer = sum(args) _answer = sum(args)
elif func == 'prod': elif func == 'prod':
answer = reduce(mul, args, 1) _answer = reduce(mul, args, 1)
if answer is None: if _answer is None:
return [] return []
return [{'answer': str(answer)}] return [{'answer': str(_answer)}]
# required answerer function # required answerer function

View File

@ -1,12 +1,12 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""This module implements functions needed for the autocompleter. """This module implements functions needed for the autocompleter.
""" """
# pylint: disable=use-dict-literal # pylint: disable=use-dict-literal
import json import json
from urllib.parse import urlencode import html
from urllib.parse import urlencode, quote_plus
import lxml import lxml
from httpx import HTTPError from httpx import HTTPError
@ -16,17 +16,26 @@ from searx.engines import (
engines, engines,
google, google,
) )
from searx.network import get as http_get from searx.network import get as http_get, post as http_post
from searx.exceptions import SearxEngineResponseException from searx.exceptions import SearxEngineResponseException
def get(*args, **kwargs): def update_kwargs(**kwargs):
if 'timeout' not in kwargs: if 'timeout' not in kwargs:
kwargs['timeout'] = settings['outgoing']['request_timeout'] kwargs['timeout'] = settings['outgoing']['request_timeout']
kwargs['raise_for_httperror'] = True kwargs['raise_for_httperror'] = True
def get(*args, **kwargs):
update_kwargs(**kwargs)
return http_get(*args, **kwargs) return http_get(*args, **kwargs)
def post(*args, **kwargs):
update_kwargs(**kwargs)
return http_post(*args, **kwargs)
def brave(query, _lang): def brave(query, _lang):
# brave search autocompleter # brave search autocompleter
url = 'https://search.brave.com/api/suggest?' url = 'https://search.brave.com/api/suggest?'
@ -145,6 +154,18 @@ def seznam(query, _lang):
] ]
def stract(query, _lang):
# stract autocompleter (beta)
url = f"https://stract.com/beta/api/autosuggest?q={quote_plus(query)}"
resp = post(url)
if not resp.ok:
return []
return [html.unescape(suggestion['raw']) for suggestion in resp.json()]
def startpage(query, sxng_locale): def startpage(query, sxng_locale):
"""Autocomplete from Startpage. Supports Startpage's languages""" """Autocomplete from Startpage. Supports Startpage's languages"""
lui = engines['startpage'].traits.get_language(sxng_locale, 'english') lui = engines['startpage'].traits.get_language(sxng_locale, 'english')
@ -223,6 +244,7 @@ backends = {
'mwmbl': mwmbl, 'mwmbl': mwmbl,
'seznam': seznam, 'seznam': seznam,
'startpage': startpage, 'startpage': startpage,
'stract': stract,
'swisscows': swisscows, 'swisscows': swisscows,
'qwant': qwant, 'qwant': qwant,
'wikipedia': wikipedia, 'wikipedia': wikipedia,

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""This module implements the :origin:`searxng_msg <babel.cfg>` extractor to """This module implements the :origin:`searxng_msg <babel.cfg>` extractor to
extract messages from: extract messages from:

View File

@ -1,27 +1,22 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""".. _botdetection src: """.. _botdetection src:
X-Forwarded-For Implementations used for bot detection.
===============
.. attention::
A correct setup of the HTTP request headers ``X-Forwarded-For`` and
``X-Real-IP`` is essential to be able to assign a request to an IP correctly:
- `NGINX RequestHeader`_
- `Apache RequestHeader`_
.. _NGINX RequestHeader:
https://docs.searxng.org/admin/installation-nginx.html#nginx-s-searxng-site
.. _Apache RequestHeader:
https://docs.searxng.org/admin/installation-apache.html#apache-s-searxng-site
.. autofunction:: searx.botdetection.get_real_ip
""" """
from ._helpers import dump_request from ._helpers import dump_request
from ._helpers import get_real_ip from ._helpers import get_real_ip
from ._helpers import get_network
from ._helpers import too_many_requests from ._helpers import too_many_requests
__all__ = ['dump_request', 'get_network', 'get_real_ip', 'too_many_requests']
redis_client = None
cfg = None
def init(_cfg, _redis_client):
global redis_client, cfg # pylint: disable=global-statement
redis_client = _redis_client
cfg = _cfg

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
# pylint: disable=missing-module-docstring, invalid-name # pylint: disable=missing-module-docstring, invalid-name
from __future__ import annotations from __future__ import annotations
@ -13,8 +12,8 @@ from ipaddress import (
import flask import flask
import werkzeug import werkzeug
from searx.tools import config
from searx import logger from searx import logger
from . import config
logger = logger.getChild('botdetection') logger = logger.getChild('botdetection')
@ -104,10 +103,10 @@ def get_real_ip(request: flask.Request) -> str:
if not forwarded_for: if not forwarded_for:
_log_error_only_once("X-Forwarded-For header is not set!") _log_error_only_once("X-Forwarded-For header is not set!")
else: else:
from .limiter import get_cfg # pylint: disable=import-outside-toplevel, cyclic-import from . import cfg # pylint: disable=import-outside-toplevel, cyclic-import
forwarded_for = [x.strip() for x in forwarded_for.split(',')] forwarded_for = [x.strip() for x in forwarded_for.split(',')]
x_for: int = get_cfg()['real_ip.x_for'] # type: ignore x_for: int = cfg['real_ip.x_for'] # type: ignore
forwarded_for = forwarded_for[-min(len(forwarded_for), x_for)] forwarded_for = forwarded_for[-min(len(forwarded_for), x_for)]
if not real_ip: if not real_ip:

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Configuration class :py:class:`Config` with deep-update, schema validation """Configuration class :py:class:`Config` with deep-update, schema validation
and deprecated names. and deprecated names.
@ -14,7 +13,8 @@ import copy
import typing import typing
import logging import logging
import pathlib import pathlib
import pytomlpp as toml
from ..compat import tomllib
__all__ = ['Config', 'UNSET', 'SchemaIssue'] __all__ = ['Config', 'UNSET', 'SchemaIssue']
@ -62,7 +62,7 @@ class Config:
# init schema # init schema
log.debug("load schema file: %s", schema_file) log.debug("load schema file: %s", schema_file)
cfg = cls(cfg_schema=toml.load(schema_file), deprecated=deprecated) cfg = cls(cfg_schema=toml_load(schema_file), deprecated=deprecated)
if not cfg_file.exists(): if not cfg_file.exists():
log.warning("missing config file: %s", cfg_file) log.warning("missing config file: %s", cfg_file)
return cfg return cfg
@ -70,12 +70,7 @@ class Config:
# load configuration # load configuration
log.debug("load config file: %s", cfg_file) log.debug("load config file: %s", cfg_file)
try: upd_cfg = toml_load(cfg_file)
upd_cfg = toml.load(cfg_file)
except toml.DecodeError as exc:
msg = str(exc).replace('\t', '').replace('\n', ' ')
log.error("%s: %s", cfg_file, msg)
raise
is_valid, issue_list = cfg.validate(upd_cfg) is_valid, issue_list = cfg.validate(upd_cfg)
for msg in issue_list: for msg in issue_list:
@ -177,6 +172,16 @@ class Config:
return getattr(m, name) return getattr(m, name)
def toml_load(file_name):
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
# working with dictionaries # working with dictionaries
@ -211,7 +216,6 @@ def value(name: str, data_dict: dict):
def validate( def validate(
schema_dict: typing.Dict, data_dict: typing.Dict, deprecated: typing.Dict[str, str] schema_dict: typing.Dict, data_dict: typing.Dict, deprecated: typing.Dict[str, str]
) -> typing.Tuple[bool, list]: ) -> typing.Tuple[bool, list]:
"""Deep validation of dictionary in ``data_dict`` against dictionary in """Deep validation of dictionary in ``data_dict`` against dictionary in
``schema_dict``. Argument deprecated is a dictionary that maps deprecated ``schema_dict``. Argument deprecated is a dictionary that maps deprecated
configuration names to a messages:: configuration names to a messages::

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""" """
Method ``http_accept`` Method ``http_accept``
---------------------- ----------------------
@ -24,7 +23,7 @@ from ipaddress import (
import flask import flask
import werkzeug import werkzeug
from searx.tools import config from . import config
from ._helpers import too_many_requests from ._helpers import too_many_requests

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""" """
Method ``http_accept_encoding`` Method ``http_accept_encoding``
------------------------------- -------------------------------
@ -25,7 +24,7 @@ from ipaddress import (
import flask import flask
import werkzeug import werkzeug
from searx.tools import config from . import config
from ._helpers import too_many_requests from ._helpers import too_many_requests

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""" """
Method ``http_accept_language`` Method ``http_accept_language``
------------------------------- -------------------------------
@ -21,7 +20,7 @@ from ipaddress import (
import flask import flask
import werkzeug import werkzeug
from searx.tools import config from . import config
from ._helpers import too_many_requests from ._helpers import too_many_requests

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""" """
Method ``http_connection`` Method ``http_connection``
-------------------------- --------------------------
@ -22,7 +21,7 @@ from ipaddress import (
import flask import flask
import werkzeug import werkzeug
from searx.tools import config from . import config
from ._helpers import too_many_requests from ._helpers import too_many_requests

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""" """
Method ``http_user_agent`` Method ``http_user_agent``
-------------------------- --------------------------
@ -24,7 +23,7 @@ from ipaddress import (
import flask import flask
import werkzeug import werkzeug
from searx.tools import config from . import config
from ._helpers import too_many_requests from ._helpers import too_many_requests
@ -35,7 +34,7 @@ USER_AGENT = (
+ r'|HttpClient|Jersey|Python|libwww-perl|Ruby|SynHttpClient|UniversalFeedParser|Googlebot|GoogleImageProxy' + r'|HttpClient|Jersey|Python|libwww-perl|Ruby|SynHttpClient|UniversalFeedParser|Googlebot|GoogleImageProxy'
+ r'|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot' + r'|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot'
+ r'|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT|Sogou|Abonti|Pixray|Spinn3r|SemrushBot|Exabot' + r'|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT|Sogou|Abonti|Pixray|Spinn3r|SemrushBot|Exabot'
+ r'|ZmEu|BLEXBot|bitlybot' + r'|ZmEu|BLEXBot|bitlybot|HeadlessChrome'
# unmaintained Farside instances # unmaintained Farside instances
+ r'|' + r'|'
+ re.escape(r'Mozilla/5.0 (compatible; Farside/0.1.0; +https://farside.link)') + re.escape(r'Mozilla/5.0 (compatible; Farside/0.1.0; +https://farside.link)')

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""".. _botdetection.ip_limit: """.. _botdetection.ip_limit:
Method ``ip_limit`` Method ``ip_limit``
@ -13,8 +12,7 @@ and at least for a maximum of 10 minutes.
The :py:obj:`.link_token` method can be used to investigate whether a request is The :py:obj:`.link_token` method can be used to investigate whether a request is
*suspicious*. To activate the :py:obj:`.link_token` method in the *suspicious*. To activate the :py:obj:`.link_token` method in the
:py:obj:`.ip_limit` method add the following to your :py:obj:`.ip_limit` method add the following configuration:
``/etc/searxng/limiter.toml``:
.. code:: toml .. code:: toml
@ -46,12 +44,12 @@ from ipaddress import (
import flask import flask
import werkzeug import werkzeug
from searx.tools import config
from searx import redisdb from searx import redisdb
from searx.redislib import incr_sliding_window, drop_counter from searx.redislib import incr_sliding_window, drop_counter
from . import link_token from . import link_token
from . import config
from ._helpers import ( from ._helpers import (
too_many_requests, too_many_requests,
logger, logger,
@ -78,11 +76,11 @@ LONG_MAX = 150
LONG_MAX_SUSPICIOUS = 10 LONG_MAX_SUSPICIOUS = 10
"""Maximum suspicious requests from one IP in the :py:obj:`LONG_WINDOW`""" """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.""" """Time (sec) before sliding window for API requests (format != html) expires."""
API_MAX = 4 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 SUSPICIOUS_IP_WINDOW = 3600 * 24 * 30
"""Time (sec) before sliding window for one suspicious IP expires.""" """Time (sec) before sliding window for one suspicious IP expires."""
@ -105,7 +103,7 @@ def filter_request(
return None return None
if request.args.get('format', 'html') != 'html': 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: if c > API_MAX:
return too_many_requests(network, "too many request in API_WINDOW") return too_many_requests(network, "too many request in API_WINDOW")

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""".. _botdetection.ip_lists: """.. _botdetection.ip_lists:
Method ``ip_lists`` Method ``ip_lists``
@ -13,7 +12,7 @@ The ``ip_lists`` method implements IP :py:obj:`block- <block_ip>` and
[botdetection.ip_lists] [botdetection.ip_lists]
pass_ip = [ pass_ip = [
'140.238.172.132', # IPv4 of check.searx.space '167.235.158.251', # IPv4 of check.searx.space
'192.168.0.0/16', # IPv4 private network '192.168.0.0/16', # IPv4 private network
'fe80::/10' # IPv6 linklocal 'fe80::/10' # IPv6 linklocal
] ]
@ -33,15 +32,15 @@ from ipaddress import (
IPv6Address, IPv6Address,
) )
from searx.tools import config from . import config
from ._helpers import logger from ._helpers import logger
logger = logger.getChild('ip_limit') logger = logger.getChild('ip_limit')
SEARXNG_ORG = [ SEARXNG_ORG = [
# https://github.com/searxng/searxng/pull/2484#issuecomment-1576639195 # https://github.com/searxng/searxng/pull/2484#issuecomment-1576639195
'140.238.172.132', # IPv4 check.searx.space '167.235.158.251', # IPv4 check.searx.space
'2603:c022:0:4900::/56', # IPv6 check.searx.space '2a01:04f8:1c1c:8fc2::/64', # IPv6 check.searx.space
] ]
"""Passlist of IPs from the SearXNG organization, e.g. `check.searx.space`.""" """Passlist of IPs from the SearXNG organization, e.g. `check.searx.space`."""

View File

@ -1,147 +0,0 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""".. _limiter src:
Limiter
=======
.. sidebar:: info
The limiter requires a :ref:`Redis <settings redis>` database.
Bot protection / IP rate limitation. The intention of rate limitation is to
limit suspicious requests from an IP. The motivation behind this is the fact
that SearXNG passes through requests from bots and is thus classified as a bot
itself. As a result, the SearXNG engine then receives a CAPTCHA or is blocked
by the search engine (the origin) in some other way.
To avoid blocking, the requests from bots to SearXNG must also be blocked, this
is the task of the limiter. To perform this task, the limiter uses the methods
from the :py:obj:`searx.botdetection`.
To enable the limiter activate:
.. code:: yaml
server:
...
limiter: true # rate limit the number of request on the instance, block some bots
and set the redis-url connection. Check the value, it depends on your redis DB
(see :ref:`settings redis`), by example:
.. code:: yaml
redis:
url: unix:///usr/local/searxng-redis/run/redis.sock?db=0
"""
from __future__ import annotations
from pathlib import Path
from ipaddress import ip_address
import flask
import werkzeug
from searx.tools import config
from searx import logger
from . import (
http_accept,
http_accept_encoding,
http_accept_language,
http_connection,
http_user_agent,
ip_limit,
ip_lists,
)
from ._helpers import (
get_network,
get_real_ip,
dump_request,
)
logger = logger.getChild('botdetection.limiter')
CFG: config.Config = None # type: ignore
LIMITER_CFG_SCHEMA = Path(__file__).parent / "limiter.toml"
"""Base configuration (schema) of the botdetection."""
LIMITER_CFG = Path('/etc/searxng/limiter.toml')
"""Local Limiter configuration."""
CFG_DEPRECATED = {
# "dummy.old.foo": "config 'dummy.old.foo' exists only for tests. Don't use it in your real project config."
}
def get_cfg() -> config.Config:
global CFG # pylint: disable=global-statement
if CFG is None:
CFG = config.Config.from_toml(LIMITER_CFG_SCHEMA, LIMITER_CFG, CFG_DEPRECATED)
return CFG
def filter_request(request: flask.Request) -> werkzeug.Response | None:
# pylint: disable=too-many-return-statements
cfg = get_cfg()
real_ip = ip_address(get_real_ip(request))
network = get_network(real_ip, cfg)
if request.path == '/healthz':
return None
# link-local
if network.is_link_local:
return None
# block- & pass- lists
#
# 1. The IP of the request is first checked against the pass-list; if the IP
# matches an entry in the list, the request is not blocked.
# 2. If no matching entry is found in the pass-list, then a check is made against
# the block list; if the IP matches an entry in the list, the request is
# blocked.
# 3. If the IP is not in either list, the request is not blocked.
match, msg = ip_lists.pass_ip(real_ip, cfg)
if match:
logger.warning("PASS %s: matched PASSLIST - %s", network.compressed, msg)
return None
match, msg = ip_lists.block_ip(real_ip, cfg)
if match:
logger.error("BLOCK %s: matched BLOCKLIST - %s", network.compressed, msg)
return flask.make_response(('IP is on BLOCKLIST - %s' % msg, 429))
# methods applied on /
for func in [
http_user_agent,
]:
val = func.filter_request(network, request, cfg)
if val is not None:
return val
# methods applied on /search
if request.path == '/search':
for func in [
http_accept,
http_accept_encoding,
http_accept_language,
http_connection,
http_user_agent,
ip_limit,
]:
val = func.filter_request(network, request, cfg)
if val is not None:
return val
logger.debug(f"OK {network}: %s", dump_request(flask.request))
return None

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""" """
Method ``link_token`` Method ``link_token``
--------------------- ---------------------
@ -29,7 +28,7 @@ And in the HTML template from flask a stylesheet link is needed (the value of
<link rel="stylesheet" <link rel="stylesheet"
href="{{ url_for('client_token', token=link_token) }}" href="{{ url_for('client_token', token=link_token) }}"
type="text/css" /> type="text/css" >
.. _X-Forwarded-For: .. _X-Forwarded-For:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
@ -83,7 +82,7 @@ def is_suspicious(network: IPv4Network | IPv6Network, request: flask.Request, re
ping_key = get_ping_key(network, request) ping_key = get_ping_key(network, request)
if not redis_client.get(ping_key): if not redis_client.get(ping_key):
logger.warning("missing ping (IP: %s) / request: %s", network.compressed, ping_key) logger.info("missing ping (IP: %s) / request: %s", network.compressed, ping_key)
return True return True
if renew: if renew:
@ -99,15 +98,13 @@ def ping(request: flask.Request, token: str):
The expire time of this ping-key is :py:obj:`PING_LIVE_TIME`. The expire time of this ping-key is :py:obj:`PING_LIVE_TIME`.
""" """
from . import limiter # pylint: disable=import-outside-toplevel, cyclic-import from . import redis_client, cfg # pylint: disable=import-outside-toplevel, cyclic-import
redis_client = redisdb.client()
if not redis_client: if not redis_client:
return return
if not token_is_valid(token): if not token_is_valid(token):
return return
cfg = limiter.get_cfg()
real_ip = ip_address(get_real_ip(request)) real_ip = ip_address(get_real_ip(request))
network = get_network(real_ip, cfg) network = get_network(real_ip, cfg)

View File

@ -1,73 +1,18 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint """Compatibility with older versions"""
# pyright: basic
"""Module for backward compatibility.
""" # pylint: disable=unused-import
# pylint: disable=C,R
__all__ = [
"tomllib",
]
__all__ = ('cached_property',) import sys
# TOML (lib) compatibility
# ------------------------
try: if sys.version_info >= (3, 11):
from functools import cached_property # type: ignore import tomllib
else:
except ImportError: import tomli as tomllib
# cache_property has been added in py3.8 [1]
#
# To support cache_property in py3.7 the implementation from 3.8 has been
# copied here. This code can be cleanup with EOL of py3.7.
#
# [1] https://docs.python.org/3/library/functools.html#functools.cached_property
from threading import RLock
_NOT_FOUND = object()
class cached_property:
def __init__(self, func):
self.func = func
self.attrname = None
self.__doc__ = func.__doc__
self.lock = RLock()
def __set_name__(self, owner, name):
if self.attrname is None:
self.attrname = name
elif name != self.attrname:
raise TypeError(
"Cannot assign the same cached_property to two different names "
f"({self.attrname!r} and {name!r})."
)
def __get__(self, instance, owner=None):
if instance is None:
return self
if self.attrname is None:
raise TypeError("Cannot use cached_property instance without calling __set_name__ on it.")
try:
cache = instance.__dict__
except AttributeError: # not all objects have __dict__ (e.g. class defines slots)
msg = (
f"No '__dict__' attribute on {type(instance).__name__!r} "
f"instance to cache {self.attrname!r} property."
)
raise TypeError(msg) from None
val = cache.get(self.attrname, _NOT_FOUND)
if val is _NOT_FOUND:
with self.lock:
# check if another thread filled cache while we awaited lock
val = cache.get(self.attrname, _NOT_FOUND)
if val is _NOT_FOUND:
val = self.func(instance)
try:
cache[self.attrname] = val
except TypeError:
msg = (
f"The '__dict__' attribute on {type(instance).__name__!r} instance "
f"does not support item assignment for caching {self.attrname!r} property."
)
raise TypeError(msg) from None
return val

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""This module holds the *data* created by:: """This module holds the *data* created by::
make data.all make data.all
@ -15,6 +14,7 @@ __all__ = [
'EXTERNAL_BANGS', 'EXTERNAL_BANGS',
'OSM_KEYS_TAGS', 'OSM_KEYS_TAGS',
'ENGINE_DESCRIPTIONS', 'ENGINE_DESCRIPTIONS',
'LOCALES',
'ahmia_blacklist_loader', 'ahmia_blacklist_loader',
] ]
@ -50,3 +50,4 @@ EXTERNAL_BANGS = _load('external_bangs.json')
OSM_KEYS_TAGS = _load('osm_keys_tags.json') OSM_KEYS_TAGS = _load('osm_keys_tags.json')
ENGINE_DESCRIPTIONS = _load('engine_descriptions.json') ENGINE_DESCRIPTIONS = _load('engine_descriptions.json')
ENGINE_TRAITS = _load('engine_traits.json') ENGINE_TRAITS = _load('engine_traits.json')
LOCALES = _load('locales.json')

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

69
searx/data/locales.json Normal file
View File

@ -0,0 +1,69 @@
{
"LOCALE_NAMES": {
"af": "Afrikaans",
"ar": "العربية (Arabic)",
"bg": "Български (Bulgarian)",
"bn": "বাংলা (Bangla)",
"bo": "བོད་སྐད་ (Tibetan)",
"ca": "Català (Catalan)",
"cs": "Čeština (Czech)",
"cy": "Cymraeg (Welsh)",
"da": "Dansk (Danish)",
"de": "Deutsch (German)",
"dv": "ދިވެހި (Dhivehi)",
"el-GR": "Ελληνικά, Ελλάδα (Greek, Greece)",
"en": "English",
"eo": "Esperanto",
"es": "Español (Spanish)",
"et": "Eesti (Estonian)",
"eu": "Euskara (Basque)",
"fa-IR": "فارسی, ایران (Persian, Iran)",
"fi": "Suomi (Finnish)",
"fil": "Filipino",
"fr": "Français (French)",
"gl": "Galego (Galician)",
"he": "עברית (Hebrew)",
"hr": "Hrvatski (Croatian)",
"hu": "Magyar (Hungarian)",
"ia": "Interlingua",
"id": "Indonesia (Indonesian)",
"it": "Italiano (Italian)",
"ja": "日本語 (Japanese)",
"ko": "한국어 (Korean)",
"lt": "Lietuvių (Lithuanian)",
"lv": "Latviešu (Latvian)",
"ml": "മലയാളം (Malayalam)",
"ms": "Melayu (Malay)",
"nb-NO": "Norsk bokmål, Norge (Norwegian bokmål, Norway)",
"nl": "Nederlands (Dutch)",
"nl-BE": "Nederlands, België (Dutch, Belgium)",
"oc": "Occitan",
"pa": "ਪੰਜਾਬੀ (Punjabi)",
"pap": "Papiamento",
"pl": "Polski (Polish)",
"pt": "Português (Portuguese)",
"pt-BR": "Português, Brasil (Portuguese, Brazil)",
"ro": "Română (Romanian)",
"ru": "Русский (Russian)",
"si": "සිංහල (Sinhala)",
"sk": "Slovenčina (Slovak)",
"sl": "Slovenščina (Slovenian)",
"sr": "Српски (Serbian)",
"sv": "Svenska (Swedish)",
"szl": "Ślōnski (Silesian)",
"ta": "தமிழ் (Tamil)",
"te": "తెలుగు (Telugu)",
"th": "ไทย (Thai)",
"tr": "Türkçe (Turkish)",
"uk": "Українська (Ukrainian)",
"vi": "Tiếng việt (Vietnamese)",
"zh-HK": "中文, 中國香港特別行政區 (Chinese, Hong Kong SAR China)",
"zh-Hans-CN": "中文, 中国 (Chinese, China)",
"zh-Hant-TW": "中文, 台灣 (Chinese, Taiwan)"
},
"RTL_LOCALES": [
"ar",
"fa-IR",
"he"
]
}

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
{ {
"versions": [
"117.0",
"116.0"
],
"os": [ "os": [
"Windows NT 10.0; Win64; x64", "Windows NT 10.0; Win64; x64",
"X11; Linux x86_64" "X11; Linux x86_64"
], ],
"ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}" "ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}",
"versions": [
"132.0",
"131.0"
]
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Implementations of the framework for the SearXNG engines. """Implementations of the framework for the SearXNG engines.
.. hint:: .. hint::

View File

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Engine's traits are fetched from the origin engines and stored in a JSON file """Engine's traits are fetched from the origin engines and stored in a JSON file
in the *data folder*. Most often traits are languages and region codes and in the *data folder*. Most often traits are languages and region codes and
their mapping from SearXNG's representation to the representation in the origin their mapping from SearXNG's representation to the representation in the origin
@ -14,8 +13,7 @@ from __future__ import annotations
import json import json
import dataclasses import dataclasses
import types import types
from typing import Dict, Iterable, Union, Callable, Optional, TYPE_CHECKING from typing import Dict, Literal, Iterable, Union, Callable, Optional, TYPE_CHECKING
from typing_extensions import Literal, Self
from searx import locales from searx import locales
from searx.data import data_dir, ENGINE_TRAITS from searx.data import data_dir, ENGINE_TRAITS
@ -136,7 +134,7 @@ class EngineTraits:
return EngineTraits(**dataclasses.asdict(self)) return EngineTraits(**dataclasses.asdict(self))
@classmethod @classmethod
def fetch_traits(cls, engine: Engine) -> Union[Self, None]: def fetch_traits(cls, engine: Engine) -> Union['EngineTraits', None]:
"""Call a function ``fetch_traits(engine_traits)`` from engines namespace to fetch """Call a function ``fetch_traits(engine_traits)`` from engines namespace to fetch
and set properties from the origin engine in the object ``engine_traits``. If and set properties from the origin engine in the object ``engine_traits``. If
function does not exists, ``None`` is returned. function does not exists, ``None`` is returned.
@ -168,7 +166,7 @@ class EngineTraits:
# - name: google italian # - name: google italian
# engine: google # engine: google
# language: it # language: it
# region: it-IT # region: it-IT # type: ignore
traits = self.copy() traits = self.copy()
@ -204,7 +202,7 @@ class EngineTraitsMap(Dict[str, EngineTraits]):
json.dump(self, f, indent=2, sort_keys=True, cls=EngineTraitsEncoder) json.dump(self, f, indent=2, sort_keys=True, cls=EngineTraitsEncoder)
@classmethod @classmethod
def from_data(cls) -> Self: def from_data(cls) -> 'EngineTraitsMap':
"""Instantiate :class:`EngineTraitsMap` object from :py:obj:`ENGINE_TRAITS`""" """Instantiate :class:`EngineTraitsMap` object from :py:obj:`ENGINE_TRAITS`"""
obj = cls() obj = cls()
for k, v in ENGINE_TRAITS.items(): for k, v in ENGINE_TRAITS.items():
@ -212,7 +210,7 @@ class EngineTraitsMap(Dict[str, EngineTraits]):
return obj return obj
@classmethod @classmethod
def fetch_traits(cls, log: Callable) -> Self: def fetch_traits(cls, log: Callable) -> 'EngineTraitsMap':
from searx import engines # pylint: disable=cyclic-import, import-outside-toplevel from searx import engines # pylint: disable=cyclic-import, import-outside-toplevel
names = list(engines.engines) names = list(engines.engines)

View File

@ -1,11 +1,12 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
""" # pylint: disable=invalid-name
1337x """1337x
""" """
from urllib.parse import quote, urljoin from urllib.parse import quote, urljoin
from lxml import html from lxml import html
from searx.utils import extract_text, get_torrent_size, eval_xpath, eval_xpath_list, eval_xpath_getindex from searx.utils import extract_text, eval_xpath, eval_xpath_list, eval_xpath_getindex
# about # about
about = { about = {
@ -39,9 +40,7 @@ def response(resp):
title = extract_text(eval_xpath(result, './td[contains(@class, "name")]/a[2]')) title = extract_text(eval_xpath(result, './td[contains(@class, "name")]/a[2]'))
seed = extract_text(eval_xpath(result, './/td[contains(@class, "seeds")]')) seed = extract_text(eval_xpath(result, './/td[contains(@class, "seeds")]'))
leech = extract_text(eval_xpath(result, './/td[contains(@class, "leeches")]')) leech = extract_text(eval_xpath(result, './/td[contains(@class, "leeches")]'))
filesize_info = extract_text(eval_xpath(result, './/td[contains(@class, "size")]/text()')) filesize = extract_text(eval_xpath(result, './/td[contains(@class, "size")]/text()'))
filesize, filesize_multiplier = filesize_info.split()
filesize = get_torrent_size(filesize, filesize_multiplier)
results.append( results.append(
{ {

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