1 Commits

Author SHA1 Message Date
searxng-bot
e895b608ff [data] update searx.data - update_currencies.py 2025-12-29 00:18:13 +00:00
9 changed files with 250 additions and 653 deletions

View File

@@ -124,17 +124,14 @@ engine is shown. Most of the options have a default value or even are optional.
``api_key`` : optional ``api_key`` : optional
In a few cases, using an API needs the use of a secret key. How to obtain them In a few cases, using an API needs the use of a secret key. How to obtain them
is described in the file. Engines that require an API key are set to is described in the file.
``inactive: true`` by default. To enable such an engine, provide the API key
and set ``inactive: false``.
``disabled`` : optional ``disabled`` : optional
To disable by default the engine, but not deleting it. It will allow the user To disable by default the engine, but not deleting it. It will allow the user
to manually activate it in the settings. to manually activate it in the settings.
``inactive``: optional ``inactive``: optional
Remove the engine from the settings (*disabled & removed*). This defaults to ``true`` for engines Remove the engine from the settings (*disabled & removed*).
that require an API key, please see the ``api_key`` section if you want to enable such an engine.
``language`` : optional ``language`` : optional
If you want to use another language for a specific engine, you can define it If you want to use another language for a specific engine, you can define it

View File

@@ -4,33 +4,15 @@
Search API Search API
========== ==========
SearXNG supports querying via a simple HTTP API. The search supports both ``GET`` and ``POST``.
Two endpoints, ``/`` and ``/search``, are supported for both GET and POST methods.
The GET method expects parameters as URL query parameters, while the POST method expects parameters as form data.
If you want to consume the results as JSON, CSV, or RSS, you need to set the Furthermore, two endpoints ``/`` and ``/search`` are available for querying.
``format`` parameter accordingly. Supported formats are defined in ``settings.yml``, under the ``search`` section.
Requesting an unset format will return a 403 Forbidden error. Be aware that many public instances have these formats disabled.
Endpoints:
``GET /`` ``GET /``
``GET /search`` ``GET /search``
``POST /``
``POST /search``
example cURL calls:
.. code-block:: bash
curl 'https://searx.example.org/search?q=searxng&format=json'
curl -X POST 'https://searx.example.org/search' -d 'q=searxng&format=csv'
curl -L -X POST -d 'q=searxng&format=json' 'https://searx.example.org/'
Parameters Parameters
========== ==========

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@
], ],
"ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}", "ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}",
"versions": [ "versions": [
"146.0", "145.0",
"145.0" "144.0"
] ]
} }

View File

