5788 Commits

Author SHA1 Message Date
Aadniz
bcc7a5eb2e [mod] yandex engine: add supported languages
Add support for Yandex's supported languages; Russian, English, Belarusian,
French, German, Indonesian, Kazakh, Tatar, Turkish and Ukrainian.
2025-11-25 11:50:18 +01:00
Markus Heiser
2313b972a3 [fix] engines: base URL can be a list or a string, but its not None!
The code injection and monkey patching examine the names in the module of the
engine; if a variable there starts without an underscore and has the value None,
then this variable needs to be configured. This outdated concept does not fit
engines that may have multiple URLs. At least not as long as the value of the
base URL (list) is None.

The default is now an empty list instead of None

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-11-25 06:25:45 +01:00
Markus Heiser
989b49335c [fix] engines initialization - if engine load fails, set to inactive
- if engine load fails, set the engine to inactive
- dont' load a engine, when the config says its inactive

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-11-25 06:25:45 +01:00
Markus Heiser
3f30831640 [fix] don't raise fatal exception when engine isn't available
When wikidata or any other engine with a init method (is active!)  raises an
exception in it's init method, the engine is never registered.

[1] https://github.com/searxng/searxng/issues/5456#issuecomment-3567790287

Closes: https://github.com/searxng/searxng/issues/5456
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-11-25 06:25:45 +01:00
Hermógenes Oliveira
5fcee9bc30
[fix] recoll engine: remove HTML markup from result snippets (#5472)
Recoll inserts markup tags in snippets to indicate matching terms in a
search query.  We remove them so that they don't show to users.
2025-11-24 06:54:45 +01:00
Grant
c0d69cec4e
[fix] drop mullvad-leta engine (#5428)
On 2025 November 27th, Mullvad will be shutting down the Leta servers.
For this reason, we also need to remove this engine from SearXNG.

[1] https://mullvad.net/en/blog/shutting-down-our-search-proxy-leta
2025-11-22 10:02:51 +01:00
Austin-Olacsi
c852b9a90a
[feat] engine: add grokipedia (#5396) 2025-11-22 09:59:38 +01:00
Léon Tiekötter
e245cade25
[fix] engines: typo (#5466)
Fix typo in engine timeout definition: 'timout' -> 'timeout'
2025-11-21 11:20:10 +01:00
Markus Heiser
ca441f419c
[fix] engines - set hard timouts in *sub-request* (#5460)
The requests changed here all run outside of the network context timeout,
thereby preventing the engine's timeout from being applied (the engine's timeout
can become longer than it was configured).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-11-21 08:16:24 +01:00
searxng-bot
04e66a2bb4 [l10n] update translations from Weblate 2025-11-20 21:22:43 +00:00
Markus Heiser
b299386d3e
[fix] minor type hint issues (#5459)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-11-20 18:35:43 +01:00
Markus Heiser
21a4622f23
[fix] utils.js_variable_to_python - partial revert of 156d1eb8c (#5458)
The JS string, whose encoding will be corrupted if all single quotes (followed
by a comma) are replaced with double quotes. Bug was introduced in PR #4573.

Here is a simple example in which the list get corrupted::

    >>> s = r"""[ 'foo\'', 'bar']"""
    >>> print(s)
    [ 'foo\'', 'bar']
    >>> print(s.replace("',", "\","))
    [ 'foo\'", 'bar']

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-11-20 18:32:27 +01:00
Bnyro
041f457dfa [fix] presearch engine: blocked by captcha on every request
Presearch responds with a Cloudflare captcha on each request when using HTTP2.
Using HTTP1.1, everything seems to work fine.

- other engines with the same issue: pixabay, uxwing
- closes https://github.com/searxng/searxng/issues/5438
2025-11-20 13:48:13 +01:00
Hermógenes Oliveira
af111e413c [fix] recoll engine: fix media preview
The results from the recoll engine were not displaying the usual
toggle for showing media previews. After the changes described bellow,
the toggle is displayed and works as expected.

In the JSON returned by recoll-webui, the field containing the
mimetype is actually `mtype`, not `mime`.

Furthermore, according to the documentation for the `File` class in
`searx/result_types/file.py`, `embedded` should contain the URL to the
media itself. The embedding of the media into the page for preview is
done in `searx/templates/simple/result_templates/file.html`.
2025-11-20 13:24:17 +01:00
Austin-Olacsi
d14d695966
[fix] drop alexandria.org (#5446) 2025-11-15 07:38:17 +01:00
Bnyro
ba98030438 [feat] engines: add devicons engine
- official website: https://devicon.dev/
- the engine contains a lot of icons of popular software frameworks (e.g. pytest),
so they could for example be useful for visualizing a diagram of the tech stack used in an app
2025-11-14 20:26:43 +01:00
Austin-Olacsi
7a1b959646 [fix] hackernews contains HTML escape codes 2025-11-10 20:37:01 +01:00
dependabot[bot]
b9b46431be
[upd] web-client (simple): Bump the minor group in /client/simple with 4 updates (#5423)
* [upd] web-client (simple): Bump the minor group

Bumps the minor group in /client/simple with 4 updates: [ol](https://github.com/openlayers/openlayers), [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [sharp](https://github.com/lovell/sharp).

Updates `ol` from 10.6.1 to 10.7.0
- [Release notes](https://github.com/openlayers/openlayers/releases)
- [Commits](https://github.com/openlayers/openlayers/compare/v10.6.1...v10.7.0)

Updates `@biomejs/biome` from 2.3.2 to 2.3.4
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.3.4/packages/@biomejs/biome)

Updates `@types/node` from 24.9.2 to 24.10.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `sharp` from 0.34.4 to 0.34.5
- [Release notes](https://github.com/lovell/sharp/releases)
- [Commits](https://github.com/lovell/sharp/compare/v0.34.4...v0.34.5)

---
updated-dependencies:
- dependency-name: ol
  dependency-version: 10.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor
- dependency-name: "@biomejs/biome"
  dependency-version: 2.3.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor
- dependency-name: "@types/node"
  dependency-version: 24.10.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor
- dependency-name: sharp
  dependency-version: 0.34.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [upd] web-client (simple): rebuild static

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivan Gabaldon <igabaldon@inetol.net>
2025-11-07 10:48:05 +01:00
Aadniz
24d27a7a21 [fix] drop goo engine 2025-11-07 08:34:05 +01:00
Ivan Gabaldon
7af922c9df
[enh] py: drop deps (#5407)
The difference between decompression with brotli or gzip in HTML files is
negligible for 3 MB of compiled binary package.

Introduced in eaa694fb7d

Closes https://github.com/searxng/searxng/security/code-scanning/276
Closes https://github.com/searxng/searxng/security/dependabot/37
2025-11-06 10:09:10 +01:00
Aadniz
b1918dd121
[fix] yandex engine: capture captcha from header instead of url path (#5417)
Yandex engine will return parsing error instead of informing that a CAPTCHA was found. It is confusing for the admin and the users (#5415).


This patch fixes an issue where the CAPTCHA response from Yandex wouldn't be detected, resulting in `ParserError` when trying to parse the response to DOM.

In this fix, I replaced the url condition and instead is checking if the `x-yandex-captcha` header is set, and is equal to `captcha`.

Alternatively, maybe something like `resp.headers.get('Location', '').startswith("https://yandex.com/showcaptcha")` could be done instead. Lastly, setting `params['allow_redirects'] = True` can also work, but this will waste an extra request. Just let me know.

Closes: https://github.com/searxng/searxng/issues/5415
2025-11-06 07:00:48 +01:00
Bnyro
1be19f8b58 [feat] sourcehut engine: implement as custom module, fix user agent
SourceHut uses a foss bot protection tool called `go-away` (which I can
recommend BTW).  It blocks common crawler user agents, such as the standard
Firefox user agent.  Hence, we're now using our custom SearXNG user agent to
clarify we're not a crawler.

Closes: https://github.com/searxng/searxng/issues/5270
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2025-11-05 17:56:13 +01:00
Bnyro
3763b4bff4
[fix] engine ahmia blacklist, arch linux: use proper searxng user agent including version (#5414) 2025-11-05 09:19:42 +01:00
Aadniz
52ffc4c7f4
[fix] qwant engine: order query parameters to prevent 403 forbidden (#5410) 2025-11-03 22:53:50 +01:00
Markus Heiser
0245327fc5 Revert "[fix] !weather crashes - cls.TURN .. (#5309)"
This reverts HOTFIX from commit fc7d8b8b [1]

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-11-01 09:46:47 +01:00
Markus Heiser
b155e66fe5 [fix] msgspec.Struct: alias name t.ClassVar not properly detected
Reported in [1], HOTFIX in [2], this patch here is now the final solution.

Note that if using PEP 563 postponed evaluation of annotations" (e.g. ``from
__future__ import annotations``) only the following spellings will work:

    ClassVar or ClassVar[<type>]
    typing.ClassVar or typing.ClassVar[<type>]

Importing ClassVar or typing under an aliased name (e.g. ``import typing as t``)
will not be properly detected. [3]

[1] https://github.com/searxng/searxng/issues/5304#issuecomment-3394140820
[2] https://github.com/searxng/searxng/pull/5309
[3] https://jcristharif.com/msgspec/structs.html#class-variables

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-11-01 09:46:47 +01:00
github-actions[bot]
b37d09557a
[l10n] update translations from Weblate (#5404)
0bdbdde2e - 2025-10-26 - 0ko <0ko@noreply.codeberg.org>
7b0abb9aa - 2025-10-27 - artens <artens@noreply.codeberg.org>
882a28944 - 2025-10-27 - langckx <langckx@noreply.codeberg.org>
c2d025563 - 2025-10-25 - Flyingfufu <flyingfufu@noreply.codeberg.org>
2025-10-31 08:27:05 +01:00
Markus Heiser
9c2b8f2f93 [data] update searx.data - update_ahmia_blacklist.py
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-10-30 07:40:20 +01:00
Markus Heiser
6a2196c03d
[fix] simple theme: fix *play* icon in the "show media" button (#5395)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-10-30 07:39:48 +01:00
github-actions[bot]
dce383881d
[data] update searx.data - update_firefox_version.py (#5388) 2025-10-29 07:15:11 +01:00
github-actions[bot]
1ebedcbc17
[data] update searx.data - update_wikidata_units.py (#5389) 2025-10-29 07:14:31 +01:00
github-actions[bot]
5d99877d8d
[data] update searx.data - update_currencies.py (#5390)
Co-authored-by: searxng-bot <searxng-bot@users.noreply.github.com>
2025-10-29 07:13:53 +01:00
github-actions[bot]
adc1a2a1ea
[data] update searx.data - update_engine_descriptions.py (#5391)
Co-authored-by: searxng-bot <searxng-bot@users.noreply.github.com>
2025-10-29 07:13:19 +01:00
Aadniz
43065c5026
[fix] deviantart engine: pagination match change (#5384)
Pagination currently does not work for deviantart, resulting in the same page
being shown when going to the next page in SearXNG.
2025-10-28 06:21:40 +01:00
Aadniz
ea4a55fa57
[fix] qwant engine: set header Accept-Language to bypass bot detection (#5382)
Set HTTP header Accept-Language [1] for the Qwant engine.

Qwant does not seem to work on any SearXNG instance right now, and this is a fix
for this issue.

During testing, it seems like setting the Accept-Language gives more success for
bypassing bot detection (tested with a few ~20 searches).

[1] https://docs.searxng.org/dev/engines/enginelib.html#searx.enginelib.Engine.send_accept_language_header
2025-10-27 08:33:07 +01:00
Aadniz
d514dea5cc
[fix] deviantart engine: does not return any results (#5383) 2025-10-27 08:02:01 +01:00
Aadniz
22e1d30017
[fix] startpage engine: properly display CAPTCHA if redirect page is seen (#5380)
Fixes an issue where startpage engine would display parsing error
(`json.decoder.JSONDecodeError`) when returning CAPTCHA redirect page.

The fix simply checks if response header has `Location` set, and if it starts
with `https://www.startpage.com/sp/captcha`, it will raise a CAPTCHA exception
before trying to parse the data.
2025-10-26 11:32:45 +01:00
Aadniz
4ca75a0450
[fix] engine qwant - return forbidden instead of showing parse error (#5377) 2025-10-25 13:43:37 +02:00
Bnyro
50a4c653dc [build] /static 2025-10-25 10:00:28 +02:00
Ivan Gabaldon
edfa71cdea [mod] rebuild static 2025-10-24 12:32:43 +02:00
Ivan Gabaldon
8dacbbbb15 [fix] client/simple: insecure ctx clipboard copy
Uses the deprecated [`execCommand()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand)
to copy content to clipboard if accessing the instance through HTTP, this method
isn't going away soon.

Closes https://github.com/searxng/searxng/issues/5359
2025-10-24 12:32:43 +02:00
github-actions[bot]
2c880f6084
[l10n] update translations from Weblate (#5370)
55c0cab85 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
7705bba80 - 2025-10-21 - Outbreak2096 <outbreak2096@noreply.codeberg.org>
d2ee86058 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
8c4478ca3 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
147ba039a - 2025-10-21 - return42 <return42@noreply.codeberg.org>
2d9a206e8 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
024e2f1c7 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
8059378af - 2025-10-21 - return42 <return42@noreply.codeberg.org>
4b4359eea - 2025-10-21 - return42 <return42@noreply.codeberg.org>
05af879c9 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
0ea9d6393 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
e2e0907ff - 2025-10-21 - return42 <return42@noreply.codeberg.org>
9a7cfc1c1 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
06b7d62f0 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
a3bc054a5 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
34e56b171 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
8cc444358 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
55afa16d1 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
a336dd1ae - 2025-10-21 - return42 <return42@noreply.codeberg.org>
ec68a405a - 2025-10-21 - return42 <return42@noreply.codeberg.org>
beeab8c25 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
44a5c9e04 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
aef218710 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
42923cf46 - 2025-10-21 - Priit Jõerüüt <jrtcdbrg@noreply.codeberg.org>
3cab50a73 - 2025-10-22 - jperegrinm <jperegrinm@noreply.codeberg.org>
410e760d5 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
bb5e921c3 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
eece61f04 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
1f18156d5 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
20026535d - 2025-10-21 - return42 <return42@noreply.codeberg.org>
fcc563bf8 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
ec02a81da - 2025-10-21 - return42 <return42@noreply.codeberg.org>
78125c9e6 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
7a4b89369 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
d02406831 - 2025-10-21 - return42 <return42@noreply.codeberg.org>
8fe4022cb - 2025-10-21 - return42 <return42@noreply.codeberg.org>
0e8cdcaa8 - 2025-10-20 - SomeTr <sometr@noreply.codeberg.org>
4b138b0dc - 2025-10-20 - Juno Takano <jutty@noreply.codeberg.org>
d20e2c9c1 - 2025-10-20 - ghose <ghose@noreply.codeberg.org>
2025-10-24 10:34:09 +02:00
Markus Heiser
33e798b01b
[fix] TrackerPatternsDB.clean_url: don't delete query argument from new_url (#5339)
The query argument for URLs like:

- 'http://example.org?q='       --> query_str is 'q='
- 'http://example.org?/foo/bar' --> query_str is 'foo/bar'

is a *simple string* and not a key/value dict.  This string may only be removed
from the URL if one of the patterns matches.

BTW get_pretty_url(): keep such a *simple string* in the path element.

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-10-20 11:20:33 +02:00
Markus Heiser
d84ae96cf9 [build] /static 2025-10-20 10:18:33 +02:00
Markus Heiser
9371658531 [mod] typification of SearXNG: add new result type File
This PR adds a new result type: File

    Python class: searx/result_types/file.py
    Jinja template: searx/templates/simple/result_templates/file.html
    CSS (less) client/simple/src/less/result_types/file.less

Class 'File' (singular) replaces template 'files.html' (plural).  The renaming
was carried out because there is only one file (singular) in a result. Not to be
confused with the category 'files' where in multiple results can exist.

As mentioned in issue [1], the class '.category-files' was removed from the CSS
and the stylesheet was adopted in result_types/file.less (there based on the
templates and no longer based on the category).

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-10-20 10:18:33 +02:00
Markus Heiser
ee6d4f322f [mod] engine: reuters - REST-API for Reuter's thumbnail, height:80
The size of the full-size images from ``thumbnail.url`` is usually several
MB. By reducing the full-size image to 80 pixels, the data size for a thumb is
reduced from MB to a few KB.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-10-18 14:43:35 +02:00
Bnyro
3725aef6f3 [fix] reuters: crash on empty results pages & date parsing
1. On empty result list, return empty EngineResults (#5330)

2. Use ``dateutil.parser`` to avoid ``ValueError``:

    ERROR   searx.engines.reuters : exception : Invalid isoformat string: '2022-06-08T16:07:54Z'
      File "searx/engines/reuters.py", line 91, in response
        publishedDate=datetime.fromisoformat(result["display_time"]),
    ValueError: Invalid isoformat string: '2022-06-08T16:07:54Z'

Closes: https://github.com/searxng/searxng/issues/5330
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2025-10-18 14:43:35 +02:00
Markus Heiser
e840e3f960 [fix] engine mullvadleta - ignore HTTP 403 & 429 response
It doesn't matter if you're using Mullvad's VPN and a proper browser, you'll
still get blocked for specific searches [1] with a 403 or 429 HTTP status code.
Mullvad only blocks the search request and doesn't prevent you from doing more
searches.

The logic should handle the blocked requests (403, 429), but not put the engine
on a cooldown.

[1] https://leta.mullvad.net/search?q=site%3Afoo+bar&engine=brave

Closes: https://github.com/searxng/searxng/issues/5328
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-10-18 09:05:54 +02:00
Bnyro
a6bb1ecf87 [build] /static 2025-10-17 15:59:53 +02:00
Bnyro
636738779e [feat] video results: display video length on video thumbnail 2025-10-17 15:59:53 +02:00