| Age | Commit message (Collapse) | Author |
|
|
|
Co-authored-by: Bnyro <bnyro@tutanota.com>
|
|
|
|
|
|
Ahmia recently implemented a 60 minute rotating token system when searching.
This fix uses the cache and updates the tokens on every request.
|
|
For some reason, I keep getting this error from the brave engine:
httpx.DecodingError: BrotliDecoderDecompressStream failed while processing the stream
Forcing the server to use either gzip or deflate fixes this issue.
This makes the brave engine work when the server seems to be encoding brotli incorrectly, or at least in a way incompatible with certain installs.
Related:
- https://github.com/searxng/searxng/pull/1787
- https://github.com/searxng/searxng/pull/5536
|
|
|
|
|
|
|
|
Mojeek blocks all requests where the page offset parameter `s`
is set to 0, hence we may not set it for fetching the first results page.
|
|
|
|
* [mod] client/simple: client plugins
Defines a new interface for client side *"plugins"* that coexist with server
side plugin system. Each plugin (e.g., `InfiniteScroll`) extends the base
`ts Plugin`. Client side plugins are independent and lazy‑loaded via `router.ts`
when their `load()` conditions are met. On each navigation request, all
applicable plugins are instanced.
Since these are client side plugins, we can only invoke them once DOM is fully
loaded. E.g. `Calculator` will not render a new `answer` block until fully
loaded and executed.
For some plugins, we might want to handle its availability in `settings.yml`
and toggle in UI, like we do for server side plugins. In that case, we extend
`py Plugin` instancing only the information and then checking client side if
[`settings.plugins`](https://github.com/inetol/searxng/blob/1ad832b1dc33f3f388da361ff2459b05dc86a164/client/simple/src/js/toolkit.ts#L134)
array has the plugin id.
* [mod] client/simple: rebuild static
|
|
there are other classes like 'site-name-content' we don't want to match,
however only using contains(@class, 'content') would e.g. also match `site-name-content`
thus, we explicitly also require the spaces as class separator
|
|
brave web:
xpath selectors needed to be justified
brave images & videos:
The JS code with the JS object was read incorrectly; not always, but quite
often, it led to exceptions when the Python data structure was created from it.
BTW: A complete review was conducted and corrections or additions were made to
the type definitions.
To test all brave engines in once::
!br !brimg !brvid !brnews weather
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
This patch is based on PR #2792 (old PR from 2023)
- js_obj_str_to_python handle more cases
- bring tests from chompjs ..
- comment out tests do not pass
The tests from chompjs give some overview of what is not implemented.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Add support for Yandex's supported languages; Russian, English, Belarusian,
French, German, Indonesian, Kazakh, Tatar, Turkish and Ukrainian.
|
|
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>
|
|
- 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>
|
|
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.
|
|
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
|
|
|
|
Fix typo in engine timeout definition: 'timout' -> 'timeout'
|
|
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>
|
|
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
|
|
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`.
|
|
- 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
|
|
|
|
The difference between decompression with brotli or gzip in HTML files is
negligible for 3 MB of compiled binary package.
Introduced in https://github.com/searxng/searxng/commit/eaa694fb7d0e47b943bc6d6edb6cb6a40ab2d85e
Closes https://github.com/searxng/searxng/security/code-scanning/276
Closes https://github.com/searxng/searxng/security/dependabot/37
|
|
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
|
|
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>
|
|
including version (#5414)
|
|
|
|
Pagination currently does not work for deviantart, resulting in the same page
being shown when going to the next page in SearXNG.
|
|
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
|
|
|
|
(#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.
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Apparently, in China, Bing redirects from `www.bing.com` to `cn.bing.com`.
So in order to make Bing work for chinese users by default, we have to follow that redirect.
related: https://github.com/searxng/searxng/issues/5243
|
|
Adds a new engine `searx/engines/azure.py` to search cloud resources on Azure.
A lot of enterprise users have to deal with Azure Public Cloud. This helps them
easily search for cloud resources without logging in to the Portal first
How to test this PR locally?
You should create an App Registration on Azure Entra Id with Reader access on
the resources you want to search for. You should create a Secret for the App
Registration. After that, you should set up appropriate values in the
`settings.yml` file [1]::
- name: azure
engine: azure
...
azure_tenant_id: "your_tenant_id"
azure_client_id: "your_client_id"
azure_client_secret: "your_client_secret"
azure_token_expiration_seconds: 5000
[1] https://github.com/searxng/searxng/pull/5235#issuecomment-3397664928
Co-authored-by: Bnyro <bnyro@tutanota.com>
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
uploader name (#5314)
closes #5231
|
|
The Name of the option is *disable_family_filter* -> we have to reverse the
meaning of the ascending safe-search filter level.
Closes: https://github.com/searxng/searxng/issues/5287
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
In the case of .. response, for example, an HTTP 302 is returned by Google
Scholar::
Our systems have detected unusual traffic from your computer
network. Please try again later.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
cppreference has replaced its search (``mwiki/index.php?title=``) with a DDG
search.
The engine was first introduced in SearXNG with PR-3274 [1], and even back then
the mediawiki proved to be incompatible, which is why the API could not be used
at the time. Now there isn't even a dedicated search function anymore.. I think
the cppreference project suffers from a lack of maintenance.
[1] https://github.com/searxng/searxng/pull/3247
Closes: https://github.com/searxng/searxng/issues/5271
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
In some engines, under certain circumstances, the content field can also have
the value ``None``; in these cases, a length check results in an exception::
File "/usr/local/searxng/searx/results.py", line 360, in merge_two_main_results
if len(other.content) > len(origin.content):
^^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
[1] https://github.com/searxng/searxng/issues/5250#issuecomment-3352863488
Reported-by: @scross01 [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
The ``JSONEncoder`` (``format="json"``) must perform a conversion to the
built-in types for the ``msgspec.Struct``::
if isinstance(o, msgspec.Struct):
return msgspec.to_builtins(o)
The result types are already of type ``msgspec.Struct``, so they can be
converted into built-in types.
The field types (in the result type) that were not yet of type ``msgspec.Struct``
have been converted to::
searx.weather.GeoLocation@dataclass -> msgspec.Struct
searx.weather.DateTime -> msgspec.Struct
searx.weather.Temperature -> msgspec.Struct
searx.weather.PressureUnits -> msgspec.Struct
searx.weather.WindSpeed -> msgspec.Struct
searx.weather.RelativeHumidity -> msgspec.Struct
searx.weather.Compass -> msgspec.Struct
BTW: Wherever it seemed sensible, the typing was also modernized in the modified
files.
Closes: https://github.com/searxng/searxng/issues/5250
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
This patch is a leftover from PR-5204 [1].
[1] https://github.com/searxng/searxng/pull/5204
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|