@@ -2319,6 +2319,11 @@
"symbol": "kJ/(kg K)", "symbol": "kJ/(kg K)",
"to_si_factor": 1000.0 "to_si_factor": 1000.0
}, },
"Q108888186": {
"si_name": "Q11570",
"symbol": "eV/c²",
"to_si_factor": 1.782661921627898e-36
},
"Q108888198": { "Q108888198": {
"si_name": "Q11570", "si_name": "Q11570",
"symbol": "keV/c²", "symbol": "keV/c²",
@@ -4389,11 +4394,6 @@
"symbol": "m²", "symbol": "m²",
"to_si_factor": 1.0 "to_si_factor": 1.0
}, },
"Q25376902": {
"si_name": null,
"symbol": "Mbp",
"to_si_factor": null
},
"Q25377184": { "Q25377184": {
"si_name": "Q25377184", "si_name": "Q25377184",
"symbol": "kg/m²", "symbol": "kg/m²",
@@ -5344,6 +5344,11 @@
"symbol": "bhp EDR", "symbol": "bhp EDR",
"to_si_factor": 12.958174 "to_si_factor": 12.958174
}, },
"Q3984193": {
"si_name": "Q25269",
"symbol": "TeV",
"to_si_factor": 1.602176634e-07
},
"Q39978339": { "Q39978339": {
"si_name": "Q25377184", "si_name": "Q25377184",
"symbol": "kg/cm²", "symbol": "kg/cm²",

View File

@@ -2,18 +2,10 @@
# pylint: disable=invalid-name # pylint: disable=invalid-name
"""360Search search engine for searxng""" """360Search search engine for searxng"""
import typing as t
from urllib.parse import urlencode from urllib.parse import urlencode
from lxml import html from lxml import html
from searx import logger
from searx.enginelib import EngineCache
from searx.utils import extract_text from searx.utils import extract_text
from searx.network import get as http_get
if t.TYPE_CHECKING:
from searx.extended_types import SXNG_Response
# Metadata # Metadata
about = { about = {
@@ -34,35 +26,6 @@ time_range_dict = {'day': 'd', 'week': 'w', 'month': 'm', 'year': 'y'}
# Base URL # Base URL
base_url = "https://www.so.com" base_url = "https://www.so.com"
COOKIE_CACHE_KEY = "cookie"
COOKIE_CACHE_EXPIRATION_SECONDS = 3600
CACHE: EngineCache
"""Stores cookies from 360search to avoid re-fetching them on every request."""
def setup(engine_settings: dict[str, t.Any]) -> bool:
"""Initialization of the engine.
- Instantiate a cache for this engine (:py:obj:`CACHE`).
"""
global CACHE # pylint: disable=global-statement
# table name needs to be quoted to start with digits, so "cache" has been added to avoid sqlite complaining
CACHE = EngineCache("cache" + engine_settings["name"])
return True
def get_cookie(url: str) -> str:
cookie: str | None = CACHE.get(COOKIE_CACHE_KEY)
if cookie:
return cookie
resp: SXNG_Response = http_get(url, timeout=10, allow_redirects=False)
headers = resp.headers
cookie = headers['set-cookie'].split(";")[0]
CACHE.set(key=COOKIE_CACHE_KEY, value=cookie, expire=COOKIE_CACHE_EXPIRATION_SECONDS)
return cookie
def request(query, params): def request(query, params):
@@ -73,13 +36,8 @@ def request(query, params):
if time_range_dict.get(params['time_range']): if time_range_dict.get(params['time_range']):
query_params["adv_t"] = time_range_dict.get(params['time_range']) query_params["adv_t"] = time_range_dict.get(params['time_range'])
params["url"] = f"{base_url}/s?{urlencode(query_params)}"
# get token by calling the query page
logger.debug("querying url: %s", params["url"])
cookie = get_cookie(params["url"])
logger.debug("obtained cookie: %s", cookie)
params['headers'] = {'Cookie': cookie}
params["url"] = f"{base_url}/s?{urlencode(query_params)}"
return params return params

View File

@@ -51,7 +51,6 @@ def request(query, params):
} }
params["url"] = f"{base_url}?{urlencode(query_params)}" params["url"] = f"{base_url}?{urlencode(query_params)}"
params["headers"]["Referer"] = "https://www.bilibili.com"
params["cookies"] = cookie params["cookies"] = cookie
return params return params

View File

@@ -341,7 +341,6 @@ engines:
- name: 360search - name: 360search
engine: 360search engine: 360search
shortcut: 360so shortcut: 360so
timeout: 10.0
disabled: true disabled: true
- name: 360search videos - name: 360search videos
@@ -481,14 +480,14 @@ engines:
shortcut: ask shortcut: ask
disabled: true disabled: true
- name: azure # - name: azure
engine: azure # engine: azure
shortcut: az # shortcut: az
categories: [it, cloud] # categories: [it, cloud]
# azure_tenant_id: "your_tenant_id" # azure_tenant_id: "your_tenant_id"
# azure_client_id: "your_client_id" # azure_client_id: "your_client_id"
# azure_client_secret: "your_client_secret" # azure_client_secret: "your_client_secret"
inactive: true # disabled: true
# tmp suspended: dh key too small # tmp suspended: dh key too small
# - name: base # - name: base
@@ -650,7 +649,7 @@ engines:
# cf_ai_model_assistant: 'prompts_for_assistant_role' # cf_ai_model_assistant: 'prompts_for_assistant_role'
# cf_ai_model_system: 'prompts_for_system_role' # cf_ai_model_system: 'prompts_for_system_role'
timeout: 30 timeout: 30
inactive: true disabled: true
- name: core.ac.uk - name: core.ac.uk
engine: core engine: core
@@ -784,20 +783,20 @@ engines:
require_api_key: false require_api_key: false
results: HTML results: HTML
- name: elasticsearch # - name: elasticsearch
shortcut: els # shortcut: els
engine: elasticsearch # engine: elasticsearch
# base_url: http://localhost:9200 # base_url: http://localhost:9200
# username: elastic # username: elastic
# password: changeme # password: changeme
# index: my-index # index: my-index
# enable_http: true # enable_http: true
# available options: match, simple_query_string, term, terms, custom # # available options: match, simple_query_string, term, terms, custom
query_type: match # query_type: match
# if query_type is set to custom, provide your query here # # if query_type is set to custom, provide your query here
# custom_query_json: {"query":{"match_all": {}}} # # custom_query_json: {"query":{"match_all": {}}}
# show_metadata: false # # show_metadata: false
inactive: true # disabled: true
- name: wikidata - name: wikidata
engine: wikidata engine: wikidata
@@ -875,12 +874,12 @@ engines:
require_api_key: false require_api_key: false
results: HTML results: HTML
- name: ebay # - name: ebay
engine: ebay # engine: ebay
shortcut: eb # shortcut: eb
base_url: 'https://www.ebay.com' # base_url: 'https://www.ebay.com'
inactive: true # disabled: true
timeout: 5 # timeout: 5
- name: 1x - name: 1x
engine: www1x engine: www1x
@@ -901,16 +900,12 @@ engines:
- name: flickr - name: flickr
categories: images categories: images
shortcut: fl shortcut: fl
engine: flickr_noapi
- name: flickr_api
# You can use the engine using the official stable API, but you need an API # You can use the engine using the official stable API, but you need an API
# key, see: https://www.flickr.com/services/apps/create/ # key, see: https://www.flickr.com/services/apps/create/
engine: flickr # engine: flickr
categories: images
shortcut: fla
# api_key: 'apikey' # required! # api_key: 'apikey' # required!
inactive: true # Or you can use the html non-stable engine, activated by default
engine: flickr_noapi
- name: free software directory - name: free software directory
engine: mediawiki engine: mediawiki
@@ -924,13 +919,13 @@ engines:
website: https://directory.fsf.org/ website: https://directory.fsf.org/
wikidata_id: Q2470288 wikidata_id: Q2470288
- name: freesound # - name: freesound
engine: freesound # engine: freesound
shortcut: fnd # shortcut: fnd
timeout: 15.0 # disabled: true
# API key required, see: https://freesound.org/docs/api/overview.html # timeout: 15.0
# api_key: MyAPIkey # API key required, see: https://freesound.org/docs/api/overview.html
inactive: true # api_key: MyAPIkey
- name: frinkiac - name: frinkiac
engine: frinkiac engine: frinkiac
@@ -985,7 +980,7 @@ engines:
- name: github code - name: github code
engine: github_code engine: github_code
shortcut: ghc shortcut: ghc
inactive: true disabled: true
ghc_auth: ghc_auth:
# type is one of: # type is one of:
# * none # * none
@@ -1272,9 +1267,9 @@ engines:
# https://github.com/LibreTranslate/LibreTranslate?tab=readme-ov-file#mirrors # https://github.com/LibreTranslate/LibreTranslate?tab=readme-ov-file#mirrors
base_url: base_url:
- https://libretranslate.com/translate - https://libretranslate.com/translate
# api_key: '' # api_key: abc123
shortcut: lt shortcut: lt
inactive: true disabled: true
- name: lingva - name: lingva
engine: lingva engine: lingva
@@ -1311,7 +1306,7 @@ engines:
shortcut: mar shortcut: mar
# To get an API key, please follow the instructions at # To get an API key, please follow the instructions at
# - https://about.marginalia-search.com/article/api/ # - https://about.marginalia-search.com/article/api/
# api_key: '' # api_key: ...
disabled: true disabled: true
inactive: true inactive: true
@@ -2092,19 +2087,19 @@ engines:
# engine in combination with Jackett opens the possibility to query a lot of # engine in combination with Jackett opens the possibility to query a lot of
# public and private indexers directly from SearXNG. More details at: # public and private indexers directly from SearXNG. More details at:
# https://docs.searxng.org/dev/engines/online/torznab.html # https://docs.searxng.org/dev/engines/online/torznab.html
- name: Torznab EZTV #
engine: torznab # - name: Torznab EZTV
shortcut: eztv # engine: torznab
# base_url: http://localhost:9117/api/v2.0/indexers/eztv/results/torznab # shortcut: eztv
# enable_http: true # if using localhost # base_url: http://localhost:9117/api/v2.0/indexers/eztv/results/torznab
# api_key: xxxxxxxxxxxxxxx # enable_http: true # if using localhost
show_magnet_links: true # api_key: xxxxxxxxxxxxxxx
show_torrent_files: false # show_magnet_links: true
# https://github.com/Jackett/Jackett/wiki/Jackett-Categories # show_torrent_files: false
torznab_categories: # optional # # https://github.com/Jackett/Jackett/wiki/Jackett-Categories
- 2000 # torznab_categories: # optional
- 5000 # - 2000
inactive: true # - 5000
# tmp suspended - too slow, too many errors # tmp suspended - too slow, too many errors
# - name: urbandictionary # - name: urbandictionary
@@ -2152,15 +2147,14 @@ engines:
- name: youtube - name: youtube
shortcut: yt shortcut: yt
engine: youtube_noapi
- name: youtube_api
# You can use the engine using the official stable API, but you need an API # You can use the engine using the official stable API, but you need an API
# key See: https://console.developers.google.com/project # key See: https://console.developers.google.com/project
engine: youtube_api #
# api_key: '' # required! # engine: youtube_api
shortcut: yta # api_key: 'apikey' # required!
inactive: true #
# Or you can use the html non-stable engine, activated by default
engine: youtube_noapi
- name: dailymotion - name: dailymotion
engine: dailymotion engine: dailymotion
@@ -2313,21 +2307,18 @@ engines:
- name: wolframalpha - name: wolframalpha
shortcut: wa shortcut: wa
# You can use the engine using the official stable API, but you need an API
# key. See: https://products.wolframalpha.com/api/
#
# engine: wolframalpha_api
# api_key: ''
#
# Or you can use the html non-stable engine, activated by default
engine: wolframalpha_noapi engine: wolframalpha_noapi
timeout: 6.0 timeout: 6.0
categories: general categories: general
disabled: true disabled: true
- name: wolframalpha_api
# You can use the engine using the official stable API, but you need an API
# key. See: https://products.wolframalpha.com/api/
engine: wolframalpha_api
# api_key: '' # required!
shortcut: waa
timeout: 6.0
categories: general
inactive: true
- name: dictzone - name: dictzone
engine: dictzone engine: dictzone
shortcut: dc shortcut: dc
@@ -2375,14 +2366,14 @@ engines:
engine: seznam engine: seznam
disabled: true disabled: true
- name: deepl # - name: deepl
engine: deepl # engine: deepl
shortcut: dpl # shortcut: dpl
# You can use the engine using the official stable API, but you need an API key # # You can use the engine using the official stable API, but you need an API key
# See: https://www.deepl.com/pro-api?cta=header-pro-api # # See: https://www.deepl.com/pro-api?cta=header-pro-api
# api_key: '' # required! # api_key: '' # required!
timeout: 5.0 # timeout: 5.0
inactive: true # disabled: true
- name: mojeek - name: mojeek
shortcut: mjk shortcut: mjk
@@ -2597,7 +2588,7 @@ engines:
engine: wallhaven engine: wallhaven
# api_key: abcdefghijklmnopqrstuvwxyz # api_key: abcdefghijklmnopqrstuvwxyz
shortcut: wh shortcut: wh
inactive: true disabled: true
# wikimini: online encyclopedia for children # wikimini: online encyclopedia for children
# The fulltext and title parameter is necessary for Wikimini because # The fulltext and title parameter is necessary for Wikimini because