5 Commits

Author SHA1 Message Date
Ivan Gabaldon
26a2f16649 Revert "[upd] pypi: Bump the minor group across 1 directory with 3 updates (#…"
This reverts commit e8e710e42a.
2026-08-12 01:32:55 +02:00
dependabot[bot]
e8e710e42a [upd] pypi: Bump the minor group across 1 directory with 3 updates (#6495)
Bumps the minor group with 3 updates in the / directory: [typer](https://github.com/fastapi/typer), [wlc](https://github.com/WeblateOrg/wlc) and [granian](https://github.com/emmett-framework/granian).


Updates `typer` from 0.27.0 to 0.27.1
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.27.0...0.27.1)

Updates `wlc` from 2.1.0 to 2.1.1
- [Release notes](https://github.com/WeblateOrg/wlc/releases)
- [Changelog](https://github.com/WeblateOrg/wlc/blob/main/CHANGES.rst)
- [Commits](https://github.com/WeblateOrg/wlc/compare/2.1.0...2.1.1)

Updates `granian` from 2.7.9 to 2.8.0
- [Release notes](https://github.com/emmett-framework/granian/releases)
- [Commits](https://github.com/emmett-framework/granian/compare/v2.7.9...v2.8.0)

---
updated-dependencies:
- dependency-name: typer
  dependency-version: 0.27.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor
- dependency-name: wlc
  dependency-version: 2.1.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor
- dependency-name: granian
  dependency-version: 2.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-11 17:45:08 +02:00
dependabot[bot]
7b0c7f0bf8 [upd] github-actions: Bump docker/login-action from 4.5.2 to 4.6.0 (#6493)
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.5.2 to 4.6.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](371161bbe7...dbcb813823)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-11 17:38:34 +02:00
github-actions[bot]
e033be7c7c [l10n] update translations from Weblate (#6496)
8f9804206 - 2026-08-03 - Aindriú Mac Giolla Eoin <aindriu80@noreply.codeberg.org>
6850566e7 - 2026-08-04 - mvtbh <mvtbh@noreply.codeberg.org>
f97257801 - 2026-08-01 - ShinyDust <shinydust@noreply.codeberg.org>

Co-authored-by: searxng-bot <searxng-bot@users.noreply.github.com>
2026-08-11 17:37:46 +02:00
Bnyro
0a118066d8 [feat] engines: add jina (general) 2026-08-10 14:14:33 +02:00
4 changed files with 107 additions and 4 deletions

View File

@@ -50,7 +50,7 @@ jobs:
steps:
- name: Login to GHCR
uses: docker/login-action@371161bbe7024a29a25c5e19bfcbc0804fe9ad2c # v4.5.2
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: "ghcr.io"
username: "${{ github.repository_owner }}"
@@ -110,7 +110,7 @@ jobs:
steps:
- name: Login to GHCR
uses: docker/login-action@371161bbe7024a29a25c5e19bfcbc0804fe9ad2c # v4.5.2
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: "ghcr.io"
username: "${{ github.repository_owner }}"
@@ -144,14 +144,14 @@ jobs:
steps:
- name: Login to Docker Hub
uses: docker/login-action@371161bbe7024a29a25c5e19bfcbc0804fe9ad2c # v4.5.2
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: "docker.io"
username: "${{ secrets.DOCKER_USER }}"
password: "${{ secrets.DOCKER_TOKEN }}"
- name: Login to GHCR
uses: docker/login-action@371161bbe7024a29a25c5e19bfcbc0804fe9ad2c # v4.5.2
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: "ghcr.io"
username: "${{ github.repository_owner }}"

View File

@@ -0,0 +1,8 @@
.. _jina engine:
===========
Jina Engine
===========
.. automodule:: searx.engines.jina
:members:

89
searx/engines/jina.py Normal file
View File

@@ -0,0 +1,89 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Jina is a search AI and part of Elastic, the company behind ElasticSearch.
The engine requires an API key, you can get one from the
`API dashboard <https://jina.ai/api-dashboard/>`_ without signup.
.. code:: yaml
- name: jina
engine: jina
shortcut: ji
api_key: "jina_..."
jina_engine: reader
inactive: false
By default, Jina's own index is used. You can change that by setting a different :py:obj:`jina_engine`.
"""
import typing as t
from urllib.parse import urlencode
from dateutil import parser
from searx.result_types import EngineResults
if t.TYPE_CHECKING:
from searx.extended_types import SXNG_Response
from searx.search.processors import OnlineParams
about = {
"website": "https://jina.ai",
"wikidata_id": None,
"official_api_documentation": "https://s.jina.ai/docs",
"use_official_api": True,
"require_api_key": True,
"results": "JSON",
}
categories = ["general"]
paging = True
jina_engine = "reader"
"""Search mode. Currently supported values are 'reader', 'google' and 'bing'."""
base_url = "https://s.jina.ai"
api_key: str | None = None
def setup(_):
if not api_key:
raise ValueError("missing api key")
def request(query: str, params: "OnlineParams"):
# setting 'no-content' pushes the response time down to a third
args = {"q": query, "page": params["pageno"], "engine": jina_engine, "respondWith": "no-content"}
params["url"] = f"{base_url}/?{urlencode(args)}"
params["headers"].update(
{
"Accept": "application/json",
"Authorization": f"Bearer {api_key}",
}
)
def response(resp: "SXNG_Response"):
res = EngineResults()
json_resp: dict[str, t.Any] = resp.json()
result: dict[str, str]
for result in json_resp["data"]:
published_date = None
if result.get("date"):
try:
published_date = parser.parse(result["date"])
except parser.ParserError:
pass
res.add(
res.types.MainResult(
url=result["url"],
title=result["title"],
content=result["description"],
publishedDate=published_date,
)
)
return res

View File

@@ -1411,6 +1411,12 @@ engines:
shortcut: iq
disabled: true
- name: jina
engine: jina
shortcut: ji
api_key: ""
inactive: true
# - name: kagi
# engine: kagi
# categories: [general, web]