mirror of
https://github.com/searxng/searxng.git
synced 2026-06-22 17:48:33 +02:00
Compare commits
120 Commits
28ef4f7447
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 952896d29e | |||
| 4cc32b2457 | |||
| cce0957f54 | |||
| 9375c0a6b6 | |||
| a702741e4e | |||
| aeced67249 | |||
| 199e03de1d | |||
| 9cd2439e5e | |||
| 9f4d8bca02 | |||
| de76a4a39b | |||
| a85a5e2794 | |||
| 92abd98a55 | |||
| 93e867c6b1 | |||
| 75c1b1dade | |||
| 097ab64c70 | |||
| 0e9f513efc | |||
| fd42d4fda1 | |||
| 5c38d2feab | |||
| 38b678c493 | |||
| fe1848673f | |||
| 8b10095e8a | |||
| b5ef7ec8f3 | |||
| bd73cc09ea | |||
| 4dfdc822cf | |||
| 502c820a25 | |||
| 4fb49b4498 | |||
| cf1410af8d | |||
| 6c9dcd4242 | |||
| b3e08f2a44 | |||
| a857041afc | |||
| 31a8a22aa6 | |||
| a29cda858c | |||
| 2e10a2f614 | |||
| 2100eb04e1 | |||
| c58391d673 | |||
| c3284c8238 | |||
| 290d3e0c6a | |||
| 0608dfa4d1 | |||
| 1184b3212f | |||
| 65e0e4c069 | |||
| d14fa1f6e2 | |||
| 2d248704fa | |||
| 3096b1218f | |||
| 82a8a90230 | |||
| e3d4fbe570 | |||
| 031747f29e | |||
| e3bd7f5df1 | |||
| b48205b384 | |||
| 8522638b00 | |||
| ab81c77533 | |||
| cc196f2a5b | |||
| dd3022d680 | |||
| de8a3de15a | |||
| 4dd0bf4867 | |||
| 1957876dd6 | |||
| ab13451086 | |||
| a1490676e3 | |||
| 3a382cb3f3 | |||
| 9d9d605b15 | |||
| de03f4eb11 | |||
| 00f7c68a6f | |||
| 41c98b3b41 | |||
| f4c63c8eb0 | |||
| 26801e92af | |||
| f3fab143be | |||
| 72a827ae93 | |||
| 6ca9d3784c | |||
| 63f264220b | |||
| 41fcf0be4b | |||
| 86903a2c66 | |||
| 70de3cc561 | |||
| 51b6fd4f23 | |||
| 9d49a9f344 | |||
| e260a732c8 | |||
| 0429198415 | |||
| e7cf57e9ae | |||
| ed369ac0ec | |||
| 94bdbb5c63 | |||
| 465b5229c6 | |||
| cbf97fd262 | |||
| 37187dc2d8 | |||
| 2f049cb037 | |||
| eb39bc0dc1 | |||
| 007a4e2155 | |||
| 13ce187e64 | |||
| 26fa181b84 | |||
| 0f35ef7cd6 | |||
| b1ae576b2d | |||
| e6559c9ad6 | |||
| 5bae05514b | |||
| 00ca5776f2 | |||
| 577f5f2f30 | |||
| 253dc86c10 | |||
| 3066bc19eb | |||
| e964708c00 | |||
| 7159b8aed3 | |||
| 246f5a5499 | |||
| 300695de5c | |||
| bd863f16b1 | |||
| 4ac822fd7f | |||
| e1d25c5078 | |||
| 01159b82fe | |||
| 780ee32564 | |||
| 217c9a1597 | |||
| 70e810bd7b | |||
| baab1c160a | |||
| dd4664e03a | |||
| 4ea5c57a84 | |||
| 6917395dc1 | |||
| 128e28fe3f | |||
| fb3ed5b081 | |||
| 4ebe6b90d6 | |||
| 0657217a3e | |||
| 0037d43d87 | |||
| f5be39e245 | |||
| 1574939441 | |||
| f1a22dec9e | |||
| 3db8b424a8 | |||
| a16a3dedb4 | |||
| c629dd4f3c |
@@ -1,163 +0,0 @@
|
||||
;;; .dir-locals.el
|
||||
;;
|
||||
;; Per-Directory Local Variables:
|
||||
;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
|
||||
;;
|
||||
;; For full fledge developer tools install emacs packages:
|
||||
;;
|
||||
;; M-x package-install ...
|
||||
;;
|
||||
;; magit gitconfig
|
||||
;; nvm lsp-mode lsp-pyright lsp-eslint
|
||||
;; pyvenv pylint pip-requirements
|
||||
;; jinja2-mode
|
||||
;; json-mode
|
||||
;; company company-jedi company-quickhelp company-shell
|
||||
;; realgud
|
||||
;; sphinx-doc markdown-mode graphviz-dot-mode
|
||||
;; apache-mode nginx-mode
|
||||
;;
|
||||
;; To setup a developer environment, build target::
|
||||
;;
|
||||
;; $ make node.env.dev pyenv.install
|
||||
;;
|
||||
;; Some buffer locals are referencing the project environment:
|
||||
;;
|
||||
;; - prj-root --> <repo>/
|
||||
;; - nvm-dir --> <repo>/.nvm
|
||||
;; - python-environment-directory --> <repo>/local
|
||||
;; - python-environment-default-root-name --> py3
|
||||
;; - python-shell-virtualenv-root --> <repo>/local/py3
|
||||
;; When this variable is set with the path of the virtualenv to use,
|
||||
;; `process-environment' and `exec-path' get proper values in order to run
|
||||
;; shells inside the specified virtualenv, example::
|
||||
;; (setq python-shell-virtualenv-root "/path/to/env/")
|
||||
;; - python-shell-interpreter --> <repo>/local/py3/bin/python
|
||||
;;
|
||||
;; Python development:
|
||||
;;
|
||||
;; Jedi, flycheck & other python stuff should use the 'python-shell-interpreter'
|
||||
;; from the local py3 environment.
|
||||
;;
|
||||
|
||||
((nil
|
||||
. ((fill-column . 80)
|
||||
(indent-tabs-mode . nil)
|
||||
(eval . (progn
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.html\\'" . jinja2-mode))
|
||||
|
||||
;; project root folder is where the `.dir-locals.el' is located
|
||||
(setq-local prj-root
|
||||
(locate-dominating-file default-directory ".dir-locals.el"))
|
||||
|
||||
(setq-local python-environment-directory
|
||||
(expand-file-name "./local" prj-root))
|
||||
|
||||
;; to get in use of NVM environment, install https://github.com/rejeep/nvm.el
|
||||
(setq-local nvm-dir (expand-file-name "./.nvm" prj-root))
|
||||
|
||||
;; use nodejs from the (local) NVM environment (see nvm-dir)
|
||||
(nvm-use-for-buffer)
|
||||
(ignore-errors (require 'lsp))
|
||||
(setq-local lsp-server-install-dir (car (cdr nvm-current-version)))
|
||||
(setq-local lsp-enable-file-watchers nil)
|
||||
|
||||
;; use 'py3' environment as default
|
||||
(setq-local python-environment-default-root-name
|
||||
"py3")
|
||||
|
||||
(setq-local python-shell-virtualenv-root
|
||||
(expand-file-name
|
||||
python-environment-default-root-name python-environment-directory))
|
||||
|
||||
(setq-local python-shell-interpreter
|
||||
(expand-file-name
|
||||
"bin/python" python-shell-virtualenv-root))))))
|
||||
(makefile-gmake-mode
|
||||
. ((indent-tabs-mode . t)))
|
||||
|
||||
(yaml-mode
|
||||
. ((eval . (progn
|
||||
|
||||
;; flycheck should use the local py3 environment
|
||||
(setq-local flycheck-yaml-yamllint-executable
|
||||
(expand-file-name "bin/yamllint" python-shell-virtualenv-root))
|
||||
|
||||
(setq-local flycheck-yamllintrc
|
||||
(expand-file-name ".yamllint.yml" prj-root))
|
||||
|
||||
(flycheck-checker . yaml-yamllint)))))
|
||||
|
||||
(json-mode
|
||||
. ((eval . (progn
|
||||
(setq-local js-indent-level 4)
|
||||
(flycheck-checker . json-python-json)))))
|
||||
|
||||
(js-mode
|
||||
. ((eval . (progn
|
||||
(ignore-errors (require 'lsp-eslint))
|
||||
(setq-local js-indent-level 2)
|
||||
;; flycheck should use the eslint checker from developer tools
|
||||
(setq-local flycheck-javascript-eslint-executable
|
||||
(expand-file-name "node_modules/.bin/eslint" prj-root))
|
||||
;; (flycheck-mode)
|
||||
|
||||
(if (featurep 'lsp-eslint)
|
||||
(lsp))
|
||||
))))
|
||||
|
||||
(python-mode
|
||||
. ((eval . (progn
|
||||
(ignore-errors (require 'jedi-core))
|
||||
(ignore-errors (require 'lsp-pyright))
|
||||
(ignore-errors (sphinx-doc-mode))
|
||||
(setq-local python-environment-virtualenv
|
||||
(list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root)
|
||||
;;"--system-site-packages"
|
||||
"--quiet"))
|
||||
|
||||
(setq-local pylint-command
|
||||
(expand-file-name "bin/pylint" python-shell-virtualenv-root))
|
||||
|
||||
(if (featurep 'lsp-pyright)
|
||||
(lsp))
|
||||
|
||||
;; pylint will find the '.pylintrc' file next to the CWD
|
||||
;; https://pylint.readthedocs.io/en/latest/user_guide/run.html#command-line-options
|
||||
(setq-local flycheck-pylintrc
|
||||
".pylintrc")
|
||||
|
||||
;; flycheck & other python stuff should use the local py3 environment
|
||||
(setq-local flycheck-python-pylint-executable
|
||||
python-shell-interpreter)
|
||||
|
||||
;; use 'M-x jedi:show-setup-info' and 'M-x epc:controller' to inspect jedi server
|
||||
;; https://tkf.github.io/emacs-jedi/latest/#jedi:environment-root -- You
|
||||
;; can specify a full path instead of a name (relative path). In that case,
|
||||
;; python-environment-directory is ignored and Python virtual environment
|
||||
;; is created at the specified path.
|
||||
(setq-local jedi:environment-root
|
||||
python-shell-virtualenv-root)
|
||||
|
||||
;; https://tkf.github.io/emacs-jedi/latest/#jedi:server-command
|
||||
(setq-local jedi:server-command
|
||||
(list python-shell-interpreter
|
||||
jedi:server-script))
|
||||
|
||||
;; jedi:environment-virtualenv --> see above 'python-environment-virtualenv'
|
||||
;; is set buffer local! No need to setup jedi:environment-virtualenv:
|
||||
;;
|
||||
;; Virtualenv command to use. A list of string. If it is nil,
|
||||
;; python-environment-virtualenv is used instead. You must set non-nil
|
||||
;; value to jedi:environment-root in order to make this setting work.
|
||||
;;
|
||||
;; https://tkf.github.io/emacs-jedi/latest/#jedi:environment-virtualenv
|
||||
;;
|
||||
;; (setq-local jedi:environment-virtualenv
|
||||
;; (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root)
|
||||
;; "--python"
|
||||
;; "/usr/bin/python3.4"
|
||||
;; ))
|
||||
))))
|
||||
)
|
||||
@@ -1,5 +1,6 @@
|
||||
*
|
||||
|
||||
!container/*.template.*
|
||||
!container/entrypoint.sh
|
||||
!searx/**
|
||||
!requirements*.txt
|
||||
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
python-version: "${{ env.PYTHON_VERSION }}"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: "false"
|
||||
fetch-depth: "0"
|
||||
@@ -106,10 +106,10 @@ jobs:
|
||||
|
||||
- if: ${{ matrix.emulation }}
|
||||
name: Setup QEMU
|
||||
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
||||
with:
|
||||
registry: "ghcr.io"
|
||||
username: "${{ github.repository_owner }}"
|
||||
@@ -141,16 +141,16 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: "false"
|
||||
|
||||
- if: ${{ matrix.emulation }}
|
||||
name: Setup QEMU
|
||||
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
||||
with:
|
||||
registry: "ghcr.io"
|
||||
username: "${{ github.repository_owner }}"
|
||||
@@ -175,19 +175,19 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: "false"
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
||||
with:
|
||||
registry: "ghcr.io"
|
||||
username: "${{ github.repository_owner }}"
|
||||
password: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
||||
with:
|
||||
registry: "docker.io"
|
||||
username: "${{ secrets.DOCKER_USER }}"
|
||||
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
python-version: "${{ env.PYTHON_VERSION }}"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: "false"
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
python-version: "${{ env.PYTHON_VERSION }}"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: "false"
|
||||
fetch-depth: "0"
|
||||
@@ -50,11 +50,14 @@ jobs:
|
||||
python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-
|
||||
path: "./local/"
|
||||
|
||||
- name: Setup dependencies
|
||||
run: sudo ./utils/searxng.sh install buildhost
|
||||
|
||||
- name: Setup venv
|
||||
run: make V=1 install
|
||||
|
||||
- name: Build documentation
|
||||
run: make V=1 docs.clean docs.html
|
||||
run: make V=1 docs.html
|
||||
|
||||
- if: github.ref_name == 'master'
|
||||
name: Release
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
python-version: "${{ matrix.python-version }}"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: "false"
|
||||
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
python-version: "${{ env.PYTHON_VERSION }}"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: "false"
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
python-version: "${{ env.PYTHON_VERSION }}"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
token: "${{ secrets.WEBLATE_GITHUB_TOKEN }}"
|
||||
fetch-depth: "0"
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
python-version: "${{ env.PYTHON_VERSION }}"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
token: "${{ secrets.WEBLATE_GITHUB_TOKEN }}"
|
||||
fetch-depth: "0"
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: "false"
|
||||
|
||||
@@ -41,6 +41,6 @@ jobs:
|
||||
write-comment: "false"
|
||||
|
||||
- name: Upload SARIFs
|
||||
uses: github/codeql-action/upload-sarif@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
|
||||
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
with:
|
||||
sarif_file: "./scout.sarif"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[[language]]
|
||||
name = "python"
|
||||
language-servers = ["basedpyright", "pylsp"]
|
||||
auto-format = true
|
||||
|
||||
[language-server.pylsp.config.pylsp]
|
||||
plugins.pylint.enabled = true
|
||||
plugins.isort.enabled = true
|
||||
plugins.black.enabled = true
|
||||
plugins.black.skip_string_normalization = true
|
||||
plugins.black.line_length = 120
|
||||
+15
-29
@@ -2,12 +2,12 @@
|
||||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
||||
"files": {
|
||||
"ignoreUnknown": true,
|
||||
"includes": ["**", "!node_modules"]
|
||||
"includes": ["**", "!node_modules", "!src/brand", "!src/svg"]
|
||||
},
|
||||
"assist": {
|
||||
"enabled": true,
|
||||
"actions": {
|
||||
"recommended": true,
|
||||
"preset": "recommended",
|
||||
"source": {
|
||||
"useSortedAttributes": "on",
|
||||
"useSortedProperties": "on"
|
||||
@@ -27,12 +27,14 @@
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"preset": "recommended",
|
||||
"complexity": {
|
||||
"noForEach": "error",
|
||||
"noImplicitCoercions": "error",
|
||||
"noRedundantDefaultExport": "error",
|
||||
"noUselessCatchBinding": "error",
|
||||
"noUselessUndefined": "error",
|
||||
"useArrayFind": "error",
|
||||
"useSimplifiedLogicExpression": "error"
|
||||
},
|
||||
"correctness": {
|
||||
@@ -42,25 +44,11 @@
|
||||
"useSingleJsDocAsterisk": "error"
|
||||
},
|
||||
"nursery": {
|
||||
"noContinue": "warn",
|
||||
"noEqualsToNull": "warn",
|
||||
"noFloatingPromises": "warn",
|
||||
"noForIn": "warn",
|
||||
"noIncrementDecrement": "warn",
|
||||
"noMisusedPromises": "warn",
|
||||
"noMultiAssign": "warn",
|
||||
"noMultiStr": "warn",
|
||||
"noNestedPromises": "warn",
|
||||
"noParametersOnlyUsedInRecursion": "warn",
|
||||
"noRedundantDefaultExport": "warn",
|
||||
"noReturnAssign": "warn",
|
||||
"noUselessReturn": "off",
|
||||
"useAwaitThenable": "off",
|
||||
"useConsistentEnumValueType": "warn",
|
||||
"useDestructuring": "warn",
|
||||
"useExhaustiveSwitchCases": "warn",
|
||||
"useExplicitType": "off",
|
||||
"useFind": "warn",
|
||||
"useRegexpExec": "warn"
|
||||
},
|
||||
"performance": {
|
||||
@@ -75,23 +63,15 @@
|
||||
"noCommonJs": "error",
|
||||
"noEnum": "error",
|
||||
"noImplicitBoolean": "error",
|
||||
"noIncrementDecrement": "error",
|
||||
"noInferrableTypes": "error",
|
||||
"noMultiAssign": "error",
|
||||
"noMultilineString": "error",
|
||||
"noNamespace": "error",
|
||||
"noNegationElse": "error",
|
||||
"noNestedTernary": "error",
|
||||
"noParameterAssign": "error",
|
||||
"noParameterProperties": "error",
|
||||
"noRestrictedTypes": {
|
||||
"level": "error",
|
||||
"options": {
|
||||
"types": {
|
||||
"Element": {
|
||||
"message": "Element is too generic",
|
||||
"use": "HTMLElement"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"noSubstr": "error",
|
||||
"noUnusedTemplateLiteral": "error",
|
||||
"noUselessElse": "error",
|
||||
@@ -107,6 +87,7 @@
|
||||
}
|
||||
},
|
||||
"useConsistentBuiltinInstantiation": "error",
|
||||
"useConsistentEnumValueType": "error",
|
||||
"useConsistentMemberAccessibility": {
|
||||
"level": "error",
|
||||
"options": {
|
||||
@@ -126,6 +107,7 @@
|
||||
}
|
||||
},
|
||||
"useDefaultSwitchClause": "error",
|
||||
"useDestructuring": "error",
|
||||
"useExplicitLengthCheck": "error",
|
||||
"useForOf": "error",
|
||||
"useGroupedAccessorPairs": "error",
|
||||
@@ -142,13 +124,17 @@
|
||||
"useUnifiedTypeSignatures": "error"
|
||||
},
|
||||
"suspicious": {
|
||||
"noAlert": "error",
|
||||
"noBitwiseOperators": "error",
|
||||
"noConstantBinaryExpressions": "error",
|
||||
"noDeprecatedImports": "error",
|
||||
"noEmptyBlockStatements": "error",
|
||||
"noEqualsToNull": "error",
|
||||
"noEvolvingTypes": "error",
|
||||
"noForIn": "error",
|
||||
"noImportCycles": "error",
|
||||
"noNestedPromises": "error",
|
||||
"noParametersOnlyUsedInRecursion": "error",
|
||||
"noReturnAssign": "error",
|
||||
"noUnassignedVariables": "error",
|
||||
"noVar": "error",
|
||||
"useNumberToFixedDigitsArgument": "error",
|
||||
|
||||
Generated
+379
-354
File diff suppressed because it is too large
Load Diff
@@ -29,21 +29,21 @@
|
||||
"swiped-events": "1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.4.15",
|
||||
"@types/node": "^25.8.0",
|
||||
"@biomejs/biome": "2.5.0",
|
||||
"@types/node": "^26.0.0",
|
||||
"browserslist": "^4.28.2",
|
||||
"browserslist-to-esbuild": "^2.1.1",
|
||||
"edge.js": "^6.5.0",
|
||||
"less": "^4.6.4",
|
||||
"edge.js": "^6.5.1",
|
||||
"less": "^4.6.6",
|
||||
"mathjs": "^15.2.0",
|
||||
"sharp": "~0.34.5",
|
||||
"sort-package-json": "^3.6.1",
|
||||
"stylelint": "^17.11.1",
|
||||
"sharp": "~0.35.1",
|
||||
"sort-package-json": "^4.0.0",
|
||||
"stylelint": "^17.13.0",
|
||||
"stylelint-config-standard-less": "^4.1.0",
|
||||
"stylelint-prettier": "^5.0.3",
|
||||
"svgo": "^4.0.1",
|
||||
"typescript": "~6.0.3",
|
||||
"vite": "^8.0.13",
|
||||
"vite": "^8.0.16",
|
||||
"vite-bundle-analyzer": "^1.3.8"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,9 +77,9 @@ export default class Calculator extends Plugin {
|
||||
|
||||
protected async run(): Promise<string | undefined> {
|
||||
const searchInput = getElement<HTMLInputElement>("q");
|
||||
const node = Calculator.math.parse(searchInput.value);
|
||||
|
||||
try {
|
||||
const node = Calculator.math.parse(searchInput.value);
|
||||
return `${node.toString()} = ${node.evaluate()}`;
|
||||
} catch {
|
||||
// not a compatible math expression
|
||||
|
||||
@@ -5,7 +5,6 @@ import type { KeyBindingLayout } from "./main/keyboard.ts";
|
||||
// synced with searx/webapp.py get_client_settings
|
||||
type Settings = {
|
||||
plugins?: string[];
|
||||
advanced_search?: boolean;
|
||||
autocomplete?: string;
|
||||
autocomplete_min?: number;
|
||||
doi_resolver?: string;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
@import "mixins.less";
|
||||
@import "toolkit.less";
|
||||
@import "autocomplete.less";
|
||||
@import "detail.less";
|
||||
@import "animations.less";
|
||||
@import "embedded.less";
|
||||
@import "info.less";
|
||||
@@ -1165,3 +1164,4 @@ pre code {
|
||||
@import "result_types/code.less";
|
||||
@import "result_types/paper.less";
|
||||
@import "result_types/file.less";
|
||||
@import "result_types/image.less";
|
||||
|
||||
@@ -21,8 +21,6 @@ RUN --mount=type=cache,id=uv,target=/root/.cache/uv set -eux -o pipefail; \
|
||||
|
||||
COPY --exclude=./searx/version_frozen.py ./searx/ ./searx/
|
||||
|
||||
ARG TIMESTAMP_SETTINGS="0"
|
||||
|
||||
RUN set -eux -o pipefail; \
|
||||
python -m compileall -q -f -j 0 --invalidation-mode=unchecked-hash ./searx/; \
|
||||
find ./searx/static/ -type f \
|
||||
@@ -30,5 +28,4 @@ RUN set -eux -o pipefail; \
|
||||
-exec gzip -9 -k {} + \
|
||||
-exec brotli -9 -k {} + \
|
||||
-exec gzip --test {}.gz + \
|
||||
-exec brotli --test {}.br +; \
|
||||
touch -c --date="@$TIMESTAMP_SETTINGS" ./searx/settings.yml
|
||||
-exec brotli --test {}.br +
|
||||
|
||||
+9
-30
@@ -77,43 +77,23 @@ volume_handler() {
|
||||
setup_ownership "$target" "directory"
|
||||
}
|
||||
|
||||
# Handle configuration file updates
|
||||
config_handler() {
|
||||
local target="$1"
|
||||
local template="$2"
|
||||
local new_template_target="$target.new"
|
||||
|
||||
# Create/Update the configuration file
|
||||
if [ -f "$target" ]; then
|
||||
setup_ownership "$target" "file"
|
||||
|
||||
if [ "$template" -nt "$target" ]; then
|
||||
cp -pfT "$template" "$new_template_target"
|
||||
setup() {
|
||||
local template_settings="/usr/local/searxng/settings.template.yml"
|
||||
local target_settings="$__SEARXNG_CONFIG_PATH/settings.yml"
|
||||
|
||||
if [ ! -f "$target_settings" ]; then
|
||||
cat <<EOF
|
||||
...
|
||||
... INFORMATION
|
||||
... Update available for "$target"
|
||||
... It is recommended to update the configuration file to ensure proper functionality
|
||||
...
|
||||
... New version placed at "$new_template_target"
|
||||
... Please review and merge changes
|
||||
... "$target_settings" does not exist, creating from template...
|
||||
...
|
||||
EOF
|
||||
fi
|
||||
else
|
||||
cat <<EOF
|
||||
...
|
||||
... INFORMATION
|
||||
... "$target" does not exist, creating from template...
|
||||
...
|
||||
EOF
|
||||
cp -pfT "$template" "$target"
|
||||
cp -pfT "$template_settings" "$target_settings"
|
||||
|
||||
sed -i "s/ultrasecretkey/$(head -c 24 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9')/g" "$target"
|
||||
sed -i "s/ultrasecretkey/$(head -c 24 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9')/g" "$target_settings"
|
||||
fi
|
||||
|
||||
check_file "$target"
|
||||
check_file "$target_settings"
|
||||
}
|
||||
|
||||
cat <<EOF
|
||||
@@ -124,8 +104,7 @@ EOF
|
||||
volume_handler "$__SEARXNG_CONFIG_PATH"
|
||||
volume_handler "$__SEARXNG_DATA_PATH"
|
||||
|
||||
# Check for files
|
||||
config_handler "$__SEARXNG_SETTINGS_PATH" "/usr/local/searxng/searx/settings.yml"
|
||||
setup
|
||||
|
||||
# root only features
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Read the documentation before extending the defaults:
|
||||
# https://docs.searxng.org/admin/settings/
|
||||
|
||||
use_default_settings: true
|
||||
|
||||
server:
|
||||
secret_key: "ultrasecretkey"
|
||||
image_proxy: true
|
||||
@@ -19,6 +19,7 @@ Settings
|
||||
settings_search
|
||||
settings_server
|
||||
settings_ui
|
||||
settings_preferences
|
||||
settings_redis
|
||||
settings_valkey
|
||||
settings_outgoing
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
.. _settings preferences:
|
||||
|
||||
================
|
||||
``preferences:``
|
||||
================
|
||||
|
||||
.. autoclass:: searx._settings.SettingsPref
|
||||
:members:
|
||||
@@ -43,6 +43,7 @@
|
||||
- ``google``
|
||||
- ``mwmbl``
|
||||
- ``naver``
|
||||
- ``privacywall``
|
||||
- ``quark``
|
||||
- ``qwant``
|
||||
- ``seznam``
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
activated:
|
||||
|
||||
- :py:obj:`searx.botdetection.link_token` in the :ref:`limiter`
|
||||
- :ref:`image_proxy`
|
||||
|
||||
.. _image_proxy:
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
.. _aol engine:
|
||||
|
||||
===
|
||||
AOL
|
||||
===
|
||||
|
||||
.. automodule:: searx.engines.aol
|
||||
:members:
|
||||
@@ -0,0 +1,9 @@
|
||||
.. _kagi engines:
|
||||
|
||||
============
|
||||
Kagi Engines
|
||||
============
|
||||
|
||||
.. automodule:: searx.engines.kagi
|
||||
:members:
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
.. _karmasearch engine:
|
||||
|
||||
===========
|
||||
Karmasearch
|
||||
===========
|
||||
|
||||
.. automodule:: searx.engines.karmasearch
|
||||
:members:
|
||||
@@ -0,0 +1,7 @@
|
||||
.. _result_types.image:
|
||||
|
||||
=============
|
||||
Image Results
|
||||
=============
|
||||
|
||||
.. automodule:: searx.result_types.image
|
||||
@@ -1,4 +1,8 @@
|
||||
.. _result_types.mainresult:
|
||||
|
||||
============
|
||||
Main Results
|
||||
============
|
||||
|
||||
.. autoclass:: searx.result_types._base.MainResult
|
||||
:members:
|
||||
|
||||
@@ -18,13 +18,13 @@ following types have been implemented so far ..
|
||||
main/code
|
||||
main/paper
|
||||
main/file
|
||||
main/image
|
||||
|
||||
The :ref:`LegacyResult <LegacyResult>` is used internally for the results that
|
||||
have not yet been typed. The templates can be used as orientation until the
|
||||
final typing is complete.
|
||||
|
||||
- :ref:`template default` / :py:obj:`Result`
|
||||
- :ref:`template images`
|
||||
- :ref:`template videos`
|
||||
- :ref:`template torrent`
|
||||
- :ref:`template map`
|
||||
|
||||
@@ -87,7 +87,7 @@ Parameters
|
||||
|
||||
``autocomplete`` : default from :ref:`settings search`
|
||||
[ ``google``, ``dbpedia``, ``duckduckgo``, ``mwmbl``, ``startpage``,
|
||||
``wikipedia``, ``swisscows``, ``qwant`` ]
|
||||
``privacywall``, ``wikipedia``, ``swisscows``, ``qwant`` ]
|
||||
|
||||
Service which completes words as you type.
|
||||
|
||||
|
||||
@@ -129,53 +129,6 @@ audio_src : uri,
|
||||
URL of an embedded ``<audio controls>``.
|
||||
|
||||
|
||||
.. _template images:
|
||||
|
||||
``images.html``
|
||||
---------------
|
||||
|
||||
The images are displayed as small thumbnails in the main results list.
|
||||
|
||||
title : :py:class:`str`
|
||||
Title of the image.
|
||||
|
||||
thumbnail_src : :py:class:`str`
|
||||
URL of a preview of the image.
|
||||
|
||||
resolution :py:class:`str`
|
||||
The resolution of the image (e.g. ``1920 x 1080`` pixel)
|
||||
|
||||
|
||||
Image labels
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Clicking on the preview opens a gallery view in which all further metadata for
|
||||
the image is displayed. Addition fields used in the :origin:`images.html
|
||||
<searx/templates/simple/result_templates/images.html>`:
|
||||
|
||||
img_src : :py:class:`str`
|
||||
URL of the full size image.
|
||||
|
||||
content: :py:class:`str`
|
||||
Description of the image.
|
||||
|
||||
author: :py:class:`str`
|
||||
Name of the author of the image.
|
||||
|
||||
img_format : :py:class:`str`
|
||||
The format of the image (e.g. ``png``).
|
||||
|
||||
source : :py:class:`str`
|
||||
Source of the image.
|
||||
|
||||
filesize: :py:class:`str`
|
||||
Size of bytes in :py:obj:`human readable <searx.humanize_bytes>` notation
|
||||
(e.g. ``MB`` for 1024 \* 1024 Bytes filesize).
|
||||
|
||||
url : :py:class:`str`
|
||||
URL of the page from where the images comes from (source).
|
||||
|
||||
|
||||
.. _template videos:
|
||||
|
||||
``videos.html``
|
||||
|
||||
@@ -58,8 +58,8 @@ Configured Engines
|
||||
{% for mod in engines %}
|
||||
|
||||
* - `{{mod.name}} <{{mod.about and mod.about.website}}>`_
|
||||
{%- if mod.about and mod.about.language %}
|
||||
({{mod.about.language | upper}})
|
||||
{%- if mod.language %}
|
||||
({{mod.language | upper}})
|
||||
{%- endif %}
|
||||
- ``!{{mod.shortcut}}``
|
||||
- {%- if 'searx.engines.' + mod.__name__ in documented_modules %}
|
||||
|
||||
@@ -2,16 +2,16 @@ mock==5.2.0
|
||||
nose2[coverage_plugin]==0.16.0
|
||||
cov-core==1.15.0
|
||||
black==25.9.0
|
||||
pylint==4.0.5
|
||||
pylint==4.0.6
|
||||
splinter==0.21.0
|
||||
selenium==4.44.0
|
||||
selenium==4.45.0
|
||||
Sphinx==8.2.3;python_version <= "3.11"
|
||||
Sphinx==9.1.0; python_version > "3.11"
|
||||
sphinx-issues==6.0.0
|
||||
sphinx-jinja==2.0.2
|
||||
sphinx-tabs==3.5.0
|
||||
furo==2025.12.19
|
||||
sphinxcontrib-programoutput==0.19
|
||||
sphinxcontrib-programoutput==0.20
|
||||
sphinx-autobuild==2025.8.25
|
||||
sphinx-notfound-page==1.1.0
|
||||
myst-parser==5.0.0
|
||||
@@ -23,6 +23,6 @@ coloredlogs==15.0.1
|
||||
docutils>=0.21.2;python_version <= "3.11"
|
||||
docutils>=0.22.4; python_version > "3.11"
|
||||
parameterized==0.9.0
|
||||
granian[reload]==2.7.4
|
||||
basedpyright==1.39.5
|
||||
granian[reload]==2.7.6
|
||||
basedpyright==1.39.8
|
||||
types-lxml==2026.2.16
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
granian==2.7.4
|
||||
granian[pname]==2.7.4
|
||||
granian==2.7.6
|
||||
granian[pname]==2.7.6
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
certifi==2026.5.20
|
||||
certifi==2026.6.17
|
||||
babel==2.18.0
|
||||
flask-babel==4.0.0
|
||||
flask==3.1.3
|
||||
@@ -13,7 +13,7 @@ sniffio==1.3.1
|
||||
valkey==6.1.1
|
||||
markdown-it-py==4.2.0
|
||||
msgspec==0.21.1
|
||||
typer==0.25.1
|
||||
typer==0.26.7
|
||||
isodate==0.7.2
|
||||
whitenoise==6.12.0
|
||||
typing-extensions==4.15.0
|
||||
|
||||
+8
-1
@@ -10,6 +10,7 @@ from os.path import dirname, abspath
|
||||
import logging
|
||||
|
||||
import msgspec
|
||||
from ._settings import SettingsPref
|
||||
|
||||
# Debug
|
||||
LOG_FORMAT_DEBUG: str = '%(levelname)-7s %(name)-30.30s: %(message)s'
|
||||
@@ -47,6 +48,12 @@ def init_settings():
|
||||
settings.clear()
|
||||
settings.update(cfg)
|
||||
|
||||
if get_setting("server.public_instance"):
|
||||
# enable image proxy for public instances #6125
|
||||
settings["server"]["image_proxy"] = True
|
||||
pref: SettingsPref = get_setting("preferences")
|
||||
pref.lock.add("image_proxy")
|
||||
|
||||
sxng_debug = get_setting("general.debug")
|
||||
if sxng_debug:
|
||||
_logging_config_debug()
|
||||
@@ -66,7 +73,7 @@ def init_settings():
|
||||
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 / "
|
||||
"This force the usage of the limiter, link_token and image proxy / "
|
||||
"see https://docs.searxng.org/admin/searx.limiter.html"
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Implementation of the :py:obj:`preference <searx.preference>` settings."""
|
||||
# pylint: disable = too-few-public-methods
|
||||
|
||||
import typing as t
|
||||
import msgspec
|
||||
|
||||
|
||||
class SettingsPref(msgspec.Struct, kw_only=True, forbid_unknown_fields=True):
|
||||
"""Options for configuring the preferences
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
preferences:
|
||||
lock:
|
||||
- favicon_resolver
|
||||
- image_proxy
|
||||
- method
|
||||
# ...
|
||||
|
||||
"""
|
||||
|
||||
lock: set[
|
||||
t.Literal[
|
||||
"categories",
|
||||
"language",
|
||||
"locale",
|
||||
"autocomplete",
|
||||
"favicon_resolver",
|
||||
"image_proxy",
|
||||
"method",
|
||||
"safesearch",
|
||||
"theme",
|
||||
"results_on_new_tab",
|
||||
"doi_resolver",
|
||||
"simple_style",
|
||||
"center_alignment",
|
||||
"query_in_title",
|
||||
"search_on_category_select",
|
||||
]
|
||||
] = set()
|
||||
"""Lock arbitrary settings on the preferences page."""
|
||||
@@ -179,6 +179,23 @@ def naver(query: str, _sxng_locale: str) -> list[str]:
|
||||
return results
|
||||
|
||||
|
||||
def privacywall(query: str, sxng_locale: str) -> list[str]:
|
||||
# Privacywall search autocompleter
|
||||
country = None
|
||||
if "-" in sxng_locale:
|
||||
country = sxng_locale.split("-")[1]
|
||||
args = {'q': query, 'cc': country}
|
||||
|
||||
url = f"https://www.privacywall.org/search/secure/suggestions.php?{urlencode(args)}"
|
||||
response = get(url)
|
||||
|
||||
if not response.ok:
|
||||
return []
|
||||
|
||||
data: list[list[str]] = response.json()
|
||||
return data[1]
|
||||
|
||||
|
||||
def qihu360search(query: str, _sxng_locale: str) -> list[str]:
|
||||
# 360Search search autocompleter
|
||||
url = f"https://sug.so.360.cn/suggest?{urlencode({'format': 'json', 'word': query})}"
|
||||
@@ -361,6 +378,7 @@ backends: dict[str, t.Callable[[str, str], list[str]]] = {
|
||||
'google': google_complete,
|
||||
'mwmbl': mwmbl,
|
||||
'naver': naver,
|
||||
'privacywall': privacywall,
|
||||
'quark': quark,
|
||||
'qwant': qwant,
|
||||
'seznam': seznam,
|
||||
|
||||
+8
-5
@@ -444,12 +444,10 @@ class ExpireCacheSQLite(sqlitedb.SQLiteAppl, ExpireCache):
|
||||
def get(self, key: str, default: typing.Any = None, ctx: str | None = None) -> typing.Any:
|
||||
"""Get value of ``key`` from table given by argument ``ctx``. If
|
||||
``ctx`` argument is ``None`` (the default), a table name is generated
|
||||
from the :py:obj:`ExpireCacheCfg.name`. If ``key`` not exists (in
|
||||
table), the ``default`` value is returned.
|
||||
|
||||
from the :py:obj:`ExpireCacheCfg.name`. If ``key`` not exists in
|
||||
the table or the table not exists, the ``default`` value is returned.
|
||||
"""
|
||||
table = ctx
|
||||
self.maintenance()
|
||||
|
||||
if not table:
|
||||
table = self.normalize_name(self.cfg.name)
|
||||
@@ -457,6 +455,9 @@ class ExpireCacheSQLite(sqlitedb.SQLiteAppl, ExpireCache):
|
||||
if table not in self.table_names:
|
||||
return default
|
||||
|
||||
# Before values are taken from the table, a maintenance interval may
|
||||
# need to be carried out.
|
||||
self.maintenance()
|
||||
sql = f"SELECT value FROM {table} WHERE key = ?"
|
||||
row = self.DB.execute(sql, (key,)).fetchone()
|
||||
if row is None:
|
||||
@@ -469,12 +470,14 @@ class ExpireCacheSQLite(sqlitedb.SQLiteAppl, ExpireCache):
|
||||
If ``ctx`` argument is ``None`` (the default), a table name is
|
||||
generated from the :py:obj:`ExpireCacheCfg.name`."""
|
||||
table = ctx
|
||||
self.maintenance()
|
||||
|
||||
if not table:
|
||||
table = self.normalize_name(self.cfg.name)
|
||||
|
||||
if table in self.table_names:
|
||||
# Before values are taken from the table, a maintenance interval may
|
||||
# need to be carried out.
|
||||
self.maintenance()
|
||||
for row in self.DB.execute(f"SELECT key, value FROM {table}"):
|
||||
yield row[0], self.deserialize(row[1])
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+61
-23
@@ -84,6 +84,7 @@
|
||||
"sr": "УАЕ дирхам",
|
||||
"sv": "Emiratisk dirham",
|
||||
"ta": "ஐக்கிய அரபு அமீரக திர்கம்",
|
||||
"te": "యూఏఈ దిర్హామ్",
|
||||
"tr": "Birleşik Arap Emirlikleri dirhemi",
|
||||
"tt": "БГӘ дирһәме",
|
||||
"uk": "дирхам ОАЕ"
|
||||
@@ -165,7 +166,7 @@
|
||||
"pap": "lek albanes",
|
||||
"pl": "lek",
|
||||
"pt": "lek",
|
||||
"ro": "Lek",
|
||||
"ro": "lek albanez",
|
||||
"ru": "албанский лек",
|
||||
"sk": "Albánsky lek",
|
||||
"sl": "albanski lek",
|
||||
@@ -738,6 +739,7 @@
|
||||
"sr": "брунејски долар",
|
||||
"sv": "Bruneisk dollar",
|
||||
"ta": "புரூணை டாலர்",
|
||||
"te": "బ్రూనై డాలర్",
|
||||
"th": "ดอลลาร์บรูไน",
|
||||
"tr": "Brunei doları",
|
||||
"tt": "Бруней доллары",
|
||||
@@ -911,6 +913,7 @@
|
||||
"sr": "бутански нгултрум",
|
||||
"sv": "Ngultrum",
|
||||
"ta": "பூட்டானின் இங்குல்ட்ரம்",
|
||||
"te": "భూటానీస్ గుల్త్రమ్",
|
||||
"th": "งุลตรัมภูฏาน",
|
||||
"tr": "Ngultrum",
|
||||
"tt": "ңгултрум",
|
||||
@@ -989,7 +992,7 @@
|
||||
"pa": "ਬੈਲਾਰੂਸੀ ਰੂਬਲ",
|
||||
"pl": "Rubel białoruski",
|
||||
"pt": "Rublo bielorrusso",
|
||||
"ro": "Rublă belarusă",
|
||||
"ro": "rublă belarusă",
|
||||
"ru": "Белорусский рубль",
|
||||
"sk": "Bieloruský rubeľ",
|
||||
"sl": "beloruski rubelj",
|
||||
@@ -1083,6 +1086,7 @@
|
||||
"sr": "канадски долар",
|
||||
"sv": "kanadensisk dollar",
|
||||
"ta": "கனடா டொலர்",
|
||||
"te": "కెనడియన్ డాలర్",
|
||||
"th": "ดอลลาร์แคนาดา",
|
||||
"tr": "Kanada doları",
|
||||
"tt": "Канада дуллыры",
|
||||
@@ -1231,6 +1235,7 @@
|
||||
"sl": "čilski peso",
|
||||
"sr": "чилеански пезос",
|
||||
"sv": "Chilensk peso",
|
||||
"te": "చిలీ పెసో",
|
||||
"th": "เปโซชิลี",
|
||||
"tr": "Şili pesosu",
|
||||
"tt": "Чили песосы",
|
||||
@@ -1284,6 +1289,7 @@
|
||||
"sr": "ренминби",
|
||||
"sv": "Renminbi",
|
||||
"ta": "ரென்மின்பி",
|
||||
"te": "రెన్మిన్బి",
|
||||
"th": "เหรินหมินปี้",
|
||||
"tr": "Renminbi",
|
||||
"tt": "юән",
|
||||
@@ -1702,7 +1708,7 @@
|
||||
"vi": "Bảng Ai Cập"
|
||||
},
|
||||
"ERN": {
|
||||
"ar": "ناكفا",
|
||||
"ar": "نقفة",
|
||||
"ca": "nakfa",
|
||||
"cs": "Eritrejská nakfa",
|
||||
"da": "Nakfa",
|
||||
@@ -1776,11 +1782,11 @@
|
||||
"bg": "евро",
|
||||
"bn": "ইউরো",
|
||||
"ca": "euro",
|
||||
"cs": "euro",
|
||||
"cs": "Euro",
|
||||
"cy": "Ewro",
|
||||
"da": "Euro",
|
||||
"de": "Euro",
|
||||
"en": "euro",
|
||||
"en": "Euro",
|
||||
"eo": "eŭro",
|
||||
"es": "Euro",
|
||||
"et": "Euro",
|
||||
@@ -1794,7 +1800,7 @@
|
||||
"hu": "euró",
|
||||
"ia": "Euro",
|
||||
"id": "Euro",
|
||||
"it": "euro",
|
||||
"it": "Euro",
|
||||
"ja": "ユーロ",
|
||||
"ko": "유로",
|
||||
"lt": "Euras",
|
||||
@@ -1805,11 +1811,11 @@
|
||||
"oc": "Èuro",
|
||||
"pa": "ਯੂਰੋ",
|
||||
"pap": "Euro",
|
||||
"pl": "euro",
|
||||
"pl": "Euro",
|
||||
"pt": "Euro",
|
||||
"ro": "euro",
|
||||
"ro": "Euro",
|
||||
"ru": "евро",
|
||||
"sk": "euro",
|
||||
"sk": "Euro",
|
||||
"sl": "evro",
|
||||
"sr": "евро",
|
||||
"sv": "Euro",
|
||||
@@ -1935,7 +1941,7 @@
|
||||
"sk": "libra šterlingov",
|
||||
"sl": "funt šterling",
|
||||
"sr": "британска фунта",
|
||||
"sv": "Brittiskt pund",
|
||||
"sv": "brittiskt pund",
|
||||
"ta": "பிரித்தானிய பவுண்டு",
|
||||
"th": "ปอนด์สเตอร์ลิง",
|
||||
"tr": "İngiliz sterlini",
|
||||
@@ -2410,6 +2416,7 @@
|
||||
"pl": "rupia indonezyjska",
|
||||
"pt": "rupia indonésia",
|
||||
"ru": "индонезийская рупия",
|
||||
"sk": "Indonézska rupia",
|
||||
"sl": "indonezijska rupija",
|
||||
"sr": "индонежанска рупија",
|
||||
"sv": "Rupiah",
|
||||
@@ -2463,6 +2470,7 @@
|
||||
"sr": "нови израелски шекел",
|
||||
"sv": "Shekel",
|
||||
"ta": "புது இசுரேலிய சேக்கல்",
|
||||
"te": "ఇజ్రాయెల్ షెకెల్",
|
||||
"tr": "Yeni İsrail Şekeli",
|
||||
"tt": "Исраил шекеле",
|
||||
"uk": "ізраїльський новий шекель"
|
||||
@@ -2758,6 +2766,7 @@
|
||||
"sr": "јапански јен",
|
||||
"sv": "yen",
|
||||
"ta": "யென்",
|
||||
"te": "జపనీస్ యెన్",
|
||||
"th": "เยน",
|
||||
"tr": "Japon yeni",
|
||||
"tt": "япон иенасы",
|
||||
@@ -2823,6 +2832,7 @@
|
||||
"ja": "キルギス・ソム",
|
||||
"ko": "키르기스스탄 솜",
|
||||
"lt": "somas",
|
||||
"lv": "Kirgizstānas soms",
|
||||
"nl": "Kirgizische som",
|
||||
"pa": "ਕਿਰਗਿਜ਼ਸਤਾਨੀ ਸੋਮ",
|
||||
"pl": "som",
|
||||
@@ -3236,6 +3246,7 @@
|
||||
"sr": "шриланчанска рупија",
|
||||
"sv": "Lankesisk rupie",
|
||||
"ta": "இலங்கை ரூபாய்",
|
||||
"te": "శ్రీలంక రూపాయి",
|
||||
"tr": "Sri Lanka rupisi",
|
||||
"tt": "Шри-Ланка рупиясе",
|
||||
"uk": "ланкійська рупія",
|
||||
@@ -3810,6 +3821,7 @@
|
||||
"MXV": {
|
||||
"de": "UNIDAD DE INVERSION",
|
||||
"en": "unidad de inversión",
|
||||
"eo": "Meksika unuo de investo",
|
||||
"es": "Unidades de Inversión",
|
||||
"ja": "メキシコ投資単位"
|
||||
},
|
||||
@@ -3901,7 +3913,7 @@
|
||||
"de": "Namibia-Dollar",
|
||||
"en": "Namibian dollar",
|
||||
"eo": "namibia dolaro",
|
||||
"es": "Dólar namibio",
|
||||
"es": "dólar namibio",
|
||||
"fi": "Namibian dollari",
|
||||
"fr": "Dollar namibien",
|
||||
"ga": "dollar na Namaibe",
|
||||
@@ -4090,6 +4102,7 @@
|
||||
"sr": "непалска рупија",
|
||||
"sv": "Nepalesisk rupee",
|
||||
"ta": "நேபாள ரூபாய்",
|
||||
"te": "నేపాలీ రూపాయి",
|
||||
"th": "รูปีเนปาล",
|
||||
"tr": "Nepal rupisi",
|
||||
"tt": "Непал рупиясе",
|
||||
@@ -4325,6 +4338,7 @@
|
||||
"sr": "филипински пезо",
|
||||
"sv": "Filippinsk peso",
|
||||
"ta": "பிலிப்பைன் பெசோ",
|
||||
"te": "ఫిలిప్పీన్ పెసో",
|
||||
"th": "เปโซฟิลิปปินส์",
|
||||
"tr": "Filipinler pesosu",
|
||||
"tt": "Филипин писысы",
|
||||
@@ -4370,6 +4384,7 @@
|
||||
"sr": "пакистанска рупија",
|
||||
"sv": "Pakistansk rupee",
|
||||
"ta": "பாக்கித்தானிய ரூபாய்",
|
||||
"te": "పాకిస్థానీ రూపాయి",
|
||||
"tr": "Pakistan rupisi",
|
||||
"tt": "Пакстан рупиясе",
|
||||
"uk": "пакистанська рупія",
|
||||
@@ -4549,7 +4564,7 @@
|
||||
"de": "rumänischer Leu",
|
||||
"en": "Romanian Leu",
|
||||
"eo": "rumana leo",
|
||||
"es": "Leu rumano",
|
||||
"es": "leu rumano",
|
||||
"et": "Rumeenia leu",
|
||||
"fi": "Romanian leu",
|
||||
"fr": "leu roumain",
|
||||
@@ -4750,6 +4765,7 @@
|
||||
"sr": "саудијски ријал",
|
||||
"sv": "Saudiarabisk rial",
|
||||
"ta": "சவூதி ரியால்",
|
||||
"te": "సౌదీ రియాల్",
|
||||
"tr": "Suudi Arabistan riyali",
|
||||
"tt": "Согуд риялы",
|
||||
"uk": "саудівський ріал",
|
||||
@@ -4948,6 +4964,7 @@
|
||||
"sr": "сингапурски долар",
|
||||
"sv": "Singaporiansk dollar",
|
||||
"ta": "சிங்கப்பூர் வெள்ளி",
|
||||
"te": "సింగపూర్ డాలర్",
|
||||
"th": "ดอลลาร์สิงคโปร์",
|
||||
"tr": "Singapur doları",
|
||||
"tt": "Сингапур доллары",
|
||||
@@ -5175,7 +5192,7 @@
|
||||
"de": "syrische Lira",
|
||||
"en": "Syrian pound",
|
||||
"eo": "siria pundo",
|
||||
"es": "Dolar sirio",
|
||||
"es": "libra siria",
|
||||
"fi": "Syyrian punta",
|
||||
"fr": "livre syrienne",
|
||||
"ga": "punt na Siria",
|
||||
@@ -5977,7 +5994,7 @@
|
||||
"ms": "Franc CFA Afrika Tengah",
|
||||
"nl": "Central African CFA franc",
|
||||
"oc": "Franc CFA d'Africa Centrala",
|
||||
"pl": "środkowoafrykański frank CFA",
|
||||
"pl": "frank CFA",
|
||||
"pt": "franco",
|
||||
"ro": "Franc CFA BEAC",
|
||||
"ru": "франк КФА BEAC",
|
||||
@@ -5999,6 +6016,7 @@
|
||||
"fr": "argent d'investissement",
|
||||
"ja": "投資対象としての銀",
|
||||
"ms": "Perak sebagai pelaburan",
|
||||
"pt": "Prata como investimento",
|
||||
"ru": "серебро как инвестиция",
|
||||
"sv": "Silver som investering",
|
||||
"tr": "Yatırım olarak gümüş",
|
||||
@@ -6017,6 +6035,7 @@
|
||||
"lv": "zelts kā investīcija",
|
||||
"ml": "സ്വർണവും സാമ്പത്തിക ശാസ്ത്രവും",
|
||||
"ms": "emas sebagai pelaburan",
|
||||
"pt": "Ouro como investimento",
|
||||
"ru": "золото как инвестиция",
|
||||
"sr": "investiciono zlato",
|
||||
"sv": "investeringsguld",
|
||||
@@ -7905,7 +7924,6 @@
|
||||
"dolar de las islas caimán": "KYD",
|
||||
"dolar de las islas salomon": "SBD",
|
||||
"dolar de las islas salomón": "SBD",
|
||||
"dolar de namibia": "NAD",
|
||||
"dolar de nueva zelanda": "NZD",
|
||||
"dolar de singapor": "SGD",
|
||||
"dolar de singapur": "SGD",
|
||||
@@ -7963,7 +7981,6 @@
|
||||
"dolar namibia": "NAD",
|
||||
"dolar namibian": "NAD",
|
||||
"dolar namibijski": "NAD",
|
||||
"dolar namibio": "NAD",
|
||||
"dolar neocelandes": "NZD",
|
||||
"dolar neocelandés": "NZD",
|
||||
"dolar neozeelandez": "NZD",
|
||||
@@ -7978,7 +7995,6 @@
|
||||
"dolar singapura": "SGD",
|
||||
"dolar singapurski": "SGD",
|
||||
"dolar singapurtar": "SGD",
|
||||
"dolar sirio": "SYP",
|
||||
"dolar sua": "USD",
|
||||
"dolar surinamdar": "SRD",
|
||||
"dolar suriname": "SRD",
|
||||
@@ -8179,6 +8195,7 @@
|
||||
"dominicaanse peso": "DOP",
|
||||
"dominican peso": "DOP",
|
||||
"dominican peso oro": "DOP",
|
||||
"dominički pezo": "DOP",
|
||||
"dominik pesosu": "DOP",
|
||||
"dominika peso": "DOP",
|
||||
"dominikaanisen tasavallan peso": "DOP",
|
||||
@@ -8528,7 +8545,6 @@
|
||||
"etiópsky birr": "ETB",
|
||||
"eua 17": "XBD",
|
||||
"eua 9": "XBC",
|
||||
"eur": "EUR",
|
||||
"euras": "EUR",
|
||||
"eurco": "XBA",
|
||||
"euro": "EUR",
|
||||
@@ -8859,7 +8875,6 @@
|
||||
"frank kongijski": "CDF",
|
||||
"frank rwandyjski": "RWF",
|
||||
"frank szwajcarski": "CHF",
|
||||
"frank zachodnioafrykański": "XOF",
|
||||
"franko suitzar": "CHF",
|
||||
"frw": "RWF",
|
||||
"ft": "HUF",
|
||||
@@ -9180,6 +9195,7 @@
|
||||
"indonezijska rupija": "IDR",
|
||||
"indonéská rupie": "IDR",
|
||||
"indonéz rúpia": "IDR",
|
||||
"indonézska rupia": "IDR",
|
||||
"indonēziešu rūpija": "IDR",
|
||||
"indonēzijas rūpija": "IDR",
|
||||
"inglise nael": "GBP",
|
||||
@@ -9494,6 +9510,8 @@
|
||||
"kirgizia somo": "KGS",
|
||||
"kirgizische som": "KGS",
|
||||
"kirgizistansk som": "KGS",
|
||||
"kirgizstānas soms": "KGS",
|
||||
"kirgīzu soms": "KGS",
|
||||
"kiwi dollar": "NZD",
|
||||
"kínai jüan": "CNY",
|
||||
"kíp": "LAK",
|
||||
@@ -9810,7 +9828,6 @@
|
||||
"lek na halbáine": "ALL",
|
||||
"lek novo": "ALL",
|
||||
"lekas": "ALL",
|
||||
"lekă albaneză": "ALL",
|
||||
"lekë": "ALL",
|
||||
"leko": "ALL",
|
||||
"lempira": "HNL",
|
||||
@@ -9981,6 +9998,7 @@
|
||||
"lira libanesa": "LBP",
|
||||
"lira libanese": "LBP",
|
||||
"lira na tuirce": "TRY",
|
||||
"lira siria": "SYP",
|
||||
"lira siriana": "SYP",
|
||||
"lira síria": "SYP",
|
||||
"lira thổ nhĩ kỳ": "TRY",
|
||||
@@ -10291,6 +10309,7 @@
|
||||
"meksički pezo": "MXN",
|
||||
"meksika peso": "MXN",
|
||||
"meksika pesosu": "MXN",
|
||||
"meksika unuo de investo": "MXV",
|
||||
"meksikaanse peso": "MXN",
|
||||
"meksikas peso": "MXN",
|
||||
"meksikon peso": "MXN",
|
||||
@@ -10746,6 +10765,7 @@
|
||||
"ouguiya mauritanien": "MRU",
|
||||
"ouguiya mawritania": "MRU",
|
||||
"ouguiya na máratáine": "MRU",
|
||||
"ouro como investimento": "XAU",
|
||||
"ouro do zimbábue": "ZWG",
|
||||
"örmény dram": "AMD",
|
||||
"östkaribisk dollar": "XCD",
|
||||
@@ -11111,6 +11131,7 @@
|
||||
"põhja korea vonn": "KPW",
|
||||
"põhja korea won": "KPW",
|
||||
"põhja makedoonia denaar": "MKD",
|
||||
"prata como investimento": "XAG",
|
||||
"pula": "BWP",
|
||||
"pula botswana": "BWP",
|
||||
"pula botswanais": "BWP",
|
||||
@@ -11901,6 +11922,7 @@
|
||||
"somoni taxico": "TJS",
|
||||
"somoni tayiko": "TJS",
|
||||
"somonis": "TJS",
|
||||
"soms": "KGS",
|
||||
"sonderziehungsrecht": "XDR",
|
||||
"sos": "SOS",
|
||||
"sosh": "SOS",
|
||||
@@ -12102,7 +12124,6 @@
|
||||
"szyling tanzański": "TZS",
|
||||
"szyling ugandyjski": "UGX",
|
||||
"sırp dinarı": "RSD",
|
||||
"środkowoafrykański frank cfa": "XAF",
|
||||
"šalamounský dolar": "SBD",
|
||||
"šalomounský dolar": "SBD",
|
||||
"šekel chadaš": "ILS",
|
||||
@@ -14017,6 +14038,7 @@
|
||||
"самоанский доллар": "WST",
|
||||
"самоанська тала": "WST",
|
||||
"сан томе һәм принсипи добрасы": "STN",
|
||||
"саотомеанска добра": "STN",
|
||||
"саотомска добра": "STN",
|
||||
"саудитски риал": "SAR",
|
||||
"саудијски риал": "SAR",
|
||||
@@ -15350,13 +15372,28 @@
|
||||
"ஹங்கேரிய போரிண்ட்": "HUF",
|
||||
"ஹிருன்யா": "UAH",
|
||||
"ஹொங்கொங் டொலர்": "HKD",
|
||||
"అమెరికన్ డాలర్": "USD",
|
||||
"ఇజ్రాయెల్ షెకెల్": "ILS",
|
||||
"కెనడియన్ డాలర్": "CAD",
|
||||
"చిలీ పెసో": "CLP",
|
||||
"జపనీస్ యెన్": "JPY",
|
||||
"డిజిటల్ రూపాయి": "INR",
|
||||
"నేపాలీ రూపాయి": "NPR",
|
||||
"పాకిస్థానీ రూపాయి": "PKR",
|
||||
"ఫిలిప్పీన్ పెసో": "PHP",
|
||||
"బ్రూనై డాలర్": "BND",
|
||||
"భారత రూపాయి": "INR",
|
||||
"భారతదేశ రూపాయి": "INR",
|
||||
"భారతీయ రూపాయి": "INR",
|
||||
"భూటానీస్ గుల్త్రమ్": "BTN",
|
||||
"యునైటెడ్ స్టేట్స్ డాలర్": "USD",
|
||||
"యూఏఈ దిర్హామ్": "AED",
|
||||
"యూరో": "EUR",
|
||||
"రూపాయి": "INR",
|
||||
"రెన్మిన్బి": "CNY",
|
||||
"శ్రీలంక రూపాయి": "LKR",
|
||||
"సింగపూర్ డాలర్": "SGD",
|
||||
"సౌదీ రియాల్": "SAR",
|
||||
"స్విస్ ఫ్రాంక్": "CHF",
|
||||
"അൾജീരിയൻ ദിനാർ": "DZD",
|
||||
"ഇന്തോനേഷ്യൻ റുപിയ": "IDR",
|
||||
@@ -15607,6 +15644,8 @@
|
||||
"부탄 뉘땀": "BTN",
|
||||
"부탄눌트럼": "BTN",
|
||||
"북마케도니아 데나르": "MKD",
|
||||
"북조선 원": "KPW",
|
||||
"북한 원": "KPW",
|
||||
"브라질 레알": "BRL",
|
||||
"브라질 헤알": "BRL",
|
||||
"브루나이 달러": "BND",
|
||||
@@ -16199,7 +16238,6 @@
|
||||
"香港・ドル": "HKD",
|
||||
"香港元": "HKD",
|
||||
"﷼": "IRR",
|
||||
"﷼'": "YER",
|
||||
"💶": "EUR"
|
||||
"﷼'": "YER"
|
||||
}
|
||||
}
|
||||
+364
-585
File diff suppressed because it is too large
Load Diff
+465
-180
@@ -5740,186 +5740,6 @@
|
||||
"zu-ZA": "ZA"
|
||||
}
|
||||
},
|
||||
"karmasearch": {
|
||||
"all_locale": null,
|
||||
"custom": {},
|
||||
"data_type": "traits_v1",
|
||||
"languages": {},
|
||||
"regions": {
|
||||
"da-DK": "da-DK",
|
||||
"de-AT": "de-AT",
|
||||
"de-CH": "de-CH",
|
||||
"de-DE": "de-DE",
|
||||
"en-AU": "en-AU",
|
||||
"en-CA": "en-CA",
|
||||
"en-GB": "en-GB",
|
||||
"en-ID": "en-ID",
|
||||
"en-IN": "en-IN",
|
||||
"en-MY": "en-MY",
|
||||
"en-NZ": "en-NZ",
|
||||
"en-PH": "en-PH",
|
||||
"en-US": "en-US",
|
||||
"en-ZA": "en-ZA",
|
||||
"es-AR": "es-AR",
|
||||
"es-CL": "es-CL",
|
||||
"es-ES": "es-ES",
|
||||
"es-MX": "es-MX",
|
||||
"es-US": "es-US",
|
||||
"fi-FI": "fi-FI",
|
||||
"fr-BE": "fr-BE",
|
||||
"fr-CA": "fr-CA",
|
||||
"fr-CH": "fr-CH",
|
||||
"fr-FR": "fr-FR",
|
||||
"it-IT": "it-IT",
|
||||
"ja-JP": "ja-JP",
|
||||
"ko-KR": "ko-KR",
|
||||
"nl-BE": "nl-BE",
|
||||
"nl-NL": "nl-NL",
|
||||
"pl-PL": "pl-PL",
|
||||
"pt-BR": "pt-BR",
|
||||
"ru-RU": "ru-RU",
|
||||
"sv-SE": "sv-SE",
|
||||
"tr-TR": "tr-TR",
|
||||
"zh-CN": "zh-CN",
|
||||
"zh-HK": "zh-HK",
|
||||
"zh-TW": "zh-TW"
|
||||
}
|
||||
},
|
||||
"karmasearch images": {
|
||||
"all_locale": null,
|
||||
"custom": {},
|
||||
"data_type": "traits_v1",
|
||||
"languages": {},
|
||||
"regions": {
|
||||
"da-DK": "da-DK",
|
||||
"de-AT": "de-AT",
|
||||
"de-CH": "de-CH",
|
||||
"de-DE": "de-DE",
|
||||
"en-AU": "en-AU",
|
||||
"en-CA": "en-CA",
|
||||
"en-GB": "en-GB",
|
||||
"en-ID": "en-ID",
|
||||
"en-IN": "en-IN",
|
||||
"en-MY": "en-MY",
|
||||
"en-NZ": "en-NZ",
|
||||
"en-PH": "en-PH",
|
||||
"en-US": "en-US",
|
||||
"en-ZA": "en-ZA",
|
||||
"es-AR": "es-AR",
|
||||
"es-CL": "es-CL",
|
||||
"es-ES": "es-ES",
|
||||
"es-MX": "es-MX",
|
||||
"es-US": "es-US",
|
||||
"fi-FI": "fi-FI",
|
||||
"fr-BE": "fr-BE",
|
||||
"fr-CA": "fr-CA",
|
||||
"fr-CH": "fr-CH",
|
||||
"fr-FR": "fr-FR",
|
||||
"it-IT": "it-IT",
|
||||
"ja-JP": "ja-JP",
|
||||
"ko-KR": "ko-KR",
|
||||
"nl-BE": "nl-BE",
|
||||
"nl-NL": "nl-NL",
|
||||
"pl-PL": "pl-PL",
|
||||
"pt-BR": "pt-BR",
|
||||
"ru-RU": "ru-RU",
|
||||
"sv-SE": "sv-SE",
|
||||
"tr-TR": "tr-TR",
|
||||
"zh-CN": "zh-CN",
|
||||
"zh-HK": "zh-HK",
|
||||
"zh-TW": "zh-TW"
|
||||
}
|
||||
},
|
||||
"karmasearch news": {
|
||||
"all_locale": null,
|
||||
"custom": {},
|
||||
"data_type": "traits_v1",
|
||||
"languages": {},
|
||||
"regions": {
|
||||
"da-DK": "da-DK",
|
||||
"de-AT": "de-AT",
|
||||
"de-CH": "de-CH",
|
||||
"de-DE": "de-DE",
|
||||
"en-AU": "en-AU",
|
||||
"en-CA": "en-CA",
|
||||
"en-GB": "en-GB",
|
||||
"en-ID": "en-ID",
|
||||
"en-IN": "en-IN",
|
||||
"en-MY": "en-MY",
|
||||
"en-NZ": "en-NZ",
|
||||
"en-PH": "en-PH",
|
||||
"en-US": "en-US",
|
||||
"en-ZA": "en-ZA",
|
||||
"es-AR": "es-AR",
|
||||
"es-CL": "es-CL",
|
||||
"es-ES": "es-ES",
|
||||
"es-MX": "es-MX",
|
||||
"es-US": "es-US",
|
||||
"fi-FI": "fi-FI",
|
||||
"fr-BE": "fr-BE",
|
||||
"fr-CA": "fr-CA",
|
||||
"fr-CH": "fr-CH",
|
||||
"fr-FR": "fr-FR",
|
||||
"it-IT": "it-IT",
|
||||
"ja-JP": "ja-JP",
|
||||
"ko-KR": "ko-KR",
|
||||
"nl-BE": "nl-BE",
|
||||
"nl-NL": "nl-NL",
|
||||
"pl-PL": "pl-PL",
|
||||
"pt-BR": "pt-BR",
|
||||
"ru-RU": "ru-RU",
|
||||
"sv-SE": "sv-SE",
|
||||
"tr-TR": "tr-TR",
|
||||
"zh-CN": "zh-CN",
|
||||
"zh-HK": "zh-HK",
|
||||
"zh-TW": "zh-TW"
|
||||
}
|
||||
},
|
||||
"karmasearch videos": {
|
||||
"all_locale": null,
|
||||
"custom": {},
|
||||
"data_type": "traits_v1",
|
||||
"languages": {},
|
||||
"regions": {
|
||||
"da-DK": "da-DK",
|
||||
"de-AT": "de-AT",
|
||||
"de-CH": "de-CH",
|
||||
"de-DE": "de-DE",
|
||||
"en-AU": "en-AU",
|
||||
"en-CA": "en-CA",
|
||||
"en-GB": "en-GB",
|
||||
"en-ID": "en-ID",
|
||||
"en-IN": "en-IN",
|
||||
"en-MY": "en-MY",
|
||||
"en-NZ": "en-NZ",
|
||||
"en-PH": "en-PH",
|
||||
"en-US": "en-US",
|
||||
"en-ZA": "en-ZA",
|
||||
"es-AR": "es-AR",
|
||||
"es-CL": "es-CL",
|
||||
"es-ES": "es-ES",
|
||||
"es-MX": "es-MX",
|
||||
"es-US": "es-US",
|
||||
"fi-FI": "fi-FI",
|
||||
"fr-BE": "fr-BE",
|
||||
"fr-CA": "fr-CA",
|
||||
"fr-CH": "fr-CH",
|
||||
"fr-FR": "fr-FR",
|
||||
"it-IT": "it-IT",
|
||||
"ja-JP": "ja-JP",
|
||||
"ko-KR": "ko-KR",
|
||||
"nl-BE": "nl-BE",
|
||||
"nl-NL": "nl-NL",
|
||||
"pl-PL": "pl-PL",
|
||||
"pt-BR": "pt-BR",
|
||||
"ru-RU": "ru-RU",
|
||||
"sv-SE": "sv-SE",
|
||||
"tr-TR": "tr-TR",
|
||||
"zh-CN": "zh-CN",
|
||||
"zh-HK": "zh-HK",
|
||||
"zh-TW": "zh-TW"
|
||||
}
|
||||
},
|
||||
"mojeek": {
|
||||
"all_locale": null,
|
||||
"custom": {
|
||||
@@ -6814,6 +6634,255 @@
|
||||
},
|
||||
"regions": {}
|
||||
},
|
||||
"privacywall": {
|
||||
"all_locale": null,
|
||||
"custom": {},
|
||||
"data_type": "traits_v1",
|
||||
"languages": {},
|
||||
"regions": {
|
||||
"bg-BG": "BG",
|
||||
"cs-CZ": "CZ",
|
||||
"da-DK": "DK",
|
||||
"de-AT": "AT",
|
||||
"de-BE": "BE",
|
||||
"de-CH": "CH",
|
||||
"de-DE": "DE",
|
||||
"de-LI": "LI",
|
||||
"de-LU": "LU",
|
||||
"el-CY": "CY",
|
||||
"el-GR": "GR",
|
||||
"en-AU": "AU",
|
||||
"en-CA": "CA",
|
||||
"en-GB": "GB",
|
||||
"en-HK": "HK",
|
||||
"en-IE": "IE",
|
||||
"en-IN": "IN",
|
||||
"en-MT": "MT",
|
||||
"en-NZ": "NZ",
|
||||
"en-PH": "PH",
|
||||
"en-SG": "SG",
|
||||
"en-US": "US",
|
||||
"es-AR": "AR",
|
||||
"es-CL": "CL",
|
||||
"es-CO": "CO",
|
||||
"es-ES": "ES",
|
||||
"es-MX": "MX",
|
||||
"es-PE": "PE",
|
||||
"es-VE": "VE",
|
||||
"et-EE": "EE",
|
||||
"fi-FI": "FI",
|
||||
"fil-PH": "PH",
|
||||
"fr-BE": "BE",
|
||||
"fr-CA": "CA",
|
||||
"fr-CH": "CH",
|
||||
"fr-FR": "FR",
|
||||
"fr-LU": "LU",
|
||||
"ga-IE": "IE",
|
||||
"gsw-CH": "CH",
|
||||
"gsw-LI": "LI",
|
||||
"hi-IN": "IN",
|
||||
"hr-HR": "HR",
|
||||
"hu-HU": "HU",
|
||||
"id-ID": "ID",
|
||||
"it-CH": "CH",
|
||||
"it-IT": "IT",
|
||||
"ja-JP": "JP",
|
||||
"ko-KR": "KR",
|
||||
"lb-LU": "LU",
|
||||
"lt-LT": "LT",
|
||||
"lv-LV": "LV",
|
||||
"mi-NZ": "NZ",
|
||||
"ms-MY": "MY",
|
||||
"ms-SG": "SG",
|
||||
"mt-MT": "MT",
|
||||
"nb-NO": "NO",
|
||||
"nl-BE": "BE",
|
||||
"nl-NL": "NL",
|
||||
"nn-NO": "NO",
|
||||
"pl-PL": "PL",
|
||||
"pt-BR": "BR",
|
||||
"pt-PT": "PT",
|
||||
"qu-PE": "PE",
|
||||
"ro-RO": "RO",
|
||||
"sk-SK": "SK",
|
||||
"sl-SI": "SI",
|
||||
"sv-FI": "FI",
|
||||
"sv-SE": "SE",
|
||||
"ta-SG": "SG",
|
||||
"th-TH": "TH",
|
||||
"tr-CY": "CY",
|
||||
"vi-VN": "VN",
|
||||
"zh-HK": "HK",
|
||||
"zh-SG": "SG",
|
||||
"zh-TW": "TW"
|
||||
}
|
||||
},
|
||||
"privacywall images": {
|
||||
"all_locale": null,
|
||||
"custom": {},
|
||||
"data_type": "traits_v1",
|
||||
"languages": {},
|
||||
"regions": {
|
||||
"bg-BG": "BG",
|
||||
"cs-CZ": "CZ",
|
||||
"da-DK": "DK",
|
||||
"de-AT": "AT",
|
||||
"de-BE": "BE",
|
||||
"de-CH": "CH",
|
||||
"de-DE": "DE",
|
||||
"de-LI": "LI",
|
||||
"de-LU": "LU",
|
||||
"el-CY": "CY",
|
||||
"el-GR": "GR",
|
||||
"en-AU": "AU",
|
||||
"en-CA": "CA",
|
||||
"en-GB": "GB",
|
||||
"en-HK": "HK",
|
||||
"en-IE": "IE",
|
||||
"en-IN": "IN",
|
||||
"en-MT": "MT",
|
||||
"en-NZ": "NZ",
|
||||
"en-PH": "PH",
|
||||
"en-SG": "SG",
|
||||
"en-US": "US",
|
||||
"es-AR": "AR",
|
||||
"es-CL": "CL",
|
||||
"es-CO": "CO",
|
||||
"es-ES": "ES",
|
||||
"es-MX": "MX",
|
||||
"es-PE": "PE",
|
||||
"es-VE": "VE",
|
||||
"et-EE": "EE",
|
||||
"fi-FI": "FI",
|
||||
"fil-PH": "PH",
|
||||
"fr-BE": "BE",
|
||||
"fr-CA": "CA",
|
||||
"fr-CH": "CH",
|
||||
"fr-FR": "FR",
|
||||
"fr-LU": "LU",
|
||||
"ga-IE": "IE",
|
||||
"gsw-CH": "CH",
|
||||
"gsw-LI": "LI",
|
||||
"hi-IN": "IN",
|
||||
"hr-HR": "HR",
|
||||
"hu-HU": "HU",
|
||||
"id-ID": "ID",
|
||||
"it-CH": "CH",
|
||||
"it-IT": "IT",
|
||||
"ja-JP": "JP",
|
||||
"ko-KR": "KR",
|
||||
"lb-LU": "LU",
|
||||
"lt-LT": "LT",
|
||||
"lv-LV": "LV",
|
||||
"mi-NZ": "NZ",
|
||||
"ms-MY": "MY",
|
||||
"ms-SG": "SG",
|
||||
"mt-MT": "MT",
|
||||
"nb-NO": "NO",
|
||||
"nl-BE": "BE",
|
||||
"nl-NL": "NL",
|
||||
"nn-NO": "NO",
|
||||
"pl-PL": "PL",
|
||||
"pt-BR": "BR",
|
||||
"pt-PT": "PT",
|
||||
"qu-PE": "PE",
|
||||
"ro-RO": "RO",
|
||||
"sk-SK": "SK",
|
||||
"sl-SI": "SI",
|
||||
"sv-FI": "FI",
|
||||
"sv-SE": "SE",
|
||||
"ta-SG": "SG",
|
||||
"th-TH": "TH",
|
||||
"tr-CY": "CY",
|
||||
"vi-VN": "VN",
|
||||
"zh-HK": "HK",
|
||||
"zh-SG": "SG",
|
||||
"zh-TW": "TW"
|
||||
}
|
||||
},
|
||||
"privacywall videos": {
|
||||
"all_locale": null,
|
||||
"custom": {},
|
||||
"data_type": "traits_v1",
|
||||
"languages": {},
|
||||
"regions": {
|
||||
"bg-BG": "BG",
|
||||
"cs-CZ": "CZ",
|
||||
"da-DK": "DK",
|
||||
"de-AT": "AT",
|
||||
"de-BE": "BE",
|
||||
"de-CH": "CH",
|
||||
"de-DE": "DE",
|
||||
"de-LI": "LI",
|
||||
"de-LU": "LU",
|
||||
"el-CY": "CY",
|
||||
"el-GR": "GR",
|
||||
"en-AU": "AU",
|
||||
"en-CA": "CA",
|
||||
"en-GB": "GB",
|
||||
"en-HK": "HK",
|
||||
"en-IE": "IE",
|
||||
"en-IN": "IN",
|
||||
"en-MT": "MT",
|
||||
"en-NZ": "NZ",
|
||||
"en-PH": "PH",
|
||||
"en-SG": "SG",
|
||||
"en-US": "US",
|
||||
"es-AR": "AR",
|
||||
"es-CL": "CL",
|
||||
"es-CO": "CO",
|
||||
"es-ES": "ES",
|
||||
"es-MX": "MX",
|
||||
"es-PE": "PE",
|
||||
"es-VE": "VE",
|
||||
"et-EE": "EE",
|
||||
"fi-FI": "FI",
|
||||
"fil-PH": "PH",
|
||||
"fr-BE": "BE",
|
||||
"fr-CA": "CA",
|
||||
"fr-CH": "CH",
|
||||
"fr-FR": "FR",
|
||||
"fr-LU": "LU",
|
||||
"ga-IE": "IE",
|
||||
"gsw-CH": "CH",
|
||||
"gsw-LI": "LI",
|
||||
"hi-IN": "IN",
|
||||
"hr-HR": "HR",
|
||||
"hu-HU": "HU",
|
||||
"id-ID": "ID",
|
||||
"it-CH": "CH",
|
||||
"it-IT": "IT",
|
||||
"ja-JP": "JP",
|
||||
"ko-KR": "KR",
|
||||
"lb-LU": "LU",
|
||||
"lt-LT": "LT",
|
||||
"lv-LV": "LV",
|
||||
"mi-NZ": "NZ",
|
||||
"ms-MY": "MY",
|
||||
"ms-SG": "SG",
|
||||
"mt-MT": "MT",
|
||||
"nb-NO": "NO",
|
||||
"nl-BE": "BE",
|
||||
"nl-NL": "NL",
|
||||
"nn-NO": "NO",
|
||||
"pl-PL": "PL",
|
||||
"pt-BR": "BR",
|
||||
"pt-PT": "PT",
|
||||
"qu-PE": "PE",
|
||||
"ro-RO": "RO",
|
||||
"sk-SK": "SK",
|
||||
"sl-SI": "SI",
|
||||
"sv-FI": "FI",
|
||||
"sv-SE": "SE",
|
||||
"ta-SG": "SG",
|
||||
"th-TH": "TH",
|
||||
"tr-CY": "CY",
|
||||
"vi-VN": "VN",
|
||||
"zh-HK": "HK",
|
||||
"zh-SG": "SG",
|
||||
"zh-TW": "TW"
|
||||
}
|
||||
},
|
||||
"qwant": {
|
||||
"all_locale": null,
|
||||
"custom": {},
|
||||
@@ -7355,6 +7424,222 @@
|
||||
},
|
||||
"regions": {}
|
||||
},
|
||||
"resulthunter": {
|
||||
"all_locale": "all",
|
||||
"custom": {
|
||||
"ui_lang": {
|
||||
"az": "az",
|
||||
"bg": "bg",
|
||||
"br": "br",
|
||||
"ca": "ca",
|
||||
"cs": "cs",
|
||||
"cy": "cy",
|
||||
"da": "da",
|
||||
"de-DE": "de-de",
|
||||
"el": "el",
|
||||
"en-CA": "en-ca",
|
||||
"en-GB": "en-gb",
|
||||
"en-IN": "en-in",
|
||||
"en-US": "en-us",
|
||||
"es": "es",
|
||||
"et": "et",
|
||||
"eu": "eu",
|
||||
"fi-FI": "fi-fi",
|
||||
"fr-CA": "fr-ca",
|
||||
"fr-FR": "fr-fr",
|
||||
"gl": "gl",
|
||||
"hr": "hr",
|
||||
"hu": "hu",
|
||||
"id": "id",
|
||||
"it": "it",
|
||||
"ja-JP": "ja-jp",
|
||||
"ka": "ka",
|
||||
"ko": "ko",
|
||||
"lt": "lt",
|
||||
"lv": "lv",
|
||||
"ms": "ms",
|
||||
"nb": "nb",
|
||||
"nl": "nl",
|
||||
"pl": "pl",
|
||||
"pt-BR": "pt-br",
|
||||
"ro": "ro",
|
||||
"ru": "ru",
|
||||
"sk": "sk",
|
||||
"sl": "sl",
|
||||
"sq-AL": "sq-al",
|
||||
"sr": "sr",
|
||||
"sr_Latn": "sr-latn",
|
||||
"sv": "sv",
|
||||
"sw-KE": "sw-ke",
|
||||
"th": "th",
|
||||
"tr": "tr",
|
||||
"uk": "uk",
|
||||
"vi": "vi",
|
||||
"zh": "zh",
|
||||
"zh-TW": "zh-tw"
|
||||
}
|
||||
},
|
||||
"data_type": "traits_v1",
|
||||
"languages": {},
|
||||
"regions": {
|
||||
"ar-SA": "sa",
|
||||
"da-DK": "dk",
|
||||
"de-AT": "at",
|
||||
"de-BE": "be",
|
||||
"de-CH": "ch",
|
||||
"de-DE": "de",
|
||||
"en-AU": "au",
|
||||
"en-CA": "ca",
|
||||
"en-GB": "gb",
|
||||
"en-HK": "hk",
|
||||
"en-IN": "in",
|
||||
"en-NZ": "nz",
|
||||
"en-PH": "ph",
|
||||
"en-US": "us",
|
||||
"en-ZA": "za",
|
||||
"es-AR": "ar",
|
||||
"es-CL": "cl",
|
||||
"es-ES": "es",
|
||||
"es-MX": "mx",
|
||||
"fi-FI": "fi",
|
||||
"fil-PH": "ph",
|
||||
"fr-BE": "be",
|
||||
"fr-CA": "ca",
|
||||
"fr-CH": "ch",
|
||||
"fr-FR": "fr",
|
||||
"gsw-CH": "ch",
|
||||
"hi-IN": "in",
|
||||
"id-ID": "id",
|
||||
"it-CH": "ch",
|
||||
"it-IT": "it",
|
||||
"ja-JP": "jp",
|
||||
"ko-KR": "kr",
|
||||
"mi-NZ": "nz",
|
||||
"ms-MY": "my",
|
||||
"nb-NO": "no",
|
||||
"nl-BE": "be",
|
||||
"nl-NL": "nl",
|
||||
"nn-NO": "no",
|
||||
"pl-PL": "pl",
|
||||
"pt-BR": "br",
|
||||
"pt-PT": "pt",
|
||||
"ru-RU": "ru",
|
||||
"sv-FI": "fi",
|
||||
"sv-SE": "se",
|
||||
"tr-TR": "tr",
|
||||
"zh-CN": "cn",
|
||||
"zh-HK": "hk",
|
||||
"zh-TW": "tw"
|
||||
}
|
||||
},
|
||||
"resulthunter images": {
|
||||
"all_locale": "all",
|
||||
"custom": {
|
||||
"ui_lang": {
|
||||
"az": "az",
|
||||
"bg": "bg",
|
||||
"br": "br",
|
||||
"ca": "ca",
|
||||
"cs": "cs",
|
||||
"cy": "cy",
|
||||
"da": "da",
|
||||
"de-DE": "de-de",
|
||||
"el": "el",
|
||||
"en-CA": "en-ca",
|
||||
"en-GB": "en-gb",
|
||||
"en-IN": "en-in",
|
||||
"en-US": "en-us",
|
||||
"es": "es",
|
||||
"et": "et",
|
||||
"eu": "eu",
|
||||
"fi-FI": "fi-fi",
|
||||
"fr-CA": "fr-ca",
|
||||
"fr-FR": "fr-fr",
|
||||
"gl": "gl",
|
||||
"hr": "hr",
|
||||
"hu": "hu",
|
||||
"id": "id",
|
||||
"it": "it",
|
||||
"ja-JP": "ja-jp",
|
||||
"ka": "ka",
|
||||
"ko": "ko",
|
||||
"lt": "lt",
|
||||
"lv": "lv",
|
||||
"ms": "ms",
|
||||
"nb": "nb",
|
||||
"nl": "nl",
|
||||
"pl": "pl",
|
||||
"pt-BR": "pt-br",
|
||||
"ro": "ro",
|
||||
"ru": "ru",
|
||||
"sk": "sk",
|
||||
"sl": "sl",
|
||||
"sq-AL": "sq-al",
|
||||
"sr": "sr",
|
||||
"sr_Latn": "sr-latn",
|
||||
"sv": "sv",
|
||||
"sw-KE": "sw-ke",
|
||||
"th": "th",
|
||||
"tr": "tr",
|
||||
"uk": "uk",
|
||||
"vi": "vi",
|
||||
"zh": "zh",
|
||||
"zh-TW": "zh-tw"
|
||||
}
|
||||
},
|
||||
"data_type": "traits_v1",
|
||||
"languages": {},
|
||||
"regions": {
|
||||
"ar-SA": "sa",
|
||||
"da-DK": "dk",
|
||||
"de-AT": "at",
|
||||
"de-BE": "be",
|
||||
"de-CH": "ch",
|
||||
"de-DE": "de",
|
||||
"en-AU": "au",
|
||||
"en-CA": "ca",
|
||||
"en-GB": "gb",
|
||||
"en-HK": "hk",
|
||||
"en-IN": "in",
|
||||
"en-NZ": "nz",
|
||||
"en-PH": "ph",
|
||||
"en-US": "us",
|
||||
"en-ZA": "za",
|
||||
"es-AR": "ar",
|
||||
"es-CL": "cl",
|
||||
"es-ES": "es",
|
||||
"es-MX": "mx",
|
||||
"fi-FI": "fi",
|
||||
"fil-PH": "ph",
|
||||
"fr-BE": "be",
|
||||
"fr-CA": "ca",
|
||||
"fr-CH": "ch",
|
||||
"fr-FR": "fr",
|
||||
"gsw-CH": "ch",
|
||||
"hi-IN": "in",
|
||||
"id-ID": "id",
|
||||
"it-CH": "ch",
|
||||
"it-IT": "it",
|
||||
"ja-JP": "jp",
|
||||
"ko-KR": "kr",
|
||||
"mi-NZ": "nz",
|
||||
"ms-MY": "my",
|
||||
"nb-NO": "no",
|
||||
"nl-BE": "be",
|
||||
"nl-NL": "nl",
|
||||
"nn-NO": "no",
|
||||
"pl-PL": "pl",
|
||||
"pt-BR": "br",
|
||||
"pt-PT": "pt",
|
||||
"ru-RU": "ru",
|
||||
"sv-FI": "fi",
|
||||
"sv-SE": "se",
|
||||
"tr-TR": "tr",
|
||||
"zh-CN": "cn",
|
||||
"zh-HK": "hk",
|
||||
"zh-TW": "tw"
|
||||
}
|
||||
},
|
||||
"sepiasearch": {
|
||||
"all_locale": null,
|
||||
"custom": {},
|
||||
|
||||
+4502
-2286
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
],
|
||||
"ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}",
|
||||
"versions": [
|
||||
"150.0",
|
||||
"149.0"
|
||||
"151.0",
|
||||
"150.0"
|
||||
]
|
||||
}
|
||||
+258
-143
@@ -69,11 +69,6 @@
|
||||
"symbol": "pk (US)",
|
||||
"to_si_factor": 0.008809768
|
||||
},
|
||||
"Q101427917": {
|
||||
"si_name": "Q25517",
|
||||
"symbol": "pk (UK)",
|
||||
"to_si_factor": 0.00909218
|
||||
},
|
||||
"Q101428098": {
|
||||
"si_name": "Q44395",
|
||||
"symbol": "dbar",
|
||||
@@ -84,6 +79,11 @@
|
||||
"symbol": "μbar",
|
||||
"to_si_factor": 0.1
|
||||
},
|
||||
"Q101435213": {
|
||||
"si_name": "Q101435195",
|
||||
"symbol": "Jy s",
|
||||
"to_si_factor": 1e-26
|
||||
},
|
||||
"Q101435332": {
|
||||
"si_name": "Q44395",
|
||||
"symbol": "cm Hg",
|
||||
@@ -124,11 +124,6 @@
|
||||
"symbol": "pm²",
|
||||
"to_si_factor": 1e-24
|
||||
},
|
||||
"Q101463679": {
|
||||
"si_name": "Q25343",
|
||||
"symbol": "hm²",
|
||||
"to_si_factor": 10000.0
|
||||
},
|
||||
"Q101464050": {
|
||||
"si_name": "Q25343",
|
||||
"symbol": "Mm²",
|
||||
@@ -199,6 +194,11 @@
|
||||
"symbol": "d⁻¹",
|
||||
"to_si_factor": 1.15741e-05
|
||||
},
|
||||
"Q102129764": {
|
||||
"si_name": "Q6137407",
|
||||
"symbol": "a⁻¹",
|
||||
"to_si_factor": 3.17098e-08
|
||||
},
|
||||
"Q102130673": {
|
||||
"si_name": "Q182429",
|
||||
"symbol": "ym/s",
|
||||
@@ -425,9 +425,9 @@
|
||||
"to_si_factor": 10.0
|
||||
},
|
||||
"Q1042866": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Zib",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.1805916207174113e+21
|
||||
},
|
||||
"Q104317437": {
|
||||
"si_name": "Q25381181",
|
||||
@@ -995,9 +995,9 @@
|
||||
"to_si_factor": 1000000000000.0
|
||||
},
|
||||
"Q106247880": {
|
||||
"si_name": null,
|
||||
"si_name": "Q6137407",
|
||||
"symbol": "digit/s",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q106247940": {
|
||||
"si_name": null,
|
||||
@@ -1504,6 +1504,11 @@
|
||||
"symbol": "m²/(s² K)",
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q106707206": {
|
||||
"si_name": null,
|
||||
"symbol": "HU",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q106707404": {
|
||||
"si_name": "Q106707404",
|
||||
"symbol": "kg m²/(s² K)",
|
||||
@@ -2314,79 +2319,124 @@
|
||||
"symbol": "cm²/(sr erg)",
|
||||
"to_si_factor": 1000.0
|
||||
},
|
||||
"Q107710161": {
|
||||
"si_name": "Q199",
|
||||
"symbol": "J/bit",
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q107821494": {
|
||||
"si_name": null,
|
||||
"si_name": "Q21401573",
|
||||
"symbol": "bit/m³",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q107822428": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11547251",
|
||||
"symbol": "bit/m",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q107824325": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11547252",
|
||||
"symbol": "bit/m²",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q107825143": {
|
||||
"si_name": "Q11547251",
|
||||
"symbol": "Eibit/m",
|
||||
"to_si_factor": 1.152921504606847e+18
|
||||
},
|
||||
"Q107825584": {
|
||||
"si_name": "Q11547252",
|
||||
"symbol": "Eibit/m²",
|
||||
"to_si_factor": 1.152921504606847e+18
|
||||
},
|
||||
"Q107825716": {
|
||||
"si_name": "Q21401573",
|
||||
"symbol": "Eibit/m³",
|
||||
"to_si_factor": 1.152921504606847e+18
|
||||
},
|
||||
"Q107862736": {
|
||||
"si_name": "Q11547251",
|
||||
"symbol": "Gibit/m",
|
||||
"to_si_factor": 1073741824.0
|
||||
},
|
||||
"Q107862746": {
|
||||
"si_name": "Q11547252",
|
||||
"symbol": "Gibit/m²",
|
||||
"to_si_factor": 1073741824.0
|
||||
},
|
||||
"Q107862762": {
|
||||
"si_name": "Q21401573",
|
||||
"symbol": "Gibit/m³",
|
||||
"to_si_factor": 1073741824.0
|
||||
},
|
||||
"Q107862770": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11547251",
|
||||
"symbol": "Kibit/m",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1024.0
|
||||
},
|
||||
"Q107862783": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11547252",
|
||||
"symbol": "Kibit/m",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1024.0
|
||||
},
|
||||
"Q107862850": {
|
||||
"si_name": null,
|
||||
"si_name": "Q21401573",
|
||||
"symbol": "Kibit/m³",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1024.0
|
||||
},
|
||||
"Q107862870": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11547251",
|
||||
"symbol": "Mibit/m",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1048576.0
|
||||
},
|
||||
"Q107862884": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11547252",
|
||||
"symbol": "Mibit/m²",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1048576.0
|
||||
},
|
||||
"Q107862898": {
|
||||
"si_name": null,
|
||||
"si_name": "Q21401573",
|
||||
"symbol": "Mibit/m³",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1048576.0
|
||||
},
|
||||
"Q107970215": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11547251",
|
||||
"symbol": "Pibit/m",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1125899906842624.0
|
||||
},
|
||||
"Q107970224": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11547252",
|
||||
"symbol": "Pibit/m²",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1125899906842624.0
|
||||
},
|
||||
"Q107970230": {
|
||||
"si_name": null,
|
||||
"si_name": "Q21401573",
|
||||
"symbol": "Pibit/m³",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1125899906842624.0
|
||||
},
|
||||
"Q107970235": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11547251",
|
||||
"symbol": "Tibit/m",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1099511627776.0
|
||||
},
|
||||
"Q107970256": {
|
||||
"si_name": null,
|
||||
"si_name": "Q21401573",
|
||||
"symbol": "Tibit/m³",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1099511627776.0
|
||||
},
|
||||
"Q107970266": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11547252",
|
||||
"symbol": "Tibit/m²",
|
||||
"to_si_factor": 1099511627776.0
|
||||
},
|
||||
"Q108112819": {
|
||||
"si_name": null,
|
||||
"symbol": "€/kWh",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q108112891": {
|
||||
"si_name": null,
|
||||
"symbol": "€/(MW h)",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q108270163": {
|
||||
@@ -2395,9 +2445,9 @@
|
||||
"to_si_factor": 3.169e-05
|
||||
},
|
||||
"Q1084321": {
|
||||
"si_name": null,
|
||||
"si_name": "Q6137407",
|
||||
"symbol": "Tb/s",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000000000000.0
|
||||
},
|
||||
"Q108533173": {
|
||||
"si_name": "Q108533173",
|
||||
@@ -2434,6 +2484,16 @@
|
||||
"symbol": "GeV/c²",
|
||||
"to_si_factor": 1.7826619216278976e-27
|
||||
},
|
||||
"Q108913970": {
|
||||
"si_name": null,
|
||||
"symbol": "person/km²",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q108914485": {
|
||||
"si_name": null,
|
||||
"symbol": "person/m²",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q108920356": {
|
||||
"si_name": "Q25406",
|
||||
"symbol": "esu",
|
||||
@@ -2464,6 +2524,11 @@
|
||||
"symbol": "e.u.",
|
||||
"to_si_factor": 4.184
|
||||
},
|
||||
"Q109337616": {
|
||||
"si_name": "Q139710667",
|
||||
"symbol": "1/(100 eV)",
|
||||
"to_si_factor": 6.2415e+16
|
||||
},
|
||||
"Q109448508": {
|
||||
"si_name": null,
|
||||
"symbol": "man-Sv",
|
||||
@@ -2499,6 +2564,11 @@
|
||||
"symbol": "nm²",
|
||||
"to_si_factor": 1e-18
|
||||
},
|
||||
"Q11123": {
|
||||
"si_name": "Q25517",
|
||||
"symbol": "pt (UK)",
|
||||
"to_si_factor": 0.00056826125
|
||||
},
|
||||
"Q111494193": {
|
||||
"si_name": "Q111494193",
|
||||
"symbol": "J/(Hz mol)",
|
||||
@@ -2509,6 +2579,11 @@
|
||||
"symbol": "%",
|
||||
"to_si_factor": 0.01
|
||||
},
|
||||
"Q112659472": {
|
||||
"si_name": null,
|
||||
"symbol": "PVU",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q1131660": {
|
||||
"si_name": "Q11570",
|
||||
"symbol": "st",
|
||||
@@ -2540,14 +2615,14 @@
|
||||
"to_si_factor": 31688087.81402895
|
||||
},
|
||||
"Q1140444": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Zb",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1e+21
|
||||
},
|
||||
"Q1140577": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Yb",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 0.0
|
||||
},
|
||||
"Q114559346": {
|
||||
"si_name": null,
|
||||
@@ -2560,14 +2635,14 @@
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q1152074": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Pb",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000000000000000.0
|
||||
},
|
||||
"Q1152323": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Tb",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000000000000.0
|
||||
},
|
||||
"Q115277430": {
|
||||
"si_name": null,
|
||||
@@ -2810,14 +2885,14 @@
|
||||
"to_si_factor": 4.4482216152605
|
||||
},
|
||||
"Q1194580": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Mib",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1048576.0
|
||||
},
|
||||
"Q1195111": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Eb",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1e+18
|
||||
},
|
||||
"Q1196837": {
|
||||
"si_name": "Q1063756",
|
||||
@@ -2865,15 +2940,20 @@
|
||||
"to_si_factor": 0.03110348
|
||||
},
|
||||
"Q1204894": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Gib",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1073741824.0
|
||||
},
|
||||
"Q12129": {
|
||||
"si_name": "Q11573",
|
||||
"symbol": "pc",
|
||||
"to_si_factor": 3.085677581491367e+16
|
||||
},
|
||||
"Q12145303": {
|
||||
"si_name": "Q11573",
|
||||
"symbol": "rd",
|
||||
"to_si_factor": 5.02921
|
||||
},
|
||||
"Q121965382": {
|
||||
"si_name": "Q121965382",
|
||||
"symbol": "mol/mol",
|
||||
@@ -3114,6 +3194,11 @@
|
||||
"symbol": "QF",
|
||||
"to_si_factor": 1e+30
|
||||
},
|
||||
"Q12558489": {
|
||||
"si_name": "Q25517",
|
||||
"symbol": "pk (UK)",
|
||||
"to_si_factor": 0.00909218
|
||||
},
|
||||
"Q125962250": {
|
||||
"si_name": null,
|
||||
"symbol": "Ry",
|
||||
@@ -3240,14 +3325,14 @@
|
||||
"to_si_factor": 1e-30
|
||||
},
|
||||
"Q131395783": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Rib",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.2379400392853803e+27
|
||||
},
|
||||
"Q131395793": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Qib",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.2676506002282294e+30
|
||||
},
|
||||
"Q13147228": {
|
||||
"si_name": "Q844211",
|
||||
@@ -3309,6 +3394,11 @@
|
||||
"symbol": "1/K",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q133796439": {
|
||||
"si_name": null,
|
||||
"symbol": "T/mm²",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q13400897": {
|
||||
"si_name": "Q1051665",
|
||||
"symbol": "g",
|
||||
@@ -3317,18 +3407,23 @@
|
||||
"Q13479685": {
|
||||
"si_name": "Q44395",
|
||||
"symbol": "mm H2O",
|
||||
"to_si_factor": 9.80638
|
||||
"to_si_factor": 9.80665
|
||||
},
|
||||
"Q1351253": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Eib",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.152921504606847e+18
|
||||
},
|
||||
"Q1351334": {
|
||||
"si_name": null,
|
||||
"symbol": "Pib",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q135373020": {
|
||||
"si_name": null,
|
||||
"symbol": "GTexel",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q135415097": {
|
||||
"si_name": "Q25236",
|
||||
"symbol": "shp",
|
||||
@@ -3380,9 +3475,9 @@
|
||||
"to_si_factor": 1e-06
|
||||
},
|
||||
"Q136039973": {
|
||||
"si_name": null,
|
||||
"si_name": "Q6137407",
|
||||
"symbol": "FPS",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q1361854": {
|
||||
"si_name": "Q11570",
|
||||
@@ -3450,9 +3545,9 @@
|
||||
"to_si_factor": 1000000000000.0
|
||||
},
|
||||
"Q139054848": {
|
||||
"si_name": null,
|
||||
"si_name": "Q117899185",
|
||||
"symbol": "A·h/m²",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 3600.0
|
||||
},
|
||||
"Q139086088": {
|
||||
"si_name": "Q69425409",
|
||||
@@ -3642,7 +3737,7 @@
|
||||
"Q1654435": {
|
||||
"si_name": "Q25250",
|
||||
"symbol": "IRE",
|
||||
"to_si_factor": 0.007
|
||||
"to_si_factor": 0.007143
|
||||
},
|
||||
"Q16673974": {
|
||||
"si_name": null,
|
||||
@@ -3820,9 +3915,9 @@
|
||||
"to_si_factor": 0.01
|
||||
},
|
||||
"Q18434272": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "°Balling",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 0.01
|
||||
},
|
||||
"Q185078": {
|
||||
"si_name": "Q25343",
|
||||
@@ -3850,9 +3945,9 @@
|
||||
"to_si_factor": 1e-21
|
||||
},
|
||||
"Q188768": {
|
||||
"si_name": null,
|
||||
"si_name": "Q6137407",
|
||||
"symbol": "FLOPS",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q190095": {
|
||||
"si_name": "Q190095",
|
||||
@@ -3989,6 +4084,11 @@
|
||||
"symbol": "ppb",
|
||||
"to_si_factor": 1e-09
|
||||
},
|
||||
"Q206037": {
|
||||
"si_name": "Q6137407",
|
||||
"symbol": "r/min",
|
||||
"to_si_factor": 0.0166667
|
||||
},
|
||||
"Q2064166": {
|
||||
"si_name": "Q179836",
|
||||
"symbol": "fc",
|
||||
@@ -4320,9 +4420,9 @@
|
||||
"to_si_factor": 10.0
|
||||
},
|
||||
"Q2243141": {
|
||||
"si_name": null,
|
||||
"si_name": "Q6137407",
|
||||
"symbol": "Gb/s",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000000000.0
|
||||
},
|
||||
"Q2254856": {
|
||||
"si_name": "Q25343",
|
||||
@@ -4335,9 +4435,9 @@
|
||||
"to_si_factor": 0.00508
|
||||
},
|
||||
"Q2269250": {
|
||||
"si_name": null,
|
||||
"si_name": "Q6137407",
|
||||
"symbol": "kb/s",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000.0
|
||||
},
|
||||
"Q2278977": {
|
||||
"si_name": null,
|
||||
@@ -4535,9 +4635,9 @@
|
||||
"to_si_factor": 898755178700.0
|
||||
},
|
||||
"Q25325238": {
|
||||
"si_name": null,
|
||||
"si_name": "Q106919394",
|
||||
"symbol": "bhp/cm³",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 745700000.0
|
||||
},
|
||||
"Q253276": {
|
||||
"si_name": "Q11573",
|
||||
@@ -4545,9 +4645,9 @@
|
||||
"to_si_factor": 1609.344
|
||||
},
|
||||
"Q2533495": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "°P",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 0.01
|
||||
},
|
||||
"Q25343": {
|
||||
"si_name": "Q25343",
|
||||
@@ -4885,9 +4985,9 @@
|
||||
"to_si_factor": 9.80665
|
||||
},
|
||||
"Q28657331": {
|
||||
"si_name": null,
|
||||
"si_name": "Q106688958",
|
||||
"symbol": "erg/(s cm²)",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 0.001
|
||||
},
|
||||
"Q28683485": {
|
||||
"si_name": "Q28683485",
|
||||
@@ -4920,9 +5020,9 @@
|
||||
"to_si_factor": 0.001
|
||||
},
|
||||
"Q29463526": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "hr/yr",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.14155e-06
|
||||
},
|
||||
"Q296936": {
|
||||
"si_name": "Q25269",
|
||||
@@ -5155,9 +5255,9 @@
|
||||
"to_si_factor": 1e-15
|
||||
},
|
||||
"Q3194304": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "kb",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000.0
|
||||
},
|
||||
"Q3196665": {
|
||||
"si_name": "Q215571",
|
||||
@@ -5295,9 +5395,9 @@
|
||||
"to_si_factor": 3517.0
|
||||
},
|
||||
"Q3332814": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Mb",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000000.0
|
||||
},
|
||||
"Q33680": {
|
||||
"si_name": "Q33680",
|
||||
@@ -5390,9 +5490,9 @@
|
||||
"to_si_factor": 3.085677581e+22
|
||||
},
|
||||
"Q3815076": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Kib",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1024.0
|
||||
},
|
||||
"Q3858002": {
|
||||
"si_name": "Q25406",
|
||||
@@ -5410,9 +5510,9 @@
|
||||
"to_si_factor": 0.3048
|
||||
},
|
||||
"Q389062": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Tib",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1099511627776.0
|
||||
},
|
||||
"Q3902688": {
|
||||
"si_name": "Q25517",
|
||||
@@ -5534,6 +5634,11 @@
|
||||
"symbol": "D",
|
||||
"to_si_factor": 3.335640951981521e-30
|
||||
},
|
||||
"Q4063874": {
|
||||
"si_name": "Q21401573",
|
||||
"symbol": "amg",
|
||||
"to_si_factor": 2.6868e+25
|
||||
},
|
||||
"Q4068266": {
|
||||
"si_name": "Q11570",
|
||||
"symbol": "Ʒ",
|
||||
@@ -5640,9 +5745,9 @@
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q474533": {
|
||||
"si_name": null,
|
||||
"si_name": "Q25272",
|
||||
"symbol": "At",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q48013": {
|
||||
"si_name": "Q11570",
|
||||
@@ -5705,14 +5810,14 @@
|
||||
"to_si_factor": 0.01
|
||||
},
|
||||
"Q50094": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Np",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q50098": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "B",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q50190518": {
|
||||
"si_name": "Q25377184",
|
||||
@@ -5755,9 +5860,9 @@
|
||||
"to_si_factor": 1000.0
|
||||
},
|
||||
"Q524410": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11574",
|
||||
"symbol": "Ga",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 3.15576e+16
|
||||
},
|
||||
"Q531": {
|
||||
"si_name": "Q11573",
|
||||
@@ -5765,9 +5870,9 @@
|
||||
"to_si_factor": 9460730472580800.0
|
||||
},
|
||||
"Q5329": {
|
||||
"si_name": null,
|
||||
"si_name": "Q50098",
|
||||
"symbol": "dB",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 0.1
|
||||
},
|
||||
"Q53393488": {
|
||||
"si_name": "Q39369",
|
||||
@@ -6410,9 +6515,9 @@
|
||||
"to_si_factor": 3.4262590996353905
|
||||
},
|
||||
"Q549389": {
|
||||
"si_name": null,
|
||||
"si_name": "Q6137407",
|
||||
"symbol": "b/s",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q550341": {
|
||||
"si_name": "Q550341",
|
||||
@@ -6440,9 +6545,9 @@
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q5558595": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "GFLOPS",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000000000.0
|
||||
},
|
||||
"Q55663153": {
|
||||
"si_name": "Q55663153",
|
||||
@@ -6519,20 +6624,25 @@
|
||||
"symbol": "GtCO2eq",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q57084839": {
|
||||
"si_name": null,
|
||||
"symbol": "gCDE/km",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q57084901": {
|
||||
"si_name": null,
|
||||
"symbol": "KgCO2eq",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q57084921": {
|
||||
"si_name": null,
|
||||
"si_name": "Q11570",
|
||||
"symbol": "gCO2eq",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 0.001
|
||||
},
|
||||
"Q5711255": {
|
||||
"si_name": null,
|
||||
"si_name": "Q25517",
|
||||
"symbol": "aL",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1e-21
|
||||
},
|
||||
"Q5711261": {
|
||||
"si_name": "Q25517",
|
||||
@@ -6674,11 +6784,6 @@
|
||||
"symbol": "in",
|
||||
"to_si_factor": 0.0254
|
||||
},
|
||||
"Q61793198": {
|
||||
"si_name": "Q11573",
|
||||
"symbol": "rd",
|
||||
"to_si_factor": 5.02921
|
||||
},
|
||||
"Q61794766": {
|
||||
"si_name": "Q11573",
|
||||
"symbol": "ch (US survey)",
|
||||
@@ -6710,9 +6815,9 @@
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q61995006": {
|
||||
"si_name": null,
|
||||
"si_name": "Q106682512",
|
||||
"symbol": "KWth",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000.0
|
||||
},
|
||||
"Q61996348": {
|
||||
"si_name": "Q794261",
|
||||
@@ -6755,14 +6860,14 @@
|
||||
"to_si_factor": 1.1574074e-05
|
||||
},
|
||||
"Q64740041": {
|
||||
"si_name": null,
|
||||
"si_name": "Q106688958",
|
||||
"symbol": "kWh/(m² yr)",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 0.000114
|
||||
},
|
||||
"Q64740314": {
|
||||
"si_name": null,
|
||||
"si_name": "Q106688958",
|
||||
"symbol": "kWh/(m² day)",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 41.67
|
||||
},
|
||||
"Q64748817": {
|
||||
"si_name": "Q80374519",
|
||||
@@ -6825,9 +6930,9 @@
|
||||
"to_si_factor": 1016.0469088
|
||||
},
|
||||
"Q66778234": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "TFLOPS",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000000000000.0
|
||||
},
|
||||
"Q66778809": {
|
||||
"si_name": null,
|
||||
@@ -6839,6 +6944,11 @@
|
||||
"symbol": "PFLOPS",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q66778951": {
|
||||
"si_name": null,
|
||||
"symbol": "ZFLOPS",
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q67060736": {
|
||||
"si_name": "Q67060736",
|
||||
"symbol": "W/kg",
|
||||
@@ -7225,9 +7335,9 @@
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q7350781": {
|
||||
"si_name": null,
|
||||
"si_name": "Q6137407",
|
||||
"symbol": "Mb/s",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1000000.0
|
||||
},
|
||||
"Q743895": {
|
||||
"si_name": "Q39369",
|
||||
@@ -7545,9 +7655,9 @@
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q836941": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "°Bx",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 0.01
|
||||
},
|
||||
"Q83853845": {
|
||||
"si_name": "Q83853845",
|
||||
@@ -7599,6 +7709,11 @@
|
||||
"symbol": "hm",
|
||||
"to_si_factor": 100.0
|
||||
},
|
||||
"Q84451486": {
|
||||
"si_name": "Q84451486",
|
||||
"symbol": "K m/W",
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q844976": {
|
||||
"si_name": "Q2844478",
|
||||
"symbol": "Oe",
|
||||
@@ -7630,9 +7745,9 @@
|
||||
"to_si_factor": 1000000000.0
|
||||
},
|
||||
"Q855161": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "Yib",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.2089258196146292e+24
|
||||
},
|
||||
"Q856240": {
|
||||
"si_name": "Q794261",
|
||||
@@ -7659,6 +7774,11 @@
|
||||
"symbol": "abA",
|
||||
"to_si_factor": 10.0
|
||||
},
|
||||
"Q86897783": {
|
||||
"si_name": "Q86897783",
|
||||
"symbol": "Pa² s",
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q87047886": {
|
||||
"si_name": "Q87047886",
|
||||
"symbol": "Pa s/m³",
|
||||
@@ -7680,14 +7800,14 @@
|
||||
"to_si_factor": 1e-12
|
||||
},
|
||||
"Q8799": {
|
||||
"si_name": null,
|
||||
"si_name": "Q199",
|
||||
"symbol": "B",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q8805": {
|
||||
"si_name": null,
|
||||
"si_name": "Q8805",
|
||||
"symbol": "bit",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1.0
|
||||
},
|
||||
"Q88296091": {
|
||||
"si_name": "Q25517",
|
||||
@@ -7714,11 +7834,6 @@
|
||||
"symbol": "bu (UK)",
|
||||
"to_si_factor": 0.03636872
|
||||
},
|
||||
"Q89662131": {
|
||||
"si_name": "Q25517",
|
||||
"symbol": "pt (UK)",
|
||||
"to_si_factor": 0.00056826125
|
||||
},
|
||||
"Q89992008": {
|
||||
"si_name": "Q89992008",
|
||||
"symbol": "F⁻¹",
|
||||
@@ -7745,9 +7860,9 @@
|
||||
"to_si_factor": null
|
||||
},
|
||||
"Q9048643": {
|
||||
"si_name": null,
|
||||
"si_name": "Q25517",
|
||||
"symbol": "nl",
|
||||
"to_si_factor": null
|
||||
"to_si_factor": 1e-12
|
||||
},
|
||||
"Q905912": {
|
||||
"si_name": "Q281096",
|
||||
|
||||
+161
-111
@@ -3,6 +3,7 @@
|
||||
|
||||
- :py:obj:`searx.enginelib.EngineCache`
|
||||
- :py:obj:`searx.enginelib.Engine`
|
||||
- :py:obj:`searx.enginelib.EngineAbout`
|
||||
- :py:obj:`searx.enginelib.traits`
|
||||
|
||||
There is a command line for developer purposes and for deeper analysis. Here is
|
||||
@@ -23,7 +24,7 @@ an example in which the command line is called in the development environment::
|
||||
|
||||
"""
|
||||
|
||||
__all__ = ["EngineCache", "Engine", "ENGINES_CACHE"]
|
||||
__all__ = ["EngineCache", "Engine", "EngineAbout", "ENGINES_CACHE"]
|
||||
|
||||
import typing as t
|
||||
import abc
|
||||
@@ -31,6 +32,7 @@ from collections.abc import Callable
|
||||
import logging
|
||||
import string
|
||||
import typer
|
||||
import msgspec
|
||||
|
||||
from ..cache import ExpireCacheSQLite, ExpireCacheCfg
|
||||
|
||||
@@ -39,7 +41,7 @@ if t.TYPE_CHECKING:
|
||||
from searx.enginelib.traits import EngineTraits
|
||||
from searx.extended_types import SXNG_Response
|
||||
from searx.result_types import EngineResults
|
||||
from searx.search.processors import OfflineParamTypes, OnlineParamTypes
|
||||
from searx.search.processors import OfflineParamTypes, OnlineParamTypes, ProcessorType
|
||||
|
||||
ENGINES_CACHE: ExpireCacheSQLite = ExpireCacheSQLite.build_cache(
|
||||
ExpireCacheCfg(
|
||||
@@ -178,111 +180,7 @@ class EngineCache:
|
||||
return ENGINES_CACHE.secret_hash(name=name)
|
||||
|
||||
|
||||
class Engine(abc.ABC): # pylint: disable=too-few-public-methods
|
||||
"""Class of engine instances build from YAML settings.
|
||||
|
||||
Further documentation see :ref:`general engine configuration`.
|
||||
|
||||
.. hint::
|
||||
|
||||
This class is currently never initialized and only used for type hinting.
|
||||
"""
|
||||
|
||||
logger: logging.Logger
|
||||
|
||||
# Common options in the engine module
|
||||
|
||||
engine_type: str
|
||||
"""Type of the engine (:ref:`searx.search.processors`)"""
|
||||
|
||||
paging: bool
|
||||
"""Engine supports multiple pages."""
|
||||
|
||||
max_page: int = 0
|
||||
"""If the engine supports paging, then this is the value for the last page
|
||||
that is still supported. ``0`` means unlimited numbers of pages."""
|
||||
|
||||
time_range_support: bool
|
||||
"""Engine supports search time range."""
|
||||
|
||||
safesearch: bool
|
||||
"""Engine supports SafeSearch"""
|
||||
|
||||
language_support: bool
|
||||
"""Engine supports languages (locales) search."""
|
||||
|
||||
language: str
|
||||
"""For an engine, when there is ``language: ...`` in the YAML settings the engine
|
||||
does support only this one language:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
- name: google french
|
||||
engine: google
|
||||
language: fr
|
||||
"""
|
||||
|
||||
region: str
|
||||
"""For an engine, when there is ``region: ...`` in the YAML settings the engine
|
||||
does support only this one region::
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
- name: google belgium
|
||||
engine: google
|
||||
region: fr-BE
|
||||
"""
|
||||
|
||||
fetch_traits: "Callable[[EngineTraits, bool], None]"
|
||||
"""Function to to fetch engine's traits from origin."""
|
||||
|
||||
traits: "traits.EngineTraits"
|
||||
"""Traits of the engine."""
|
||||
|
||||
# settings.yml
|
||||
|
||||
categories: list[str]
|
||||
"""Specifies to which :ref:`engine categories` the engine should be added."""
|
||||
|
||||
name: str
|
||||
"""Name that will be used across SearXNG to define this engine. In settings, on
|
||||
the result page .."""
|
||||
|
||||
engine: str
|
||||
"""Name of the python file used to handle requests and responses to and from
|
||||
this search engine (file name from :origin:`searx/engines` without
|
||||
``.py``)."""
|
||||
|
||||
enable_http: bool
|
||||
"""Enable HTTP (by default only HTTPS is enabled)."""
|
||||
|
||||
shortcut: str
|
||||
"""Code used to execute bang requests (``!foo``)"""
|
||||
|
||||
timeout: float
|
||||
"""Specific timeout for search-engine."""
|
||||
|
||||
display_error_messages: bool
|
||||
"""Display error messages on the web UI."""
|
||||
|
||||
proxies: dict[str, dict[str, str]]
|
||||
"""Set proxies for a specific engine (YAML):
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
proxies :
|
||||
http: socks5://proxy:port
|
||||
https: socks5://proxy:port
|
||||
"""
|
||||
|
||||
disabled: bool
|
||||
"""To disable by default the engine, but not deleting it. It will allow the
|
||||
user to manually activate it in the settings."""
|
||||
|
||||
inactive: bool
|
||||
"""Remove the engine from the settings (*disabled & removed*)."""
|
||||
|
||||
about: dict[str, dict[str, str]]
|
||||
class EngineAbout(msgspec.Struct, kw_only=True):
|
||||
"""Additional fields describing the engine.
|
||||
|
||||
.. code:: yaml
|
||||
@@ -296,21 +194,173 @@ class Engine(abc.ABC): # pylint: disable=too-few-public-methods
|
||||
results: HTML
|
||||
"""
|
||||
|
||||
using_tor_proxy: bool
|
||||
# pylint: disable=too-few-public-methods
|
||||
|
||||
website: str = ""
|
||||
"""Official web-site of the origin."""
|
||||
|
||||
wikidata_id: str = ""
|
||||
"""`Wikidata ID <https://www.wikidata.org/wiki/Wikidata:Identifiers>`_"""
|
||||
|
||||
official_api_documentation: str = ""
|
||||
"""URL of the official API (regardless of whether it is used)"""
|
||||
|
||||
use_official_api: bool = False
|
||||
"""SearXNG engine makes use of the official API or not"""
|
||||
require_api_key: bool = False
|
||||
"""API requires a key or not."""
|
||||
|
||||
results: str = ""
|
||||
"""Data format of the source (online-engines: of the response)."""
|
||||
|
||||
description: str = ""
|
||||
"""Brief description of the engine and where it gets its data from.
|
||||
|
||||
This value should only be set as long as no description of the data source
|
||||
is available via a :py:obj:`EngineAbout.wikidata_id`.
|
||||
"""
|
||||
|
||||
language: str = ""
|
||||
"""Deprecated! Migrate your setting from `engine.about.language` to
|
||||
`engine.language`"""
|
||||
|
||||
|
||||
class Engine(abc.ABC): # pylint: disable=too-few-public-methods
|
||||
"""Class of engine instances build from YAML settings.
|
||||
|
||||
Further documentation see :ref:`general engine configuration`.
|
||||
|
||||
The defaults are taken from :py:obj:`searx.engines.ENGINE_DEFAULT_ARGS`.
|
||||
|
||||
.. hint::
|
||||
|
||||
This class is currently never initialized and only used for type hinting.
|
||||
"""
|
||||
|
||||
logger: logging.Logger
|
||||
|
||||
# Common options of the engine module
|
||||
|
||||
engine_type: "ProcessorType" = "online"
|
||||
"""Type of the engine (:ref:`searx.search.processors`)"""
|
||||
|
||||
paging: bool = False
|
||||
"""Engine supports multiple pages."""
|
||||
|
||||
max_page: int = 0
|
||||
"""If the engine supports paging, then this is the value for the last page
|
||||
that is still supported. ``0`` means unlimited numbers of pages."""
|
||||
|
||||
time_range_support: bool = False
|
||||
"""Engine supports search time range."""
|
||||
|
||||
safesearch: bool = False
|
||||
"""Engine supports SafeSearch"""
|
||||
|
||||
language_support: bool = False
|
||||
"""Engine supports languages (locales) search."""
|
||||
|
||||
fetch_traits: "Callable[[EngineTraits, bool], None]"
|
||||
"""Function to to fetch engine's traits from origin."""
|
||||
|
||||
traits: "traits.EngineTraits"
|
||||
"""Traits of the engine."""
|
||||
|
||||
# settings.yml
|
||||
|
||||
name: str
|
||||
"""Name that will be used across SearXNG to define this engine. In settings, on
|
||||
the result page .."""
|
||||
|
||||
engine: str
|
||||
"""Name of the python file used to handle requests and responses to and from
|
||||
this search engine (file name from :origin:`searx/engines` without
|
||||
``.py``)."""
|
||||
|
||||
categories: list[str] = ["general"]
|
||||
"""Specifies to which :ref:`engine categories` the engine should be added."""
|
||||
|
||||
language: str = ""
|
||||
"""If the engine supports only one language, this language is specified here
|
||||
(``en``, ``de``, ``"no"`` or ..); otherwise, the value remains empty. For
|
||||
the YAML configuration: think of the `YAML-Norway problem
|
||||
<https://ruuda.nl/2023/the-yaml-document-from-hell#the-norway-problem>`_
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
- name: google norway
|
||||
engine: google
|
||||
language: "no"
|
||||
|
||||
Depending on ``language_support``, this value has similar but also slightly
|
||||
different meanings.
|
||||
|
||||
- When ``language_support`` is **true**, the map of
|
||||
:py:obj:`traits.EngineTraits.languages` is reduced to the selected
|
||||
language
|
||||
|
||||
- When ``language_support`` is **false**, then the implementation of the
|
||||
engine only supports this one ``language``
|
||||
"""
|
||||
|
||||
region: str = ""
|
||||
"""For an engine, when there is ``region: ...`` in the YAML settings the engine
|
||||
does support only this one region::
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
- name: google belgium
|
||||
engine: google
|
||||
region: fr-BE
|
||||
"""
|
||||
|
||||
enable_http: bool
|
||||
"""Enable HTTP (by default only HTTPS is enabled)."""
|
||||
|
||||
shortcut: str
|
||||
"""Code used to execute bang requests (``!foo``)"""
|
||||
|
||||
timeout: float
|
||||
"""Specific timeout for search-engine."""
|
||||
|
||||
display_error_messages: bool
|
||||
"""Display error messages on the web UI."""
|
||||
|
||||
disabled: bool = False
|
||||
"""To disable by default the engine, but not deleting it. It will allow the
|
||||
user to manually activate it in the settings."""
|
||||
|
||||
inactive: bool = False
|
||||
"""Remove the engine from the settings (*disabled & removed*)."""
|
||||
|
||||
about: EngineAbout = EngineAbout()
|
||||
"""Additional fields describing the engine."""
|
||||
|
||||
using_tor_proxy: bool = False
|
||||
"""Using tor proxy (``true``) or not (``false``) for this engine."""
|
||||
|
||||
send_accept_language_header: bool
|
||||
send_accept_language_header: bool = True
|
||||
"""When this option is activated (default), the language (locale) that is
|
||||
selected by the user is used to build and send a ``Accept-Language`` header
|
||||
in the request to the origin search engine."""
|
||||
|
||||
tokens: list[str]
|
||||
tokens: list[str] = []
|
||||
"""A list of secret tokens to make this engine *private*, more details see
|
||||
:ref:`private engines`."""
|
||||
|
||||
weight: int
|
||||
weight: float = 1.0
|
||||
"""Weighting of the results of this engine (:ref:`weight <settings engines>`)."""
|
||||
|
||||
proxies: dict[str, dict[str, str]]
|
||||
"""Set proxies for a specific engine (YAML):
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
proxies :
|
||||
http: socks5://proxy:port
|
||||
https: socks5://proxy:port
|
||||
"""
|
||||
|
||||
def setup(self, engine_settings: dict[str, t.Any]) -> bool: # pylint: disable=unused-argument
|
||||
"""Dynamic setup of the engine settings.
|
||||
|
||||
|
||||
+14
-11
@@ -142,11 +142,11 @@ class EngineTraits:
|
||||
"""
|
||||
|
||||
if self.data_type == "traits_v1":
|
||||
self._set_traits_v1(engine)
|
||||
self._set_traits_v1(engine) # pyright: ignore[reportArgumentType]
|
||||
else:
|
||||
raise TypeError("engine traits of type %s is unknown" % self.data_type)
|
||||
|
||||
def _set_traits_v1(self, engine: "Engine | types.ModuleType") -> None:
|
||||
def _set_traits_v1(self, engine: "Engine") -> None:
|
||||
# For an engine, when there is `language: ...` in the YAML settings the engine
|
||||
# does support only this one language (region)::
|
||||
#
|
||||
@@ -159,22 +159,25 @@ class EngineTraits:
|
||||
|
||||
_msg = "settings.yml - engine: '%s' / %s: '%s' not supported"
|
||||
|
||||
languages = traits.languages
|
||||
if hasattr(engine, "language"):
|
||||
if engine.language not in languages:
|
||||
if engine.language:
|
||||
if engine.language_support:
|
||||
if not len(traits.languages) > 1:
|
||||
raise ValueError(
|
||||
f"engine {engine.name}: activated language_support with just one or less languages"
|
||||
)
|
||||
if engine.language not in traits.languages:
|
||||
raise ValueError(_msg % (engine.name, "language", engine.language))
|
||||
traits.languages = {engine.language: languages[engine.language]}
|
||||
traits.languages = {engine.language: traits.languages[engine.language]}
|
||||
|
||||
regions = traits.regions
|
||||
if hasattr(engine, "region"):
|
||||
if engine.region not in regions:
|
||||
if engine.region:
|
||||
if engine.region not in traits.regions:
|
||||
raise ValueError(_msg % (engine.name, "region", engine.region))
|
||||
traits.regions = {engine.region: regions[engine.region]}
|
||||
traits.regions = {engine.region: traits.regions[engine.region]}
|
||||
|
||||
engine.language_support = bool(traits.languages or traits.regions)
|
||||
|
||||
# set the copied & modified traits in engine's namespace
|
||||
engine.traits = traits # pyright: ignore[reportAttributeAccessIssue]
|
||||
engine.traits = traits
|
||||
|
||||
|
||||
class EngineTraitsMap(dict[str, EngineTraits]):
|
||||
|
||||
@@ -22,8 +22,8 @@ about = {
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "HTML",
|
||||
"language": "zh",
|
||||
}
|
||||
language = "zh"
|
||||
|
||||
# Engine Configuration
|
||||
categories = ["general"]
|
||||
|
||||
@@ -5,19 +5,19 @@ intended monkey patching of the engine modules.
|
||||
.. attention::
|
||||
|
||||
Monkey-patching modules is a practice from the past that shouldn't be
|
||||
expanded upon. In the long run, there should be an engine class that can be
|
||||
inherited. However, as long as this class doesn't exist, and as long as all
|
||||
engine modules aren't converted to an engine class, these builtin types will
|
||||
still be needed.
|
||||
expanded upon. In the long run, engines should be instances of
|
||||
:py:obj:`searx.enginelib.Engine`. However, as long as long as all engine
|
||||
modules aren't converted to this class, these builtin types will still be
|
||||
needed.
|
||||
"""
|
||||
|
||||
import logging
|
||||
from searx.enginelib import traits as _traits
|
||||
|
||||
logger: logging.Logger
|
||||
supported_languages: str
|
||||
language_aliases: str
|
||||
language_support: bool
|
||||
language: str
|
||||
region: str
|
||||
traits: _traits.EngineTraits
|
||||
|
||||
# from searx.engines.ENGINE_DEFAULT_ARGS
|
||||
|
||||
@@ -12,41 +12,50 @@ import typing as t
|
||||
|
||||
import sys
|
||||
import copy
|
||||
import os
|
||||
from os.path import realpath, dirname
|
||||
import warnings
|
||||
|
||||
import types
|
||||
import inspect
|
||||
import msgspec
|
||||
|
||||
from searx import logger, settings
|
||||
from searx.utils import load_module
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.enginelib import Engine
|
||||
from searx.data import ENGINE_TRAITS
|
||||
from searx.enginelib import Engine, EngineAbout
|
||||
|
||||
logger = logger.getChild('engines')
|
||||
ENGINE_DIR = dirname(realpath(__file__))
|
||||
|
||||
# Defaults for the namespace of an engine module, see load_engine()
|
||||
ENGINE_DEFAULT_ARGS: dict[str, int | str | list[t.Any] | dict[str, t.Any] | bool] = {
|
||||
ENGINE_DEFAULT_ARGS: dict[str, t.Any] = {
|
||||
# Common options in the engine module
|
||||
"engine_type": "online",
|
||||
"paging": False,
|
||||
"max_page": 0,
|
||||
"time_range_support": False,
|
||||
"safesearch": False,
|
||||
"language_support": False,
|
||||
# settings.yml
|
||||
"categories": ["general"],
|
||||
"language": "",
|
||||
"region": "",
|
||||
"enable_http": False,
|
||||
"shortcut": "-",
|
||||
"timeout": settings["outgoing"]["request_timeout"],
|
||||
"display_error_messages": True,
|
||||
"disabled": False,
|
||||
"inactive": False,
|
||||
"about": {},
|
||||
"about": EngineAbout(),
|
||||
"using_tor_proxy": False,
|
||||
"send_accept_language_header": True,
|
||||
"tokens": [],
|
||||
"max_page": 0,
|
||||
"weight": 1.0,
|
||||
}
|
||||
"""Default values that are set in an engine of type *module*, please compare
|
||||
with the class :py:obj:`searx.enginelib.Engine`."""
|
||||
|
||||
# set automatically when an engine does not have any tab category
|
||||
DEFAULT_CATEGORY = 'other'
|
||||
|
||||
@@ -176,14 +185,41 @@ def set_loggers(engine: "Engine|types.ModuleType", engine_name: str):
|
||||
|
||||
|
||||
def update_engine_attributes(engine: "Engine | types.ModuleType", engine_data: dict[str, t.Any]):
|
||||
# pylint: disable=too-many-branches
|
||||
|
||||
# set engine attributes from engine_data
|
||||
kvargs: dict[str, t.Any]
|
||||
if isinstance(engine.about, EngineAbout):
|
||||
kvargs = {**msgspec.to_builtins(engine.about), **engine_data.get("about", {})}
|
||||
else:
|
||||
kvargs = {**engine.about, **engine_data.get("about", {})}
|
||||
|
||||
try:
|
||||
engine.about = EngineAbout(**kvargs)
|
||||
except TypeError as exc:
|
||||
raise TypeError(
|
||||
f"engine '{engine_data['name']}' ({engine_data['engine']}) - in the about section --> {exc}"
|
||||
) from exc
|
||||
|
||||
# warn about deprecated engine settings
|
||||
|
||||
if engine.about.language:
|
||||
if hasattr(engine, "language") and not engine.language:
|
||||
engine.language = engine.about.language
|
||||
warnings.warn(
|
||||
f"engine '{engine_data['name']}' ({engine_data['engine']})"
|
||||
f" - migrate engine.about.language to engine.language!",
|
||||
DeprecationWarning,
|
||||
2,
|
||||
)
|
||||
|
||||
for param_name, param_value in engine_data.items():
|
||||
if param_name == "about":
|
||||
continue
|
||||
if param_name == 'categories':
|
||||
if isinstance(param_value, str):
|
||||
param_value = list(map(str.strip, param_value.split(',')))
|
||||
engine.categories = param_value # type: ignore
|
||||
elif hasattr(engine, 'about') and param_name == 'about':
|
||||
engine.about = {**engine.about, **engine_data['about']} # type: ignore
|
||||
else:
|
||||
setattr(engine, param_name, param_value)
|
||||
|
||||
@@ -192,6 +228,9 @@ def update_engine_attributes(engine: "Engine | types.ModuleType", engine_data: d
|
||||
if not hasattr(engine, arg_name):
|
||||
setattr(engine, arg_name, copy.deepcopy(arg_value))
|
||||
|
||||
if ENGINE_TRAITS.get(engine.name, {}).get("languages") and not engine.language_support:
|
||||
raise ValueError(f"engine '{engine.name}' ({engine_data['engine']}) language_support should be set to True")
|
||||
|
||||
|
||||
def update_attributes_for_tor(engine: "Engine | types.ModuleType"):
|
||||
if using_tor_proxy(engine) and hasattr(engine, 'onion_url'):
|
||||
@@ -278,6 +317,8 @@ def load_engines(engine_list: list[dict[str, t.Any]]):
|
||||
else:
|
||||
# if an engine can't be loaded (if for example the engine is missing
|
||||
# tor or some other requirements) its set to inactive!
|
||||
logger.error("loading engine %s failed: set engine to inactive!", engine_data.get("name", "???"))
|
||||
logger.error(
|
||||
f"(PID {os.getpid()}) loading engine %s failed: set engine to inactive!", engine_data.get("name", "???")
|
||||
)
|
||||
engine_data["inactive"] = True
|
||||
return engines
|
||||
|
||||
@@ -16,12 +16,12 @@ about = {
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "HTML",
|
||||
"language": "zh",
|
||||
}
|
||||
|
||||
# Engine Configuration
|
||||
categories = ["videos"]
|
||||
paging = True
|
||||
language = "zh"
|
||||
|
||||
# Base URL
|
||||
base_url = "https://www.acfun.cn"
|
||||
|
||||
@@ -64,6 +64,7 @@ about: dict[str, t.Any] = {
|
||||
# engine dependent config
|
||||
categories = ["files", "books"]
|
||||
paging: bool = True
|
||||
language_support = True
|
||||
|
||||
# search-url
|
||||
base_url: list[str] | str = []
|
||||
|
||||
@@ -42,8 +42,8 @@ about = {
|
||||
'use_official_api': False,
|
||||
'require_api_key': False,
|
||||
'results': 'HTML',
|
||||
'language': 'it',
|
||||
}
|
||||
language = "it"
|
||||
|
||||
|
||||
def request(query, params):
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""AOL supports WEB, image, and video search. Internally, it uses the Bing
|
||||
index.
|
||||
|
||||
AOL doesn't seem to support setting the language via request parameters, instead
|
||||
the results are based on the URL. For example, there is
|
||||
|
||||
- `search.aol.com <https://search.aol.com>`_ for English results
|
||||
- `suche.aol.de <https://suche.aol.de>`_ for German results
|
||||
|
||||
However, AOL offers its services only in a few regions:
|
||||
|
||||
- en-US: search.aol.com
|
||||
- de-DE: suche.aol.de
|
||||
- fr-FR: recherche.aol.fr
|
||||
- en-GB: search.aol.co.uk
|
||||
- en-CA: search.aol.ca
|
||||
|
||||
In order to still offer sufficient support for language and region, the `search
|
||||
keywords`_ known from Bing, ``language`` and ``loc`` (region), are added to the
|
||||
search term (AOL is basically just a proxy for Bing).
|
||||
|
||||
.. _search keywords:
|
||||
https://support.microsoft.com/en-us/topic/advanced-search-keywords-ea595928-5d63-4a0b-9c6b-0b769865e78a
|
||||
|
||||
"""
|
||||
|
||||
from urllib.parse import urlencode, unquote_plus
|
||||
import typing as t
|
||||
|
||||
from lxml import html
|
||||
from dateutil import parser
|
||||
|
||||
from searx.result_types import EngineResults
|
||||
from searx.utils import eval_xpath_list, eval_xpath, extract_text
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.extended_types import SXNG_Response
|
||||
from searx.search.processors import OnlineParams
|
||||
|
||||
about = {
|
||||
"website": "https://www.aol.com",
|
||||
"wikidata_id": "Q2407",
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "HTML",
|
||||
}
|
||||
|
||||
categories = ["general"]
|
||||
search_type = "search" # supported: search, image, video
|
||||
|
||||
paging = True
|
||||
safesearch = True
|
||||
time_range_support = True
|
||||
results_per_page = 10
|
||||
|
||||
|
||||
base_url = "https://search.aol.com"
|
||||
time_range_map = {"day": "1d", "week": "1w", "month": "1m", "year": "1y"}
|
||||
safesearch_map = {0: "p", 1: "r", 2: "i"}
|
||||
|
||||
|
||||
def init(_):
|
||||
if search_type not in ("search", "image", "video"):
|
||||
raise ValueError(f"unsupported search type {search_type}")
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams") -> None:
|
||||
|
||||
language, region = (params["searxng_locale"].split("-") + [None])[:2]
|
||||
if language and language != "all":
|
||||
query = f"{query} language:{language}"
|
||||
if region:
|
||||
query = f"{query} loc:{region}"
|
||||
|
||||
args: dict[str, str | int | None] = {
|
||||
"q": query,
|
||||
"b": params["pageno"] * results_per_page + 1, # page is 1-indexed
|
||||
"pz": results_per_page,
|
||||
}
|
||||
|
||||
if params["time_range"]:
|
||||
args["fr2"] = "time"
|
||||
args["age"] = params["time_range"]
|
||||
else:
|
||||
args["fr2"] = "sb-top-search"
|
||||
|
||||
params["cookies"]["sB"] = f"vm={safesearch_map[params['safesearch']]}"
|
||||
params["url"] = f"{base_url}/aol/{search_type}?{urlencode(args)}"
|
||||
logger.debug(params)
|
||||
|
||||
|
||||
def _deobfuscate_url(obfuscated_url: str) -> str | None:
|
||||
# URL looks like "https://search.aol.com/click/_ylt=AwjFSDjd;_ylu=JfsdjDFd/RV=2/RE=1774058166/RO=10/RU=https%3a%2f%2fen.wikipedia.org%2fwiki%2fTree/RK=0/RS=BP2CqeMLjscg4n8cTmuddlEQA2I-" # pylint: disable=line-too-long
|
||||
if not obfuscated_url:
|
||||
return None
|
||||
|
||||
for part in obfuscated_url.split("/"):
|
||||
if part.startswith("RU="):
|
||||
return unquote_plus(part[3:])
|
||||
# pattern for de-obfuscating URL not found, fall back to Yahoo's tracking link
|
||||
return obfuscated_url
|
||||
|
||||
|
||||
def _general_results(doc: html.HtmlElement) -> EngineResults:
|
||||
res = EngineResults()
|
||||
|
||||
for result in eval_xpath_list(doc, "//div[@id='web']//ol/li[not(contains(@class, 'first'))]"):
|
||||
obfuscated_url = extract_text(eval_xpath(result, ".//h3/a/@href"))
|
||||
if not obfuscated_url:
|
||||
continue
|
||||
|
||||
url = _deobfuscate_url(obfuscated_url)
|
||||
if not url:
|
||||
continue
|
||||
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=url,
|
||||
title=extract_text(eval_xpath(result, ".//h3/a")) or "",
|
||||
content=extract_text(eval_xpath(result, ".//div[contains(@class, 'compText')]")) or "",
|
||||
thumbnail=extract_text(eval_xpath(result, ".//a[contains(@class, 'thm')]/img/@data-src")) or "",
|
||||
)
|
||||
)
|
||||
return res
|
||||
|
||||
|
||||
def _video_results(doc: html.HtmlElement) -> EngineResults:
|
||||
res = EngineResults()
|
||||
|
||||
for result in eval_xpath_list(doc, "//div[contains(@class, 'results')]//ol/li"):
|
||||
obfuscated_url = extract_text(eval_xpath(result, ".//a/@href"))
|
||||
if not obfuscated_url:
|
||||
continue
|
||||
|
||||
url = _deobfuscate_url(obfuscated_url)
|
||||
if not url:
|
||||
continue
|
||||
|
||||
published_date_raw = extract_text(eval_xpath(result, ".//div[contains(@class, 'v-age')]"))
|
||||
try:
|
||||
published_date = parser.parse(published_date_raw or "")
|
||||
except parser.ParserError:
|
||||
published_date = None
|
||||
|
||||
res.add(
|
||||
res.types.LegacyResult(
|
||||
{
|
||||
"template": "videos.html",
|
||||
"url": url,
|
||||
"title": extract_text(eval_xpath(result, ".//h3")),
|
||||
"content": extract_text(eval_xpath(result, ".//div[contains(@class, 'compText')]")),
|
||||
"thumbnail": extract_text(eval_xpath(result, ".//img[contains(@class, 'thm')]/@src")),
|
||||
"length": extract_text(eval_xpath(result, ".//span[contains(@class, 'v-time')]")),
|
||||
"publishedDate": published_date,
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
def _image_results(doc: html.HtmlElement) -> EngineResults:
|
||||
res = EngineResults()
|
||||
|
||||
for result in eval_xpath_list(doc, "//section[@id='results']//ul/li"):
|
||||
obfuscated_url = extract_text(eval_xpath(result, "./a/@href"))
|
||||
if not obfuscated_url:
|
||||
continue
|
||||
|
||||
url = _deobfuscate_url(obfuscated_url)
|
||||
if not url:
|
||||
continue
|
||||
|
||||
res.add(
|
||||
res.types.LegacyResult(
|
||||
{
|
||||
"template": "images.html",
|
||||
# results don't have an extra URL, only the image source
|
||||
"url": url,
|
||||
"title": extract_text(eval_xpath(result, ".//a/@aria-label")),
|
||||
"thumbnail_src": extract_text(eval_xpath(result, ".//img/@src")),
|
||||
"img_src": url,
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response") -> EngineResults:
|
||||
doc = html.fromstring(resp.text)
|
||||
|
||||
match search_type:
|
||||
case "search":
|
||||
results = _general_results(doc)
|
||||
case "image":
|
||||
results = _image_results(doc)
|
||||
case "video":
|
||||
results = _video_results(doc)
|
||||
case _:
|
||||
raise ValueError("unsupported search type")
|
||||
|
||||
for suggestion in eval_xpath_list(doc, ".//ol[contains(@class, 'searchRightBottom')]//table//a"):
|
||||
results.add(results.types.LegacyResult({"suggestion": extract_text(suggestion)}))
|
||||
|
||||
return results
|
||||
@@ -35,6 +35,7 @@ about = {
|
||||
categories = ["it", "software wikis"]
|
||||
paging = True
|
||||
main_wiki = "wiki.archlinux.org"
|
||||
language_support = True
|
||||
|
||||
|
||||
def request(query, params):
|
||||
|
||||
@@ -54,8 +54,8 @@ about = {
|
||||
"use_official_api": True,
|
||||
"require_api_key": True,
|
||||
"results": "JSON",
|
||||
"language": "en",
|
||||
}
|
||||
language = "en"
|
||||
|
||||
CACHE: EngineCache
|
||||
"""Persistent (SQLite) key/value cache that deletes its values after ``expire``
|
||||
|
||||
@@ -23,8 +23,8 @@ about = {
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
"language": "zh",
|
||||
}
|
||||
language = "zh"
|
||||
|
||||
paging = True
|
||||
categories = []
|
||||
|
||||
@@ -51,11 +51,10 @@ def request(query, params):
|
||||
}
|
||||
|
||||
params["url"] = f"{base_url}?{urlencode(query_params)}"
|
||||
params["headers"]["Referer"] = "https://www.bilibili.com"
|
||||
params["headers"]["Referer"] = "https://www.bilibili.com/"
|
||||
params["headers"]["Accept"] = "application/json, text/javascript, */*; q=0.01"
|
||||
params["cookies"] = cookie
|
||||
|
||||
return params
|
||||
|
||||
|
||||
def response(resp):
|
||||
search_res = resp.json()
|
||||
|
||||
@@ -34,6 +34,7 @@ about = {
|
||||
categories = ["general", "social media"]
|
||||
paging = True
|
||||
time_range_support = True
|
||||
language_support = True
|
||||
|
||||
base_url = "https://boardreader.com"
|
||||
time_range_map = {"day": "1", "week": "7", "month": "30", "year": "365"}
|
||||
|
||||
@@ -13,8 +13,8 @@ about = {
|
||||
'use_official_api': False,
|
||||
'require_api_key': False,
|
||||
'results': 'JSON',
|
||||
'language': 'de',
|
||||
}
|
||||
language = "de"
|
||||
|
||||
paging = True
|
||||
categories = ['general']
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Chatnoir is an open source search engine developed by Webis, a network of
|
||||
researchers from the universities of Weimar, Halle and Leipzig. It supports
|
||||
different different text corpora as indexes, e.g. CommonCrawl. See its
|
||||
`announcement`_ for more information.
|
||||
|
||||
.. _announcement : https://groups.google.com/g/common-crawl/c/3o2dOHpeRxo/m/H2Osqz9dAAAJ
|
||||
"""
|
||||
|
||||
import typing as t
|
||||
|
||||
from searx.exceptions import SearxEngineAPIException
|
||||
from searx.extended_types import SXNG_Response
|
||||
from searx.network import get, post
|
||||
from searx.result_types import EngineResults
|
||||
from searx.utils import html_to_text
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.search.processors import OnlineParams
|
||||
|
||||
about = {
|
||||
"website": "https://www.chatnoir.eu",
|
||||
"official_api_documentation": "https://www.chatnoir.eu/docs/api-general",
|
||||
"use_official_api": True,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
|
||||
base_url = "https://www.chatnoir.eu"
|
||||
categories = ["general"]
|
||||
|
||||
paging = True
|
||||
page_size = 10
|
||||
|
||||
api_key = ""
|
||||
"""You can optionally provide your own API key here. This one will then be used
|
||||
instead of scraping an API key."""
|
||||
|
||||
search_index = "cw22"
|
||||
"""Search index to browse in. See `the API documentation
|
||||
<https://www.chatnoir.eu/docs/api-general>`_ for a full list."""
|
||||
|
||||
|
||||
def _obtain_api_key() -> tuple[str, str, str]:
|
||||
home_resp = get(base_url)
|
||||
if not home_resp.ok:
|
||||
raise SearxEngineAPIException("failed to obtain api key")
|
||||
csrf_token = home_resp.cookies["csrftoken"]
|
||||
|
||||
token_resp = post(
|
||||
"https://www.chatnoir.eu/?init",
|
||||
headers={
|
||||
"Referer": f"{base_url}/",
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
"X-Csrf-Token": csrf_token,
|
||||
},
|
||||
cookies=home_resp.cookies,
|
||||
)
|
||||
if not token_resp.ok:
|
||||
raise SearxEngineAPIException("failed to obtain api key")
|
||||
session_id = token_resp.cookies["sessionid"]
|
||||
scraped_api_key = token_resp.json()["token"]["token"]
|
||||
|
||||
return csrf_token, session_id, scraped_api_key
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams"):
|
||||
if api_key:
|
||||
# use user-provided API key instead of scraping one
|
||||
headers = {
|
||||
"Authorization": f"Bearer {api_key}",
|
||||
}
|
||||
|
||||
params["headers"].update(headers)
|
||||
else:
|
||||
csrf_token, session_id, scraped_api_key = _obtain_api_key()
|
||||
|
||||
headers = {
|
||||
"Authorization": f"Bearer {scraped_api_key}",
|
||||
"X-Csrf-Token": csrf_token,
|
||||
}
|
||||
|
||||
params["headers"].update(headers)
|
||||
params["cookies"] = {"csrftoken": session_id, "sessionid": session_id}
|
||||
|
||||
params["url"] = f"{base_url}/api/v1/_search"
|
||||
params["method"] = "POST"
|
||||
|
||||
json_data = {
|
||||
"query": query,
|
||||
"index": [
|
||||
search_index,
|
||||
],
|
||||
"from": (params["pageno"] - 1) * page_size,
|
||||
"size": page_size,
|
||||
"_extended_meta": True,
|
||||
}
|
||||
params["json"] = json_data
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response") -> EngineResults:
|
||||
res = EngineResults()
|
||||
|
||||
results = resp.json()["results"]
|
||||
|
||||
for result in results:
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=result["target_uri"],
|
||||
title=html_to_text(result["title"]),
|
||||
content=html_to_text(result["snippet"]),
|
||||
)
|
||||
)
|
||||
|
||||
return res
|
||||
@@ -10,8 +10,8 @@ about = {
|
||||
'use_official_api': False,
|
||||
'require_api_key': False,
|
||||
'results': 'JSON',
|
||||
'language': 'de',
|
||||
}
|
||||
language = "de"
|
||||
|
||||
paging = True
|
||||
categories = []
|
||||
|
||||
@@ -70,13 +70,13 @@ about = {
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
"language": "zh",
|
||||
}
|
||||
|
||||
paging = True
|
||||
time_range_support = True
|
||||
results_per_page = 10
|
||||
categories = []
|
||||
language = "zh"
|
||||
|
||||
ChinasoCategoryType = t.Literal['news', 'videos', 'images']
|
||||
"""ChinaSo supports news, videos, images search.
|
||||
@@ -156,6 +156,13 @@ def response(resp):
|
||||
except Exception as e:
|
||||
raise SearxEngineAPIException(f"Invalid response: {e}") from e
|
||||
|
||||
# Upstream returns {'status': 0, 'msg': 'empty result', 'data': {}} when there
|
||||
# are no results; this is a valid empty result rather than an API error.
|
||||
if not isinstance(data, dict) or "data" not in data:
|
||||
raise SearxEngineAPIException("Invalid response")
|
||||
if not data["data"]:
|
||||
return []
|
||||
|
||||
parsers = {'news': parse_news, 'images': parse_images, 'videos': parse_videos}
|
||||
|
||||
return parsers[chinaso_category](data)
|
||||
|
||||
@@ -40,6 +40,7 @@ categories = ["videos"]
|
||||
paging = True
|
||||
page_size = 10
|
||||
|
||||
language_support = True
|
||||
time_range_support = True
|
||||
time_delta_dict = {
|
||||
"day": timedelta(days=1),
|
||||
|
||||
@@ -24,7 +24,7 @@ import typing as t
|
||||
import json
|
||||
|
||||
from searx.result_types import EngineResults
|
||||
from searx.enginelib import EngineCache
|
||||
from searx.enginelib import EngineCache, EngineAbout
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.search.processors import RequestParams
|
||||
@@ -35,13 +35,11 @@ categories = ["general"]
|
||||
disabled = True
|
||||
timeout = 2.0
|
||||
|
||||
about = {
|
||||
"wikidata_id": None,
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
language = "en"
|
||||
about = EngineAbout(
|
||||
results="JSON",
|
||||
description="Demo offline engine Engine with results in the English language.",
|
||||
)
|
||||
|
||||
# if there is a need for globals, use a leading underline
|
||||
_my_offline_engine: str = ""
|
||||
|
||||
@@ -25,6 +25,7 @@ import typing as t
|
||||
|
||||
from urllib.parse import urlencode
|
||||
from searx.result_types import EngineResults
|
||||
from searx.enginelib import EngineAbout
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.extended_types import SXNG_Response
|
||||
@@ -43,14 +44,14 @@ page_size = 20
|
||||
search_api = "https://api.artic.edu/api/v1/artworks/search"
|
||||
image_api = "https://www.artic.edu/iiif/2/"
|
||||
|
||||
about = {
|
||||
"website": "https://www.artic.edu",
|
||||
"wikidata_id": "Q239303",
|
||||
"official_api_documentation": "http://api.artic.edu/docs/",
|
||||
"use_official_api": True,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
about = EngineAbout(
|
||||
website="https://www.artic.edu",
|
||||
wikidata_id="Q239303",
|
||||
official_api_documentation="http://api.artic.edu/docs/",
|
||||
use_official_api=True,
|
||||
require_api_key=False,
|
||||
results="JSON",
|
||||
)
|
||||
|
||||
|
||||
# if there is a need for globals, use a leading underline
|
||||
|
||||
@@ -11,8 +11,8 @@ about = {
|
||||
'use_official_api': False,
|
||||
'require_api_key': False,
|
||||
'results': 'HTML',
|
||||
'language': 'de',
|
||||
}
|
||||
language = "de"
|
||||
|
||||
categories = []
|
||||
paging = True
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Dogpile is a metasearch engine by the American advertising company `System1`_.
|
||||
|
||||
.. _System1: https://system1.com/
|
||||
"""
|
||||
|
||||
import typing as t
|
||||
from datetime import datetime, timezone
|
||||
import html
|
||||
|
||||
from searx.utils import format_duration, html_to_text, humanize_number
|
||||
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://www.dogpile.com",
|
||||
"wikidata_id": "Q3595363",
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
|
||||
paging = True
|
||||
safesearch = True
|
||||
|
||||
categories = ["general"]
|
||||
dogpile_categ = "search"
|
||||
"""Category to search in. Can be either "search", "images", "videos" or "news"."""
|
||||
|
||||
|
||||
base_url = "https://www.dogpile.com"
|
||||
safe_search_map = {0: "none", 1: "moderate", 2: "heavy"}
|
||||
|
||||
|
||||
def init(_):
|
||||
if dogpile_categ not in ("search", "images", "videos", "news"):
|
||||
raise ValueError("invalid search type: %s" % dogpile_categ)
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams"):
|
||||
params["url"] = f"{base_url}/api/{dogpile_categ}"
|
||||
params["method"] = "POST"
|
||||
params["json"] = {"q": query, "qadf": safe_search_map[params["safesearch"]], "page": params["pageno"]}
|
||||
return params
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response"):
|
||||
res = EngineResults()
|
||||
|
||||
json_resp = resp.json()
|
||||
|
||||
for result in json_resp["results"]:
|
||||
if dogpile_categ == "search":
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=result["clickUrl"],
|
||||
title=html_to_text(result["title"]),
|
||||
content=html_to_text(result["description"]),
|
||||
)
|
||||
)
|
||||
elif dogpile_categ == "news":
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=result["clickUrl"],
|
||||
title=html_to_text(html.unescape(result["title"])),
|
||||
content=html_to_text(html.unescape(result["description"])),
|
||||
thumbnail=result["thumbnailUrl"],
|
||||
publishedDate=datetime.fromtimestamp(result["date"], tz=timezone.utc),
|
||||
)
|
||||
)
|
||||
elif dogpile_categ == "videos":
|
||||
res.add(
|
||||
res.types.LegacyResult(
|
||||
template="videos.html",
|
||||
url=result["clickUrl"],
|
||||
title=html_to_text(result["title"]),
|
||||
content=html_to_text(result["description"]),
|
||||
thumbnail=result["thumbnailUrl"],
|
||||
publishedDate=datetime.fromisoformat(result["publishDate"]),
|
||||
length=format_duration(result["duration"]),
|
||||
views=humanize_number(result["viewCount"]),
|
||||
)
|
||||
)
|
||||
elif dogpile_categ == "images":
|
||||
res.add(
|
||||
res.types.Image(
|
||||
url=result["altClickUrl"],
|
||||
title=html_to_text(result["title"]),
|
||||
content=html_to_text(result["description"]),
|
||||
img_src=result["clickUrl"],
|
||||
thumbnail_src=result["thumbnailUrl"],
|
||||
resolution=f"{result['width']}x{result['height']}",
|
||||
img_format=result["format"],
|
||||
)
|
||||
)
|
||||
|
||||
return res
|
||||
@@ -203,6 +203,7 @@ about: dict[str, str | bool] = {
|
||||
categories: list[str] = ["general", "web"]
|
||||
paging: bool = True
|
||||
time_range_support: bool = True
|
||||
language_support = True
|
||||
safesearch: bool = True
|
||||
"""DDG-lite: user can't select but the results are filtered."""
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ about = {
|
||||
"require_api_key": False,
|
||||
"results": "JSON (site requires js to get images)",
|
||||
}
|
||||
language_support = True
|
||||
|
||||
# engine dependent config
|
||||
categories = []
|
||||
@@ -41,7 +42,9 @@ safesearch_cookies = {0: "-2", 1: None, 2: "1"}
|
||||
safesearch_args = {0: "1", 1: None, 2: "1"}
|
||||
|
||||
search_path_map = {"images": "i", "videos": "v", "news": "news"}
|
||||
|
||||
_HTTP_User_Agent: str = gen_useragent()
|
||||
send_accept_language_header = False
|
||||
|
||||
|
||||
def init(engine_settings: dict[str, t.Any]):
|
||||
|
||||
@@ -26,6 +26,7 @@ about = {
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
language_support = True
|
||||
|
||||
# engine dependent config
|
||||
categories = ["weather"]
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""DuckDuckGo Web (general)
|
||||
|
||||
This implementation fetches the link to the first API page
|
||||
(i.e. ``links.duckduckgo.com/d.js?...``) from duckduckgo.com and uses the ``n``
|
||||
parameter of the API to fetch all subsequent pages.
|
||||
|
||||
This also means that it's not possible to immediately search for the third
|
||||
page - the first and the second page would need to be loaded first.
|
||||
|
||||
The reason why we can't just normally use the `vqd` value is that the API URLs
|
||||
require an additional parameter `dp` which seems generated at server-side, so we
|
||||
can't build it ourselves and must scrape it from the HTML pages.
|
||||
"""
|
||||
|
||||
import typing as t
|
||||
|
||||
from urllib.parse import quote_plus
|
||||
from lxml import html
|
||||
|
||||
from searx.utils import html_to_text, gen_useragent, extract_text, eval_xpath
|
||||
from searx.result_types import EngineResults
|
||||
from searx.enginelib import EngineCache
|
||||
from searx.network import get
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.extended_types import SXNG_Response
|
||||
from searx.search.processors import OnlineParams
|
||||
|
||||
about = {
|
||||
"website": "https://duckduckgo.com/",
|
||||
"wikidata_id": "Q12805",
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
|
||||
# engine dependent config
|
||||
categories = ["general"]
|
||||
paging = True
|
||||
_HTTP_User_Agent: str = gen_useragent()
|
||||
|
||||
base_url = "https://duckduckgo.com"
|
||||
|
||||
CACHE: EngineCache
|
||||
"""Cache to store the API URLs for combinations of (query, page)."""
|
||||
|
||||
|
||||
def setup(engine_settings: dict[str, str]):
|
||||
global CACHE # pylint:disable=global-statement
|
||||
CACHE = EngineCache(engine_settings["name"])
|
||||
return CACHE
|
||||
|
||||
|
||||
def _fetch_first_page_link(
|
||||
query: str,
|
||||
headers: dict[str, str],
|
||||
):
|
||||
"""Search for a::
|
||||
|
||||
<link id="deep_preload_link" rel="preload" as="script"
|
||||
href="https://links.duckduckgo.com/d.js?q=rust&t=D&l=us-en&s=0&a=h_&ct=DE&vqd=VQD_VALUE&bing_market=en-US&p_ent=&ex=-1&dp=LONG_TOKEN
|
||||
>
|
||||
|
||||
This points to the first page
|
||||
""" # pylint:disable=line-too-long
|
||||
|
||||
cache_key = _cache_key(query, 1)
|
||||
cached: str | None = CACHE.get(cache_key)
|
||||
if cached:
|
||||
return cached
|
||||
|
||||
resp = get(
|
||||
url=f"{base_url}/?q={quote_plus(query)}&t=h_&ia=web",
|
||||
headers=headers,
|
||||
timeout=2,
|
||||
)
|
||||
|
||||
if resp.status_code != 200:
|
||||
logger.error("vqd: got HTTP %s from duckduckgo.com", resp.status_code)
|
||||
|
||||
dom = html.fromstring(resp.text)
|
||||
first_page_link = extract_text(eval_xpath(dom, "//link[@id='deep_preload_link']/@href"))
|
||||
|
||||
if not first_page_link:
|
||||
logger.error("vqd: failed to load first page JS url from ddg response (return empty string)")
|
||||
return ""
|
||||
|
||||
logger.debug("got link to first page from duckduckgo.com request: '%s'", first_page_link)
|
||||
CACHE.set(cache_key, first_page_link, expire=7200)
|
||||
|
||||
return first_page_link
|
||||
|
||||
|
||||
def _cache_key(query: str, pageno: int) -> str:
|
||||
return f"nextpage_url|{query}|{pageno}"
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams") -> None:
|
||||
|
||||
if len(query) >= 500:
|
||||
# DDG does not accept queries with more than 499 chars
|
||||
params["url"] = None
|
||||
return
|
||||
|
||||
headers = params["headers"]
|
||||
|
||||
# The vqd value is generated from the query and the UA header. To be able
|
||||
# to reuse the vqd value, the UA header must be static.
|
||||
headers["User-Agent"] = _HTTP_User_Agent
|
||||
headers["Accept"] = "*/*"
|
||||
headers["Referer"] = f"{base_url}/"
|
||||
headers["Host"] = "duckduckgo.com"
|
||||
|
||||
# Sec-Fetch headers are required to not get blocked when sending a Firefox user agent
|
||||
headers["Sec-Fetch-Dest"] = "script"
|
||||
headers["Sec-Fetch-Mode"] = "no-cors"
|
||||
headers["Sec-Fetch-Site"] = "same-site"
|
||||
|
||||
api_url = ""
|
||||
if params["pageno"] > 1:
|
||||
api_url = CACHE.get(_cache_key(query, params["pageno"]))
|
||||
else:
|
||||
api_url = _fetch_first_page_link(query, headers)
|
||||
|
||||
if not api_url:
|
||||
params["url"] = None
|
||||
return
|
||||
|
||||
params["url"] = api_url.replace("/d.js?", "/d.js?o=json&")
|
||||
|
||||
# TODO: support safesearch, timerange and engine traits # pylint:disable=fixme
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response"):
|
||||
res = EngineResults()
|
||||
res_json = resp.json()
|
||||
|
||||
for result in res_json["results"]:
|
||||
if "u" not in result:
|
||||
continue
|
||||
|
||||
res.add(
|
||||
res.types.MainResult(url=result["u"], title=html_to_text(result["t"]), content=html_to_text(result["a"]))
|
||||
)
|
||||
|
||||
# link to next page
|
||||
next_page_path = res_json["results"][-1].get("n")
|
||||
if next_page_path:
|
||||
CACHE.set(
|
||||
_cache_key(resp.search_params["query"], resp.search_params["pageno"] + 1),
|
||||
base_url + next_page_path,
|
||||
expire=60 * 60,
|
||||
)
|
||||
|
||||
return res
|
||||
@@ -14,8 +14,8 @@ about = {
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": 'HTML',
|
||||
"language": 'de',
|
||||
}
|
||||
language = "de"
|
||||
|
||||
categories = ['dictionaries']
|
||||
paging = True
|
||||
|
||||
@@ -55,7 +55,7 @@ about = {
|
||||
'official_api_documentation': 'https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html',
|
||||
'use_official_api': True,
|
||||
'require_api_key': False,
|
||||
'format': 'JSON',
|
||||
"results": "JSON",
|
||||
}
|
||||
|
||||
base_url = 'http://localhost:9200'
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""FindFiles.net_ is a Germany-based file search engine.
|
||||
|
||||
FindFiles.net_ is a specialized file search engine designed to help you search
|
||||
files online with precision. Unlike traditional search engines that mainly index
|
||||
web pages, FindFiles focuses on finding real files on the internet - including
|
||||
PDFs, documents, archives, videos, datasets, and more.
|
||||
|
||||
.. _FindFiles.net: https://findfiles.net
|
||||
"""
|
||||
|
||||
from os.path import basename
|
||||
from urllib.parse import urlencode
|
||||
import typing as t
|
||||
|
||||
from lxml import html
|
||||
|
||||
from searx.result_types import EngineResults
|
||||
from searx.utils import extract_text, eval_xpath, eval_xpath_list
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from extended_types import SXNG_Response
|
||||
from search.processors import OnlineParams
|
||||
|
||||
about = {
|
||||
"website": "https://findfiles.net",
|
||||
"wikidata_id": None,
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "HTML",
|
||||
}
|
||||
|
||||
base_url = "https://findfiles.net"
|
||||
categories = ["files"]
|
||||
paging = True
|
||||
safeserach = True
|
||||
|
||||
safesearch_map = {
|
||||
0: "contentguard.off",
|
||||
1: "contentguard.moderate",
|
||||
2: "contentguard.strict",
|
||||
}
|
||||
|
||||
FindFilesCategory = t.Literal[
|
||||
"all",
|
||||
"document",
|
||||
"text",
|
||||
"image",
|
||||
"audio",
|
||||
"video",
|
||||
]
|
||||
FINDFILES_CATEGORIES = t.get_args(FindFilesCategory)
|
||||
|
||||
findfiles_categ: FindFilesCategory = "all"
|
||||
"""Category to search in."""
|
||||
|
||||
|
||||
def setup(_: dict[str, t.Any]) -> bool:
|
||||
if findfiles_categ not in FINDFILES_CATEGORIES:
|
||||
raise ValueError("invalid category: %s" % findfiles_categ)
|
||||
return True
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams") -> None:
|
||||
args = {
|
||||
"query": query,
|
||||
"contentguard": safesearch_map[params["safesearch"]],
|
||||
"page": params["pageno"],
|
||||
}
|
||||
# the language in the path doesn't change anything about the results, it
|
||||
# only changes the UI
|
||||
params["url"] = f"{base_url}/en/serp/{findfiles_categ}/?{urlencode(args)}"
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response") -> EngineResults:
|
||||
res = EngineResults()
|
||||
|
||||
dom = html.fromstring(resp.text)
|
||||
if findfiles_categ == "image":
|
||||
for result in eval_xpath_list(
|
||||
dom, "//div[contains(@class, 'image-mosaic')]/div[contains(@class, 'image-item')]"
|
||||
):
|
||||
res.add(
|
||||
res.types.Image(
|
||||
url=extract_text(eval_xpath(result, ".//div[contains(@class, 'caption')]/a/@href")) or "",
|
||||
title=extract_text(eval_xpath(result, ".//div[contains(@class, 'caption')]/a")) or "",
|
||||
thumbnail_src=extract_text(eval_xpath(result, ".//img/@src")) or "",
|
||||
)
|
||||
)
|
||||
elif findfiles_categ == "video":
|
||||
for result in eval_xpath_list(
|
||||
dom, "//div[contains(@class, 'video-mosaic')]/div[contains(@class, 'video-item')]"
|
||||
):
|
||||
video_src = extract_text(eval_xpath(result, ".//video/@src")) or ""
|
||||
res.add(
|
||||
res.types.LegacyResult(
|
||||
template="videos.html",
|
||||
url=video_src,
|
||||
title=extract_text(eval_xpath(result, ".//div[contains(@class, 'caption')]/span")) or "",
|
||||
iframe_src=video_src or "",
|
||||
)
|
||||
)
|
||||
else:
|
||||
for result in eval_xpath_list(dom, "//ol/li[contains(@class, 'result-item')]/article"):
|
||||
filename = basename(extract_text(eval_xpath(result, ".//h3")) or "")
|
||||
res.add(
|
||||
res.types.File(
|
||||
url=extract_text(eval_xpath(result, ".//h3/a/@href")) or "",
|
||||
title=filename,
|
||||
content=" ".join(extract_text(el) or "" for el in eval_xpath_list(result, "./div/span")),
|
||||
filename=filename,
|
||||
size=extract_text(eval_xpath(result, "(.//span[@id])[1]")) or "",
|
||||
embedded=extract_text(eval_xpath(result, ".//audio/@src")) or "",
|
||||
)
|
||||
)
|
||||
|
||||
return res
|
||||
@@ -0,0 +1,169 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Fireball_ is a Germany-based, privacy-focused search engine.
|
||||
|
||||
It likely doesn't have its own index, but it's unclear where its results come
|
||||
from.
|
||||
|
||||
.. _Fireball: https://fireball.com
|
||||
"""
|
||||
|
||||
import typing as t
|
||||
|
||||
from datetime import datetime
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from searx.enginelib import EngineCache
|
||||
from searx.exceptions import SearxEngineAPIException
|
||||
from searx.extended_types import SXNG_Response
|
||||
|
||||
from searx.result_types import EngineResults
|
||||
from searx.network import post
|
||||
from searx.utils import html_to_text
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.search.processors import OnlineParams
|
||||
|
||||
about = {
|
||||
"website": "https://fireball.com",
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
|
||||
base_url = "https://fireball.com"
|
||||
categories = ["general"]
|
||||
fireball_category = "web" # values: "web", "news", "videos"
|
||||
|
||||
paging = False
|
||||
safesearch = True
|
||||
|
||||
safe_search_map = {0: "off", 1: "moderate", 2: "strict"}
|
||||
|
||||
CACHE: EngineCache
|
||||
"""Cache to store the settings cookie (contains e.g. language, safesearch, ...)."""
|
||||
|
||||
CACHE_VALID_DURATION = 30 * 24 * 3600 # one month, same as website
|
||||
"""Duration how long settings cookies are valid."""
|
||||
|
||||
|
||||
def init(engine_settings: dict[str, t.Any]):
|
||||
global CACHE # pylint: disable=global-statement
|
||||
CACHE = EngineCache(engine_settings["name"])
|
||||
|
||||
if fireball_category not in ("web", "news", "videos"):
|
||||
raise ValueError(f"Unsupported category: {fireball_category}")
|
||||
|
||||
|
||||
def _cache_key(fireball_settings: dict[str, str]) -> str:
|
||||
return f"fireball_settings_{fireball_settings['safesearch']}_{fireball_settings['market']}"
|
||||
|
||||
|
||||
def _get_search_settings_cookie(params: 'OnlineParams') -> str:
|
||||
"""Get a 'fireball' cookie for the given locale and safesearch setting set
|
||||
in params."""
|
||||
|
||||
# the language is set by only specifying the search country on their
|
||||
# website, they only list DE and US, but in fact it supports much more
|
||||
# countries
|
||||
country = "US"
|
||||
if params["searxng_locale"] != "all":
|
||||
language_parts = params["searxng_locale"].split("-")
|
||||
country = language_parts[-1].upper()
|
||||
|
||||
fireball_settings = {
|
||||
"action": "save",
|
||||
"language": "en", # language is irrelevant, only changes UI language
|
||||
"market": country,
|
||||
"adprovider": "automatic",
|
||||
"target": "_blank",
|
||||
"tiles": "on",
|
||||
"safesearch": safe_search_map[params["safesearch"]],
|
||||
}
|
||||
cache_key = _cache_key(fireball_settings)
|
||||
|
||||
cached_cookie = CACHE.get(cache_key)
|
||||
if cached_cookie:
|
||||
return cached_cookie
|
||||
|
||||
resp = post("https://fireball.com/settings", data=fireball_settings)
|
||||
if not resp.ok:
|
||||
raise SearxEngineAPIException("failed to obtain cookie for settings")
|
||||
|
||||
cookie = resp.cookies.get("fireball")
|
||||
if not cookie:
|
||||
raise SearxEngineAPIException("failed to obtain cookie for settings")
|
||||
|
||||
CACHE.set(cache_key, cookie, expire=CACHE_VALID_DURATION)
|
||||
return cookie
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams"):
|
||||
# no matter the category, the request is always the same, i.e. we get all
|
||||
# different categories with one HTTP request
|
||||
|
||||
args = {
|
||||
"f": "web",
|
||||
"q": query,
|
||||
}
|
||||
|
||||
params["url"] = f"{base_url}/getResults/?{urlencode(args)}"
|
||||
params["cookies"]["fireball"] = _get_search_settings_cookie(params)
|
||||
|
||||
# referer header has to be set, otherwise the requests get blocked
|
||||
params["headers"]["Referer"] = f"{base_url}/search?{urlencode(args)}"
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response") -> EngineResults:
|
||||
res = EngineResults()
|
||||
|
||||
json_data = resp.json()
|
||||
|
||||
for result in json_data.get(fireball_category, {}).get("results", []):
|
||||
published_date = None
|
||||
if result.get("page_age"):
|
||||
published_date = datetime.fromisoformat(result["page_age"])
|
||||
|
||||
if fireball_category == "web":
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=result["url"],
|
||||
title=html_to_text(result["title"]),
|
||||
content=html_to_text(result["description"]),
|
||||
publishedDate=published_date,
|
||||
)
|
||||
)
|
||||
elif fireball_category == "news":
|
||||
thumbnail: str | None = None
|
||||
if result.get("thumbnail"):
|
||||
thumbnail = result["thumbnail"]["src"]
|
||||
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=result["url"],
|
||||
title=html_to_text(result["title"]),
|
||||
content=html_to_text(result["description"]),
|
||||
thumbnail=thumbnail or "",
|
||||
publishedDate=published_date,
|
||||
)
|
||||
)
|
||||
elif fireball_category == "videos":
|
||||
length = None
|
||||
if result.get("video"):
|
||||
length = result["video"].get("duration")
|
||||
|
||||
res.add(
|
||||
res.types.LegacyResult(
|
||||
{
|
||||
"template": "videos.html",
|
||||
"url": result["url"],
|
||||
"title": html_to_text(result["title"]),
|
||||
"content": html_to_text(result["description"]),
|
||||
"thumbnail": result.get("thumbnail", {}).get("original"),
|
||||
"length": length,
|
||||
"publishedDate": published_date,
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
return res
|
||||
+11
-10
@@ -53,17 +53,18 @@ def response(resp: "SXNG_Response"):
|
||||
|
||||
result: dict[str, str] # TBH: dict[str, t.Any]
|
||||
for result in resp.json()["items"]:
|
||||
tags = [
|
||||
tag_info["tag"] for tag_info in result["tags"] if tag_info["tag"] # pyright: ignore[reportArgumentType]
|
||||
]
|
||||
res.add(
|
||||
res.types.LegacyResult(
|
||||
{
|
||||
"template": "images.html",
|
||||
"url": _fix_url(result["slug"]),
|
||||
"thumbnail_src": _fix_url(result["png"]),
|
||||
"img_src": _fix_url(result["png512"]),
|
||||
"title": result["name"],
|
||||
"content": ", ".join([tag["tag"] for tag in result["tags"]]), # pyright: ignore[reportArgumentType]
|
||||
"author": result["team_name"],
|
||||
}
|
||||
res.types.Image(
|
||||
title=result["name"],
|
||||
content=", ".join(tags),
|
||||
url=_fix_url(result["slug"]),
|
||||
thumbnail_src=_fix_url(result["png"]),
|
||||
img_src=_fix_url(result["png512"]),
|
||||
img_format="PNG",
|
||||
author=result["team_name"],
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ about = {
|
||||
'official_api_documentation': None,
|
||||
'require_api_key': False,
|
||||
'results': 'HTML',
|
||||
'language': 'de',
|
||||
}
|
||||
language = "de"
|
||||
paging = True
|
||||
categories = ['shopping']
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Giphy (images)"""
|
||||
|
||||
import random
|
||||
from urllib.parse import urlencode
|
||||
import re
|
||||
|
||||
import typing as t
|
||||
|
||||
from lxml import html
|
||||
|
||||
from searx.enginelib import EngineCache
|
||||
from searx.exceptions import SearxEngineAPIException
|
||||
from searx.network import get
|
||||
from searx.result_types import EngineResults
|
||||
from searx.result_types.image import ImageRef
|
||||
from searx.utils import eval_xpath_list, humanize_bytes
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.extended_types import SXNG_Response
|
||||
from searx.search.processors import OnlineParams
|
||||
|
||||
|
||||
about = {
|
||||
"website": "https://giphy.com",
|
||||
"wikidata_id": "Q17054335",
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
|
||||
base_url = "https://giphy.com"
|
||||
api_url = "https://api.giphy.com"
|
||||
|
||||
categories = ["images"]
|
||||
paging = True
|
||||
page_size = 15
|
||||
|
||||
GiphyCategs = t.Literal["gifs", "stickers", "clips"]
|
||||
giphy_categ: GiphyCategs = "gifs"
|
||||
"""Giphy category to search in."""
|
||||
|
||||
CACHE: EngineCache
|
||||
"""Cache for storing the extracted api key."""
|
||||
|
||||
|
||||
_GIPHY_API_KEY_RE = re.compile(r"[Aa]piKey\s*:\s*\"(\w+)\"")
|
||||
|
||||
|
||||
def setup(engine_settings: dict[str, str]) -> bool:
|
||||
if giphy_categ not in t.get_args(GiphyCategs):
|
||||
raise ValueError("invalid category: %s" % giphy_categ)
|
||||
|
||||
global CACHE # pylint: disable=global-statement
|
||||
CACHE = EngineCache(engine_settings["name"])
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def _get_api_key() -> str:
|
||||
"""
|
||||
Extract the Giphy API key from the JavaScript code. There are different API keys
|
||||
(e.g. for mobile, desktop, ...), so we just pick a random one of these.
|
||||
"""
|
||||
cached = CACHE.get("api_key")
|
||||
if cached:
|
||||
return cached
|
||||
|
||||
homepage_resp = get(base_url)
|
||||
homepage_doc = html.fromstring(homepage_resp.text)
|
||||
|
||||
for script_src in eval_xpath_list(homepage_doc, "//script[contains(@src, 'layout')]/@src"):
|
||||
script_resp = get(base_url + script_src)
|
||||
api_keys = _GIPHY_API_KEY_RE.findall(script_resp.text)
|
||||
if api_keys:
|
||||
api_key = random.choice(api_keys)
|
||||
CACHE.set("api_key", api_key, expire=60 * 60 * 6) # 6 hours
|
||||
return api_key
|
||||
|
||||
raise SearxEngineAPIException("failed to extract api keys")
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams") -> None:
|
||||
args = {
|
||||
"q": query,
|
||||
"api_key": _get_api_key(),
|
||||
"limit": page_size,
|
||||
"offset": (params["pageno"] - 1) * page_size,
|
||||
"type": giphy_categ,
|
||||
}
|
||||
params["url"] = f"{api_url}/v1/{giphy_categ}/search?{urlencode(args)}"
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response"):
|
||||
res = EngineResults()
|
||||
|
||||
result: dict[str, t.Any]
|
||||
for result in resp.json()["data"]:
|
||||
img = result['images']['original']
|
||||
formats = [
|
||||
ImageRef(url=img["mp4"], subtype="mp4"), # type: ignore
|
||||
ImageRef(url=img["webp"], subtype="webp"), # type: ignore
|
||||
]
|
||||
thumb = (
|
||||
result["images"].get("downsized")
|
||||
or result["images"].get("downsized_medium")
|
||||
or result["images"].get("downsized_small")
|
||||
or result["images"].get("downsized_large")
|
||||
)
|
||||
res.add(
|
||||
res.types.Image(
|
||||
title=result["title"],
|
||||
content=", ".join(result.get("tags", [])),
|
||||
url=result["url"],
|
||||
thumbnail_src=thumb.get("url") or img["url"],
|
||||
img_src=img["url"],
|
||||
resolution=f"{img['width']}x{img['height']}",
|
||||
img_format="GIF",
|
||||
formats=formats,
|
||||
author=result["username"],
|
||||
filesize=humanize_bytes(int(img["size"])),
|
||||
source=result.get("source_tld") or "",
|
||||
)
|
||||
)
|
||||
|
||||
return res
|
||||
@@ -10,10 +10,12 @@ import time
|
||||
import typing as t
|
||||
|
||||
from urllib.parse import urlencode
|
||||
from lxml import html
|
||||
|
||||
from searx.result_types import EngineResults
|
||||
from searx.exceptions import SearxEngineCaptchaException
|
||||
from searx.extended_types import SXNG_Response
|
||||
from searx.utils import extr, gen_useragent, html_to_text
|
||||
from searx.utils import extr, gen_useragent, html_to_text, eval_xpath
|
||||
from searx.network import get
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
@@ -40,6 +42,11 @@ time_range_map = {"day": "d", "week": "w", "month": "m", "year": "y"}
|
||||
def _get_page_hash(query: str, page: int, headers: dict[str, str]) -> str:
|
||||
resp = get(f"{base_url}/web/result?q={query}&page={page}", headers=headers)
|
||||
|
||||
# detect captcha (if any)
|
||||
doc = html.fromstring(resp.text)
|
||||
if eval_xpath(doc, "//*[@id='spam-messages']"):
|
||||
raise SearxEngineCaptchaException()
|
||||
|
||||
# the text we search for looks like:
|
||||
# load("/desk?lang="+eV.p.param['hl']+"&q="+eV['p']['q_encode']+"&page=5&h=aa45603&t=177582576&origin=web&comp=web_serp_pag&p=gmx-com&sp=&lr="+eV.p.param['lr0']+"&mkt="+eV.p.param['mkt0']+"&family="+eV.p.param['familyFilter']+"&fcons="+eV.p.perm.fCons,"google", "eMMO", "eMH","eMP"); # pylint: disable=line-too-long
|
||||
return extr(resp.text, "&h=", "&t=")
|
||||
|
||||
@@ -57,6 +57,7 @@ max_page = 50
|
||||
.. _Google max 50 pages: https://github.com/searxng/searxng/issues/2982
|
||||
"""
|
||||
time_range_support = True
|
||||
language_support = True
|
||||
safesearch = True
|
||||
|
||||
time_range_dict = {"day": "d", "week": "w", "month": "m", "year": "y"}
|
||||
|
||||
@@ -43,6 +43,7 @@ max_page = 50
|
||||
"""
|
||||
|
||||
time_range_support = True
|
||||
language_support = True
|
||||
safesearch = True
|
||||
|
||||
filter_mapping = {0: 'images', 1: 'active', 2: 'active'}
|
||||
|
||||
@@ -66,6 +66,7 @@ about = {
|
||||
categories = ["news"]
|
||||
paging = False
|
||||
time_range_support = False
|
||||
language_support = True
|
||||
|
||||
# Google-News results are always *SafeSearch*. Option 'safesearch' is set to
|
||||
# False here.
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Heexy_ is a minimalist search engine that focuses on privacy.
|
||||
|
||||
Although it also supports news and videos, these are not implemented here
|
||||
because they usually return no result to very few irrelevant ones.
|
||||
|
||||
It seems to use Bing internally, as the image thumbnails are loaded from Bing.
|
||||
|
||||
.. _Heexy: https://docs.heexy.org/introduction
|
||||
|
||||
"""
|
||||
|
||||
from urllib.parse import urlencode
|
||||
|
||||
import typing as t
|
||||
|
||||
from searx.exceptions import SearxEngineAccessDeniedException
|
||||
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://heexy.org",
|
||||
"wikidata_id": None,
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
|
||||
paging = True
|
||||
safesearch = True
|
||||
|
||||
categories = ["general"]
|
||||
heexy_categ = "web"
|
||||
"""Category to search in. Can be either "web" or "image"."""
|
||||
|
||||
|
||||
base_url = "https://seapi.heexy.org"
|
||||
safe_search_map = {0: "off", 1: "on", 2: "on"}
|
||||
|
||||
|
||||
def init(_):
|
||||
if heexy_categ not in ("web", "image"):
|
||||
raise ValueError("invalid search category: %s" % heexy_categ)
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams") -> None:
|
||||
args = {
|
||||
"q": query,
|
||||
"page": params["pageno"],
|
||||
"safe": safe_search_map[params["safesearch"]],
|
||||
}
|
||||
if params["searxng_locale"] != "all":
|
||||
args["lang"] = params["searxng_locale"].split("-")[0]
|
||||
|
||||
params["url"] = f"{base_url}/search/{heexy_categ}?{urlencode(args)}"
|
||||
params["headers"]["Origin"] = base_url
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response"):
|
||||
res = EngineResults()
|
||||
|
||||
json_resp = resp.json()
|
||||
if not json_resp["success"]:
|
||||
raise SearxEngineAccessDeniedException()
|
||||
|
||||
result: dict[str, str]
|
||||
for result in json_resp["results"]:
|
||||
if heexy_categ == "web":
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=result["url"],
|
||||
title=result["title"],
|
||||
content=result["description"],
|
||||
)
|
||||
)
|
||||
elif heexy_categ == "image":
|
||||
res.add(
|
||||
res.types.Image(
|
||||
title=result["description"],
|
||||
url=result["url"],
|
||||
thumbnail_src=result["image"],
|
||||
img_src=result["rawImage"],
|
||||
)
|
||||
)
|
||||
|
||||
return res
|
||||
@@ -34,8 +34,8 @@ about = {
|
||||
"use_official_api": True,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
"language": "it",
|
||||
}
|
||||
language = "it"
|
||||
|
||||
|
||||
def request(query, params):
|
||||
|
||||
@@ -16,8 +16,8 @@ about = {
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": 'HTML',
|
||||
"language": 'fr',
|
||||
}
|
||||
language = "fr"
|
||||
|
||||
# engine dependent config
|
||||
categories = ['videos']
|
||||
|
||||
@@ -14,9 +14,9 @@ about = {
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
"language": "zh",
|
||||
}
|
||||
|
||||
language = "zh"
|
||||
paging = True
|
||||
time_range_support = True
|
||||
categories = ["videos"]
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""iseek_ is a search engine by the AI company Vantage Labs LLC,
|
||||
that focuses on medical and educational applicances.
|
||||
Although it's an AI company, it doesn't include any AI stuff in its results.
|
||||
|
||||
.. _iseek : https://www.iseek.ai/
|
||||
"""
|
||||
|
||||
import base64
|
||||
from hashlib import sha256
|
||||
import typing as t
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from searx.result_types import EngineResults
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.search.processors import OnlineParams
|
||||
from searx.extended_types import SXNG_Response
|
||||
|
||||
|
||||
about = {
|
||||
"website": 'https://www.iseek.com',
|
||||
"wikidata_id": None,
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
categories = ["general"]
|
||||
paging = True
|
||||
|
||||
base_url = "https://api.iseek.com"
|
||||
page_size = 10
|
||||
|
||||
|
||||
def _get_new_token(query: str, pageno: int) -> str:
|
||||
"""Create a new ``qToken``. This reduced the time for fetching subsequent pages
|
||||
from 4 seconds to 200ms when testing."""
|
||||
# The website uses a random value as qToken for the first page. For our use case,
|
||||
# it's easier if the qToken can be deterministically re-calculated based on the search query,
|
||||
# so that we can the same result when calling _get_new_token for the second, third, ... page
|
||||
#
|
||||
# var qToken = Math.ceil(Math.random() * parseInt("ZZZZ", 36)).toString(36);
|
||||
# while (qToken.length < 4) qToken = '0' + qToken;
|
||||
# qToken = qToken + "_" + pageno
|
||||
query_hash = sha256(query.encode()).digest()
|
||||
hash_start = base64.b64encode(query_hash).decode()[0:4]
|
||||
return f"{hash_start}_{pageno}"
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams"):
|
||||
offset = (params["pageno"] - 1) * page_size
|
||||
|
||||
# always seems to find 20 results max
|
||||
if offset >= 20:
|
||||
params["url"] = None
|
||||
return
|
||||
|
||||
args = {
|
||||
"q": query,
|
||||
"key": "core-web",
|
||||
"num": str(page_size),
|
||||
"off": offset,
|
||||
"rSort": "__metasearch_score_d:desc",
|
||||
# it supports many more fields, but none of them are really relevant
|
||||
"names": "title_t,content_txt,url_s",
|
||||
"qNames": "title_t",
|
||||
"qToken": _get_new_token(query, params["pageno"]),
|
||||
}
|
||||
params["url"] = f"{base_url}/search?{urlencode(args)}"
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response") -> EngineResults:
|
||||
res = EngineResults()
|
||||
|
||||
for group in resp.json()["data"]:
|
||||
group: dict[str, t.Any]
|
||||
for result in group["doclist"]["docs"]:
|
||||
result: dict[str, str]
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=result["url_s"],
|
||||
title=result["title_t"],
|
||||
content="".join(result["content_txt"]),
|
||||
)
|
||||
)
|
||||
|
||||
return res
|
||||
@@ -13,8 +13,8 @@ about = {
|
||||
"use_official_api": True,
|
||||
"require_api_key": False,
|
||||
"results": 'JSON',
|
||||
"language": 'ja',
|
||||
}
|
||||
language = "ja"
|
||||
|
||||
categories = ['dictionaries']
|
||||
paging = False
|
||||
|
||||
@@ -20,6 +20,7 @@ Paging:
|
||||
- :py:obj:`paging`
|
||||
- :py:obj:`page_size`
|
||||
- :py:obj:`first_page_num`
|
||||
- :py:obj:`send_page_num_on_first_page`
|
||||
|
||||
Time Range:
|
||||
|
||||
@@ -29,7 +30,7 @@ Time Range:
|
||||
|
||||
Safe-Search:
|
||||
|
||||
- :py:obj:`safe_search_support`
|
||||
- :py:obj:`safesearch`
|
||||
- :py:obj:`safe_search_map`
|
||||
|
||||
Response:
|
||||
@@ -78,6 +79,9 @@ from json import loads
|
||||
from urllib.parse import urlencode
|
||||
from searx.utils import to_string, html_to_text
|
||||
from searx.network import raise_for_httperror
|
||||
from searx.enginelib import EngineAbout
|
||||
|
||||
about = EngineAbout()
|
||||
|
||||
search_url = None
|
||||
"""
|
||||
@@ -103,7 +107,7 @@ Replacements are:
|
||||
|
||||
``{safe_search}``:
|
||||
Safe-search :py:obj:`URL parameter <safe_search_map>` if engine
|
||||
:py:obj:`supports safe-search <safe_search_support>`. The ``{safe_search}``
|
||||
:py:obj:`supports safe-search <safesearch>`. The ``{safe_search}``
|
||||
replacement is taken from the :py:obj:`safes_search_map`. Filter results::
|
||||
|
||||
0: none, 1: moderate, 2:strict
|
||||
@@ -169,6 +173,10 @@ number, but an offset.'''
|
||||
first_page_num = 1
|
||||
'''Number of the first page (usually 0 or 1).'''
|
||||
|
||||
send_page_num_on_first_page = True
|
||||
'''Whether to include the page number in the request for the first page.
|
||||
This can help if an engine blocks request that send a page number for the first page.'''
|
||||
|
||||
results_query = ''
|
||||
'''JSON query for the list of result items.
|
||||
|
||||
@@ -236,7 +244,7 @@ time_range_map = {
|
||||
year: 365
|
||||
'''
|
||||
|
||||
safe_search_support = False
|
||||
safesearch = False
|
||||
'''Engine supports safe-search.'''
|
||||
|
||||
safe_search_map = {0: '&filter=none', 1: '&filter=moderate', 2: '&filter=strict'}
|
||||
@@ -286,7 +294,6 @@ def do_query(data, q): # pylint: disable=invalid-name
|
||||
qkey = q[0]
|
||||
|
||||
for key, value in iterate(data):
|
||||
|
||||
if len(q) == 1:
|
||||
if key == qkey:
|
||||
ret.append(value)
|
||||
@@ -323,10 +330,13 @@ def request(query, params): # pylint: disable=redefined-outer-name
|
||||
if params['safesearch']:
|
||||
safe_search = safe_search_map[params['safesearch']]
|
||||
|
||||
pageno = ""
|
||||
if send_page_num_on_first_page or params["pageno"] != 1:
|
||||
pageno = (params['pageno'] - 1) * page_size + first_page_num
|
||||
fp = { # pylint: disable=invalid-name
|
||||
'query': urlencode({'q': query})[2:],
|
||||
'lang': lang,
|
||||
'pageno': (params['pageno'] - 1) * page_size + first_page_num,
|
||||
'pageno': pageno,
|
||||
'time_range': time_range,
|
||||
'safe_search': safe_search,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Kagi_ is a paid, privacy-focused search engine.
|
||||
|
||||
Using it requires an API key. If you have a Kagi account, you can obtain an API
|
||||
key in the `API portal`_.
|
||||
|
||||
To enable Kagi, add the following to the ``engines`` seciton of
|
||||
``settings.yml``:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
- name: kagi
|
||||
engine: kagi
|
||||
categories: [general, web]
|
||||
shortcut: kg
|
||||
api_key: ""
|
||||
kagi_categ: search
|
||||
|
||||
- name: kagi.news
|
||||
engine: kagi
|
||||
categories: [news, web]
|
||||
shortcut: kgn
|
||||
api_key: ""
|
||||
kagi_categ: news
|
||||
|
||||
- name: kagi.images
|
||||
engine: kagi
|
||||
categories: [images, web]
|
||||
shortcut: kgi
|
||||
paging: false
|
||||
api_key: ""
|
||||
kagi_categ: images
|
||||
|
||||
- name: kagi.videos
|
||||
engine: kagi
|
||||
categories: [videos, web]
|
||||
shortcut: kgv
|
||||
api_key: ""
|
||||
kagi_categ: videos
|
||||
|
||||
.. _Kagi: https://kagi.com
|
||||
.. _Api Portal: https://help.kagi.com/kagi/api/overview.html
|
||||
"""
|
||||
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
import typing as t
|
||||
import html
|
||||
|
||||
from searx.extended_types import SXNG_Response
|
||||
from searx.result_types import EngineResults
|
||||
from searx.utils import parse_duration_string
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.search.processors import OnlineParams
|
||||
|
||||
TimeRangeType = t.Literal["day", "week", "month", "year"]
|
||||
about = {
|
||||
"website": "https://kagi.com",
|
||||
"wikidata_id": "Q26000117",
|
||||
"official_api_documentation": "https://kagi.com/api/docs/openapi",
|
||||
"use_official_api": True,
|
||||
"require_api_key": True,
|
||||
"results": "JSON",
|
||||
}
|
||||
|
||||
paging = True
|
||||
"""All categories except the ``images`` category support paging."""
|
||||
safesearch = True
|
||||
time_range_support = True
|
||||
|
||||
categories = ["general"]
|
||||
kagi_categ: t.Literal["search", "images", "news", "videos"] = "search"
|
||||
"""Search category. Supported values: "search" (general), "images", "news", "videos"."""
|
||||
|
||||
base_url = "https://kagi.com"
|
||||
|
||||
safe_search_map = {0: False, 1: True, 2: True}
|
||||
time_range_to_days_map: dict[TimeRangeType, int] = {"day": 1, "week": 7, "month": 30, "year": 365}
|
||||
|
||||
api_key = ""
|
||||
"""Kagi API key. Required for using this engine."""
|
||||
|
||||
|
||||
def init(_):
|
||||
if not api_key:
|
||||
raise ValueError("api_key is required for using kagi")
|
||||
|
||||
if kagi_categ not in ("search", "images", "news", "videos"):
|
||||
raise ValueError(f"Unsupported category: {kagi_categ}") # pyright: ignore[reportUnreachable]
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams"):
|
||||
# According to the API docs, Kagi supports at maximum page 10
|
||||
if params["pageno"] > 10:
|
||||
return
|
||||
|
||||
params["headers"]["Authorization"] = f"Bearer {api_key}"
|
||||
params["url"] = f"{base_url}/api/v1/search"
|
||||
|
||||
filters = {}
|
||||
time_range = params.get("time_range")
|
||||
if time_range:
|
||||
# Kagi expects the minimum date to return results from as argument to `after`
|
||||
time_period = timedelta(days=time_range_to_days_map[time_range])
|
||||
oldest_result_date = datetime.now() - time_period
|
||||
filters["after"] = oldest_result_date.strftime("%Y-%m-%d")
|
||||
|
||||
# there doesn't seem to be a list of languages anywhere,
|
||||
# so we just assume that it supports all languages
|
||||
|
||||
filters["region"] = "no_region"
|
||||
if params["searxng_locale"] != "all":
|
||||
_locale = params["searxng_locale"].split("-")
|
||||
if len(_locale) > 1:
|
||||
filters["region"] = _locale[-1].lower()
|
||||
|
||||
args: dict[str, t.Any] = {
|
||||
"query": query,
|
||||
"page": params["pageno"],
|
||||
"workflow": kagi_categ,
|
||||
"safe_search": safe_search_map[params["safesearch"]],
|
||||
"filters": filters,
|
||||
}
|
||||
|
||||
params["method"] = "POST"
|
||||
params["json"] = args
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response") -> EngineResults:
|
||||
res = EngineResults()
|
||||
|
||||
json_data: dict[str, t.Any] = resp.json()
|
||||
|
||||
if kagi_categ in ("images", "videos"):
|
||||
# the JSON key is "image" for "images" and "video" for "videos"
|
||||
json_results = json_data["data"][kagi_categ[:-1]]
|
||||
else:
|
||||
json_results = json_data["data"][kagi_categ]
|
||||
|
||||
for result in json_results:
|
||||
published_date: datetime | None = None
|
||||
if result.get("time"):
|
||||
published_date = datetime.fromisoformat(result["time"])
|
||||
|
||||
if kagi_categ in ("search", "news"):
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=result["url"],
|
||||
title=html.unescape(result["title"]),
|
||||
content=html.unescape(result["snippet"]),
|
||||
thumbnail=result.get("image", {}).get("url") or "",
|
||||
publishedDate=published_date,
|
||||
)
|
||||
)
|
||||
elif kagi_categ == "images":
|
||||
res.add(
|
||||
res.types.Image(
|
||||
url=result["url"],
|
||||
title=html.unescape(result.get("title")),
|
||||
img_src=result.get("image", {}).get("url"),
|
||||
resolution=f"{result['image']['width']}x{result['image']['height']}",
|
||||
thumbnail_src=result.get("props", {}).get("thumbnail", {}).get("url"),
|
||||
)
|
||||
)
|
||||
elif kagi_categ == "videos":
|
||||
length: timedelta | None = None
|
||||
if result["props"].get("duration"):
|
||||
length = parse_duration_string(result["props"]["duration"])
|
||||
|
||||
res.add(
|
||||
res.types.LegacyResult(
|
||||
{
|
||||
"template": "videos.html",
|
||||
"url": result["url"],
|
||||
"title": html.unescape(result["title"]),
|
||||
"content": html.unescape(result["snippet"]),
|
||||
"thumbnail": result.get("image", {}).get("url"),
|
||||
"publishedDate": published_date,
|
||||
"author": result["props"].get("creator_name"),
|
||||
"length": length,
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
for suggestion in json_data["data"].get("related_search", []):
|
||||
res.add(res.types.LegacyResult({"suggestion": suggestion["title"]}))
|
||||
|
||||
return res
|
||||
@@ -1,205 +0,0 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Karmasearch uses Brave's index, so the results should be the same as Brave's.
|
||||
|
||||
However, the advantages of this engine are:
|
||||
|
||||
- it has less strict rate-limits
|
||||
- it has a JSON API, so it's less likely to break
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
from urllib.parse import urlencode
|
||||
import typing as t
|
||||
|
||||
from dateutil import parser
|
||||
|
||||
from searx.enginelib.traits import EngineTraits
|
||||
|
||||
from searx.utils import html_to_text
|
||||
from searx.result_types import EngineResults, MainResult
|
||||
from searx.result_types._base import LegacyResult
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.extended_types import SXNG_Response
|
||||
from searx.search.processors import OnlineParams
|
||||
|
||||
about = {
|
||||
"website": "https://karmasearch.org",
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "JSON",
|
||||
}
|
||||
|
||||
base_url = "https://api.karmasearch.org"
|
||||
categories = ["web", "general"]
|
||||
search_type = "web" # supported: web, images, videos, news
|
||||
|
||||
# all types except "images" support pagination
|
||||
paging = True
|
||||
safesearch = True
|
||||
time_range_support = True
|
||||
|
||||
safe_search_map = {0: "off", 1: "moderate", 2: "strict"}
|
||||
time_range_map = {"day": "Day", "week": "Week", "month": "Month", "year": "Year"}
|
||||
|
||||
|
||||
def init(_):
|
||||
if search_type not in ("web", "images", "videos", "news"):
|
||||
raise ValueError(f"invalid search type: {search_type}")
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams") -> None:
|
||||
engine_region: str = traits.get_region(params["searxng_locale"]) or "en-US"
|
||||
|
||||
args: dict[str, str | int] = {
|
||||
"searchTerm": query,
|
||||
"adultFilter": safe_search_map[params["safesearch"]],
|
||||
"pageNumber": params["pageno"],
|
||||
"country": engine_region.split("-")[-1],
|
||||
"userLanguage": "en", # UI language: en, es or fr / no effect on search results
|
||||
"market": engine_region,
|
||||
}
|
||||
if params["time_range"]:
|
||||
args["freshness"] = time_range_map[params["time_range"]]
|
||||
|
||||
# Needed to circumvent Cloudflare bot protection
|
||||
params['headers']['Referer'] = "https://karmasearch.org"
|
||||
|
||||
params["url"] = f"{base_url}/search/{search_type}?{urlencode(args)}"
|
||||
|
||||
|
||||
def _parse_date(date_string: str) -> datetime | None:
|
||||
try:
|
||||
return parser.parse(date_string)
|
||||
except parser.ParserError:
|
||||
return None
|
||||
|
||||
|
||||
def _parse_general(result: dict[str, str]):
|
||||
return MainResult(
|
||||
url=result["url"],
|
||||
title=result["title"],
|
||||
content=html_to_text(result["description"]),
|
||||
thumbnail=result.get("thumbnail", ""),
|
||||
)
|
||||
|
||||
|
||||
def _parse_news(result: dict[str, str]) -> LegacyResult:
|
||||
return LegacyResult(
|
||||
{
|
||||
"url": result["url"],
|
||||
"title": result["title"],
|
||||
"content": html_to_text(result["description"]),
|
||||
"thumbnail": result.get("thumbnail"),
|
||||
"publishedDate": _parse_date(result.get("age", "")),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def _parse_videos(result: dict[str, t.Any]) -> LegacyResult:
|
||||
return LegacyResult(
|
||||
{
|
||||
"template": "videos.html",
|
||||
"url": result["url"],
|
||||
"title": result["title"],
|
||||
"content": html_to_text(result["description"]),
|
||||
"thumbnail": result.get("thumbnail"),
|
||||
"publishedDate": _parse_date(result.get("age", "")),
|
||||
"length": result.get("video", {}).get("duration"),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def _parse_images(result: dict[str, t.Any]) -> LegacyResult:
|
||||
return LegacyResult(
|
||||
{
|
||||
"template": "images.html",
|
||||
"url": result["url"],
|
||||
"title": result["title"],
|
||||
"content": "",
|
||||
"img_src": result.get("properties", {}).get("url"),
|
||||
"thumbnail_src": result.get("thumbnail", {}).get("src"),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response") -> EngineResults:
|
||||
res = EngineResults()
|
||||
|
||||
json_resp: dict[str, t.Any] = resp.json()
|
||||
if not isinstance(json_resp, dict):
|
||||
return res # pyright: ignore[reportUnreachable]
|
||||
|
||||
for result in json_resp["results"]:
|
||||
# hide sponsored results
|
||||
if result.get("sponsored", False):
|
||||
continue
|
||||
|
||||
if "videos" in result:
|
||||
for videos_result in result["videos"]:
|
||||
res.add(_parse_videos(videos_result))
|
||||
continue
|
||||
|
||||
if "news" in result:
|
||||
for news_result in result["news"]:
|
||||
res.add(_parse_news(news_result))
|
||||
continue
|
||||
|
||||
if search_type == "news":
|
||||
res.add(_parse_news(result))
|
||||
elif search_type == "videos":
|
||||
res.add(_parse_videos(result))
|
||||
elif search_type == "images":
|
||||
res.add(_parse_images(result))
|
||||
else:
|
||||
res.add(_parse_general(result))
|
||||
|
||||
return res
|
||||
|
||||
|
||||
def fetch_traits(engine_traits: EngineTraits):
|
||||
"""Fetch :ref:`languages <brave languages>` and :ref:`regions <brave
|
||||
regions>` from Brave."""
|
||||
|
||||
# pylint: disable=import-outside-toplevel, too-many-branches
|
||||
|
||||
from lxml import html
|
||||
import babel
|
||||
|
||||
from searx.locales import region_tag
|
||||
from searx.network import get # see https://github.com/searxng/searxng/issues/762
|
||||
|
||||
# from searx.engines.xpath import extract_text
|
||||
from searx.utils import gen_useragent
|
||||
|
||||
headers = {
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Cache-Control": "no-cache",
|
||||
"DNT": "1",
|
||||
"Connection": "keep-alive",
|
||||
"Accept-Language": "en,en-US;q=0.7,en;q=0.3",
|
||||
"User-Agent": gen_useragent(),
|
||||
}
|
||||
|
||||
resp = get("https://karmasearch.org/settings", headers=headers, timeout=5)
|
||||
if not resp.ok:
|
||||
raise RuntimeError("Response from Brave languages is not OK.")
|
||||
|
||||
dom = html.fromstring(resp.text)
|
||||
for option in dom.xpath("//select[@name='country']/option"):
|
||||
country_tag: str = option.get("value", "")
|
||||
try:
|
||||
sxng_tag = region_tag(babel.Locale.parse(country_tag, sep="-"))
|
||||
except babel.UnknownLocaleError:
|
||||
# silently ignore unknown languages
|
||||
continue
|
||||
# print("%-20s: %s <-- %s" % (extract_text(option), country_tag, sxng_tag))
|
||||
|
||||
conflict = engine_traits.regions.get(sxng_tag)
|
||||
if conflict:
|
||||
if conflict != country_tag:
|
||||
print("CONFLICT: babel %s --> %s, %s" % (sxng_tag, conflict, country_tag))
|
||||
continue
|
||||
engine_traits.regions[sxng_tag] = country_tag
|
||||
@@ -0,0 +1,210 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Luxxle_ is an American search engine focusing on providing "unbiased"
|
||||
results.
|
||||
|
||||
.. _Luxxle: https://luxxle.com
|
||||
"""
|
||||
|
||||
from json import dumps
|
||||
from urllib.parse import quote_plus, unquote_plus
|
||||
|
||||
import typing as t
|
||||
from lxml import html
|
||||
|
||||
from searx.result_types import EngineResults
|
||||
from searx.network import get
|
||||
from searx.utils import (
|
||||
extr,
|
||||
gen_useragent,
|
||||
eval_xpath_list,
|
||||
extract_text,
|
||||
eval_xpath,
|
||||
parse_duration_string,
|
||||
ElementType,
|
||||
)
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from searx.search.processors import OnlineParams
|
||||
from searx.extended_types import SXNG_Response
|
||||
|
||||
|
||||
about = {
|
||||
"website": "https://luxxle.com",
|
||||
"official_api_documentation": None,
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "HTML",
|
||||
}
|
||||
|
||||
categories = []
|
||||
safeseach = True
|
||||
|
||||
base_url = "https://luxxle.com"
|
||||
|
||||
luxxle_categ = "search"
|
||||
"""Supported categories: "search", "news", "images", "videos"."""
|
||||
|
||||
# otherwise all requests get blocked (http2-fingerprinted probably)
|
||||
enable_http2 = False
|
||||
|
||||
|
||||
safe_search_map = {0: "Off", 1: "Moderate", 2: "Strict"}
|
||||
|
||||
|
||||
def init(_):
|
||||
if luxxle_categ not in ("search", "images", "videos", "news"):
|
||||
raise ValueError("invalid luxxle category: %s" % luxxle_categ)
|
||||
|
||||
|
||||
def _obtain_telemetry_data(query: str) -> dict[str, str]:
|
||||
"""This data is required for sending search queries.
|
||||
|
||||
The luxsearch page (for general results) has a JS dict called ``telemetryData``
|
||||
that contains all the important info, but the others don't, so we don't use it
|
||||
here. But it's useful to understand which info is needed.
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
var telemetryData = {
|
||||
errorInformation: errorInformation,
|
||||
query: "youapps club",
|
||||
ip: "10.10.10.10",
|
||||
timeOf: "1781119224",
|
||||
authorization: "db889e0ae67d3c320858ad97f51cc4f0a4d8e1913c4f5ebe5d2eafef606521dd",
|
||||
};
|
||||
|
||||
This data is only valid for very short times
|
||||
"""
|
||||
resp = get(
|
||||
f"{base_url}/lux{luxxle_categ}?q={quote_plus(query)}", headers={"User-Agent": gen_useragent(), "Sec-GPC": "1"}
|
||||
)
|
||||
|
||||
def extr_js_variable(name: str) -> str:
|
||||
val = extr(resp.text, f"var {name} = \"", "\";")
|
||||
if not val:
|
||||
val = extr(resp.text, f"var {name} = '", "';")
|
||||
return val
|
||||
|
||||
return {
|
||||
"ip": extr_js_variable("ip"),
|
||||
"timeOf": extr_js_variable("timeOf"),
|
||||
"authorization": extr_js_variable("authorization"),
|
||||
"preferencesCookie": extr_js_variable("preferencesCookie"),
|
||||
}
|
||||
|
||||
|
||||
def request(query: str, params: "OnlineParams") -> None:
|
||||
telemetry_data = _obtain_telemetry_data(query)
|
||||
|
||||
market = params["searxng_locale"]
|
||||
if market == "all":
|
||||
market = "en-US"
|
||||
|
||||
params["url"] = f"{base_url}/load_{luxxle_categ}.php"
|
||||
search_data = {
|
||||
**telemetry_data,
|
||||
"query": query,
|
||||
"market": market,
|
||||
"safeSearch": safe_search_map[params["safesearch"]],
|
||||
"freshness": "",
|
||||
"language": "english", # UI language
|
||||
}
|
||||
if luxxle_categ == "images":
|
||||
# for some reason this is sent as form data
|
||||
params["data"] = {"searchData": dumps(search_data)}
|
||||
else:
|
||||
params["json"] = {"searchData": search_data}
|
||||
params["method"] = "POST"
|
||||
|
||||
|
||||
def _extract_url_from_redirect(url: str):
|
||||
# urls usually look like "/redirect?url=<url>"
|
||||
query_start_idx = url.find("?url=")
|
||||
if query_start_idx < 0:
|
||||
return url
|
||||
|
||||
url_start_idx = query_start_idx + len("?url=")
|
||||
return unquote_plus(url[url_start_idx:])
|
||||
|
||||
|
||||
def _general_results(doc: ElementType, res: EngineResults):
|
||||
for result in eval_xpath_list(doc, "//div[@id='mainResults']/div[contains(@class, 'resultsContainer')]"):
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=_extract_url_from_redirect(
|
||||
extract_text(eval_xpath(result, "./div[contains(@class, 'urlAddressLink')]/a/@href")) or ""
|
||||
),
|
||||
title=extract_text(eval_xpath(result, "./div[contains(@class, 'urlname')]")) or "",
|
||||
content=extract_text(eval_xpath(result, "./div[contains(@class, 'urlSnippet')]")) or "",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def _news_results(doc: ElementType, res: EngineResults):
|
||||
for result in eval_xpath_list(
|
||||
doc, "//div[contains(@class, 'newsResults')]/div[contains(@class, 'mediaResultNewsPage')]"
|
||||
):
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
url=_extract_url_from_redirect(
|
||||
extract_text(eval_xpath(result, ".//div[contains(@class, 'mediaResultNewsPageTitle')]/a/@href"))
|
||||
or ""
|
||||
),
|
||||
title=extract_text(eval_xpath(result, ".//div[contains(@class, 'mediaResultNewsPageTitle')]/a")) or "",
|
||||
content=extract_text(eval_xpath(result, ".//div[contains(@class, 'mediaResultNewsPageDescription')]"))
|
||||
or "",
|
||||
thumbnail=extract_text(eval_xpath(result, ".//div[contains(@class, 'mediaResultThumbnail')]//img/@src"))
|
||||
or "",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def _video_results(doc: ElementType, res: EngineResults):
|
||||
for result in eval_xpath_list(doc, "//div[@id='mainResults']/div[contains(@class, 'mediaResult')]"):
|
||||
res.add(
|
||||
res.types.MainResult(
|
||||
template="videos.html",
|
||||
url=extract_text(eval_xpath(result, "./@data-url")) or "",
|
||||
title=extract_text(eval_xpath(result, ".//div[contains(@class, 'mediaResultTitleVideo')]/a")) or "",
|
||||
content=extract_text(eval_xpath(result, ".//div[contains(@class, 'mediaResultDescription')]")) or "",
|
||||
thumbnail=extract_text(eval_xpath(result, ".//img[contains(@class, 'videoThumbnail')]/@src")) or "",
|
||||
author=extract_text(eval_xpath(result, ".//div[contains(@class, 'videoCreator')]")) or "",
|
||||
length=parse_duration_string(
|
||||
extract_text(eval_xpath(result, ".//span[contains(@class, 'mediaResultDuration')]")) or ""
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def _image_results(doc: ElementType, res: EngineResults):
|
||||
for result in eval_xpath_list(doc, "//div[contains(@class, 'imageResultsWrapper')]/div"):
|
||||
res.add(
|
||||
res.types.Image(
|
||||
url=_extract_url_from_redirect(
|
||||
extract_text(eval_xpath(result, ".//a[contains(@class, 'imageResultSource')]/@href")) or ""
|
||||
),
|
||||
title=extract_text(eval_xpath(result, ".//a[contains(@class, 'imageResultTitle')]")) or "",
|
||||
source=extract_text(eval_xpath(result, ".//div[contains(@class, 'imageResultSource')]")) or "",
|
||||
thumbnail_src=extract_text(eval_xpath(result, "./@data-thumbnail-src")) or "",
|
||||
img_src=extract_text(eval_xpath(result, "./@data-image-src")) or "",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def response(resp: "SXNG_Response") -> EngineResults:
|
||||
doc = html.fromstring(resp.text)
|
||||
res = EngineResults()
|
||||
|
||||
match luxxle_categ:
|
||||
case "search":
|
||||
_general_results(doc, res)
|
||||
case "images":
|
||||
_image_results(doc, res)
|
||||
case "videos":
|
||||
_video_results(doc, res)
|
||||
case "news":
|
||||
_news_results(doc, res)
|
||||
case _:
|
||||
raise ValueError("unsupported category: %s" % luxxle_categ)
|
||||
|
||||
return res
|
||||
@@ -44,8 +44,8 @@ about = {
|
||||
|
||||
base_url = "https://api2.marginalia-search.com"
|
||||
safesearch = True
|
||||
categories = ["general"]
|
||||
paging = False
|
||||
categories = ["general", "blogs"]
|
||||
paging = True
|
||||
results_per_page = 20
|
||||
api_key = None
|
||||
"""To get an API key, please follow the instructions from `Key and license`_
|
||||
@@ -85,7 +85,12 @@ class ApiSearchResults(t.TypedDict):
|
||||
|
||||
def request(query: str, params: dict[str, t.Any]):
|
||||
|
||||
query_params = {"count": results_per_page, "nsfw": min(params["safesearch"], 1), "query": query}
|
||||
query_params = {
|
||||
"page": params["pageno"],
|
||||
"count": results_per_page,
|
||||
"nsfw": min(params["safesearch"], 1),
|
||||
"query": query,
|
||||
}
|
||||
|
||||
params["url"] = f"{base_url}/search?{urlencode(query_params)}"
|
||||
params["headers"]["User-Agent"] = searxng_useragent()
|
||||
|
||||
@@ -11,9 +11,9 @@ about = {
|
||||
"use_official_api": True,
|
||||
"require_api_key": False,
|
||||
"results": 'JSON',
|
||||
"language": "de",
|
||||
}
|
||||
|
||||
language = "de"
|
||||
categories = ['videos']
|
||||
paging = True
|
||||
time_range_support = False
|
||||
|
||||
@@ -20,6 +20,7 @@ about = {
|
||||
}
|
||||
paging = True # paging is only supported for general search
|
||||
safesearch = True
|
||||
language_support = True
|
||||
time_range_support = True # time range search is supported for general and news
|
||||
max_page = 10
|
||||
|
||||
|
||||
@@ -35,8 +35,9 @@ about = {
|
||||
'use_official_api': False,
|
||||
'require_api_key': False,
|
||||
'results': 'JSON',
|
||||
'language': 'de',
|
||||
}
|
||||
language = "de"
|
||||
|
||||
paging = True
|
||||
categories = ["movies"]
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ about = {
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "HTML",
|
||||
"language": "ko",
|
||||
}
|
||||
language = "ko"
|
||||
|
||||
categories = []
|
||||
paging = True
|
||||
|
||||
@@ -13,8 +13,8 @@ about = {
|
||||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "HTML",
|
||||
"language": "ja",
|
||||
}
|
||||
language = "ja"
|
||||
|
||||
categories = ["videos"]
|
||||
paging = True
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user