mirror of
https://github.com/searxng/searxng.git
synced 2026-06-01 23:47:16 +02:00
[doc] build from commit 7159b8aed3
This commit is contained in:
+661
@@ -0,0 +1,661 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Custom message extractor (i18n)" href="searx.babel_extract.html"><link rel="prev" title="utils/searxng.sh" href="../utils/searxng.sh.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>Source-Code - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon no-toc" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children current-page"><a class="current reference internal" href="#">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/index.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/index.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon no-toc" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="source-code">
|
||||
<h1>Source-Code<a class="headerlink" href="#source-code" title="Link to this heading">¶</a></h1>
|
||||
<p>This is a partial documentation of our source code. We are not aiming to
|
||||
document every item from the source code, but we will add documentation when
|
||||
requested.</p>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html#searx.babel_extract.extract"><code class="docutils literal notranslate"><span class="pre">extract()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html#searx.botdetection.get_network"><code class="docutils literal notranslate"><span class="pre">get_network()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html#searx.botdetection.too_many_requests"><code class="docutils literal notranslate"><span class="pre">too_many_requests()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html#searx.botdetection.ProxyFix"><code class="docutils literal notranslate"><span class="pre">ProxyFix</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html#module-searx.botdetection.ip_lists">IP lists</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html#module-searx.botdetection.ip_limit">Rate limit</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html#module-searx.botdetection.http_accept">Probe HTTP headers</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html#module-searx.botdetection.config">Config</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.cache.html">Caches</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html#searx.cache.ExpireCacheCfg"><code class="docutils literal notranslate"><span class="pre">ExpireCacheCfg</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html#searx.cache.ExpireCacheStats"><code class="docutils literal notranslate"><span class="pre">ExpireCacheStats</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html#searx.cache.ExpireCache"><code class="docutils literal notranslate"><span class="pre">ExpireCache</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html#searx.cache.ExpireCacheSQLite"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxException"><code class="docutils literal notranslate"><span class="pre">SearxException</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxParameterException"><code class="docutils literal notranslate"><span class="pre">SearxParameterException</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxSettingsException"><code class="docutils literal notranslate"><span class="pre">SearxSettingsException</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxEngineException"><code class="docutils literal notranslate"><span class="pre">SearxEngineException</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxXPathSyntaxException"><code class="docutils literal notranslate"><span class="pre">SearxXPathSyntaxException</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxEngineResponseException"><code class="docutils literal notranslate"><span class="pre">SearxEngineResponseException</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxEngineAPIException"><code class="docutils literal notranslate"><span class="pre">SearxEngineAPIException</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxEngineAccessDeniedException"><code class="docutils literal notranslate"><span class="pre">SearxEngineAccessDeniedException</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxEngineCaptchaException"><code class="docutils literal notranslate"><span class="pre">SearxEngineCaptchaException</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxEngineTooManyRequestsException"><code class="docutils literal notranslate"><span class="pre">SearxEngineTooManyRequestsException</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html#searx.exceptions.SearxEngineXPathException"><code class="docutils literal notranslate"><span class="pre">SearxEngineXPathException</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html#searx.favicons.favicon_url"><code class="docutils literal notranslate"><span class="pre">favicon_url()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html#searx.favicons.favicon_proxy"><code class="docutils literal notranslate"><span class="pre">favicon_proxy()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html#module-searx.favicons.config">Favicons Config</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html#module-searx.favicons.proxy">Favicons Proxy</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html#module-searx.favicons.resolvers">Favicons Resolver</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html#module-searx.favicons.cache">Favicons Cache</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html#searx.infopage.InfoPage"><code class="docutils literal notranslate"><span class="pre">InfoPage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html#searx.infopage.InfoPageSet"><code class="docutils literal notranslate"><span class="pre">InfoPageSet</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.locales.html">Locales</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searxngs-locale-data">SearXNG’s locale data</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#module-searx.sxng_locales">SearXNG’s locale codes</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searxngs-locale-implementations">SearXNG’s locale implementations</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.LOCALE_NAMES"><code class="docutils literal notranslate"><span class="pre">LOCALE_NAMES</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.RTL_LOCALES"><code class="docutils literal notranslate"><span class="pre">RTL_LOCALES</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.ADDITIONAL_TRANSLATIONS"><code class="docutils literal notranslate"><span class="pre">ADDITIONAL_TRANSLATIONS</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.LOCALE_BEST_MATCH"><code class="docutils literal notranslate"><span class="pre">LOCALE_BEST_MATCH</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.get_translations"><code class="docutils literal notranslate"><span class="pre">get_translations()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.get_translation_locales"><code class="docutils literal notranslate"><span class="pre">get_translation_locales()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.locales_initialize"><code class="docutils literal notranslate"><span class="pre">locales_initialize()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.region_tag"><code class="docutils literal notranslate"><span class="pre">region_tag()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.language_tag"><code class="docutils literal notranslate"><span class="pre">language_tag()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.get_locale"><code class="docutils literal notranslate"><span class="pre">get_locale()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.get_official_locales"><code class="docutils literal notranslate"><span class="pre">get_official_locales()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.get_engine_locale"><code class="docutils literal notranslate"><span class="pre">get_engine_locale()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.match_locale"><code class="docutils literal notranslate"><span class="pre">match_locale()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html#searx.locales.build_engine_locales"><code class="docutils literal notranslate"><span class="pre">build_engine_locales()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.search.html">Search</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html#searx.search.models.EngineRef"><code class="docutils literal notranslate"><span class="pre">EngineRef</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html#searx.search.models.SearchQuery"><code class="docutils literal notranslate"><span class="pre">SearchQuery</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html#searx.search.Search"><code class="docutils literal notranslate"><span class="pre">Search</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html#searx.search.SearchWithPlugins"><code class="docutils literal notranslate"><span class="pre">SearchWithPlugins</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.search.processors.html">Search processors</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html#module-searx.search.processors.abstract">Abstract processor class</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html#module-searx.search.processors.offline">Offline processor</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html#module-searx.search.processors.online">Online processor</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html#module-searx.search.processors.online_currency">Online currency processor</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html#module-searx.search.processors.online_dictionary">Online dictionary processor</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html#module-searx.search.processors.online_url_search">Online URL search processor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.settings.html">Settings Loader</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html#searx.settings_loader.DEFAULT_SETTINGS_FILE"><code class="docutils literal notranslate"><span class="pre">DEFAULT_SETTINGS_FILE</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html#searx.settings_loader.load_yaml"><code class="docutils literal notranslate"><span class="pre">load_yaml()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html#searx.settings_loader.get_yaml_cfg"><code class="docutils literal notranslate"><span class="pre">get_yaml_cfg()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html#searx.settings_loader.get_user_cfg_folder"><code class="docutils literal notranslate"><span class="pre">get_user_cfg_folder()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html#searx.settings_loader.load_settings"><code class="docutils literal notranslate"><span class="pre">load_settings()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html#searx.sqlitedb.DBSession"><code class="docutils literal notranslate"><span class="pre">DBSession</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html#searx.sqlitedb.SQLiteAppl"><code class="docutils literal notranslate"><span class="pre">SQLiteAppl</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html#searx.sqlitedb.SQLiteProperties"><code class="docutils literal notranslate"><span class="pre">SQLiteProperties</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.XPathSpecType"><code class="docutils literal notranslate"><span class="pre">XPathSpecType</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.searxng_useragent"><code class="docutils literal notranslate"><span class="pre">searxng_useragent()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.gen_useragent"><code class="docutils literal notranslate"><span class="pre">gen_useragent()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.gen_gsa_useragent"><code class="docutils literal notranslate"><span class="pre">gen_gsa_useragent()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.HTMLTextExtractor"><code class="docutils literal notranslate"><span class="pre">HTMLTextExtractor</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.html_to_text"><code class="docutils literal notranslate"><span class="pre">html_to_text()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.markdown_to_text"><code class="docutils literal notranslate"><span class="pre">markdown_to_text()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.extract_text"><code class="docutils literal notranslate"><span class="pre">extract_text()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.normalize_url"><code class="docutils literal notranslate"><span class="pre">normalize_url()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.extract_url"><code class="docutils literal notranslate"><span class="pre">extract_url()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.dict_subset"><code class="docutils literal notranslate"><span class="pre">dict_subset()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.humanize_bytes"><code class="docutils literal notranslate"><span class="pre">humanize_bytes()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.humanize_number"><code class="docutils literal notranslate"><span class="pre">humanize_number()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.convert_str_to_int"><code class="docutils literal notranslate"><span class="pre">convert_str_to_int()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.extr"><code class="docutils literal notranslate"><span class="pre">extr()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.int_or_zero"><code class="docutils literal notranslate"><span class="pre">int_or_zero()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.to_string"><code class="docutils literal notranslate"><span class="pre">to_string()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.ecma_unescape"><code class="docutils literal notranslate"><span class="pre">ecma_unescape()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.remove_pua_from_str"><code class="docutils literal notranslate"><span class="pre">remove_pua_from_str()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.get_engine_from_settings"><code class="docutils literal notranslate"><span class="pre">get_engine_from_settings()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.get_xpath"><code class="docutils literal notranslate"><span class="pre">get_xpath()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.eval_xpath"><code class="docutils literal notranslate"><span class="pre">eval_xpath()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.eval_xpath_list"><code class="docutils literal notranslate"><span class="pre">eval_xpath_list()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.eval_xpath_getindex"><code class="docutils literal notranslate"><span class="pre">eval_xpath_getindex()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.get_embeded_stream_url"><code class="docutils literal notranslate"><span class="pre">get_embeded_stream_url()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.js_obj_str_to_python"><code class="docutils literal notranslate"><span class="pre">js_obj_str_to_python()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html#searx.utils.parse_duration_string"><code class="docutils literal notranslate"><span class="pre">parse_duration_string()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html#searx.valkeydb.client"><code class="docutils literal notranslate"><span class="pre">client()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html#searx.valkeylib.LUA_SCRIPT_STORAGE"><code class="docutils literal notranslate"><span class="pre">LUA_SCRIPT_STORAGE</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html#searx.valkeylib.lua_script_storage"><code class="docutils literal notranslate"><span class="pre">lua_script_storage()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html#searx.valkeylib.purge_by_prefix"><code class="docutils literal notranslate"><span class="pre">purge_by_prefix()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html#searx.valkeylib.secret_hash"><code class="docutils literal notranslate"><span class="pre">secret_hash()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html#searx.valkeylib.incr_counter"><code class="docutils literal notranslate"><span class="pre">incr_counter()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html#searx.valkeylib.drop_counter"><code class="docutils literal notranslate"><span class="pre">drop_counter()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html#searx.valkeylib.incr_sliding_window"><code class="docutils literal notranslate"><span class="pre">incr_sliding_window()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="searx.weather.html">Weather</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html#searx.weather.symbol_url"><code class="docutils literal notranslate"><span class="pre">symbol_url()</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html#searx.weather.Temperature"><code class="docutils literal notranslate"><span class="pre">Temperature</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html#searx.weather.Pressure"><code class="docutils literal notranslate"><span class="pre">Pressure</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html#searx.weather.WindSpeed"><code class="docutils literal notranslate"><span class="pre">WindSpeed</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html#searx.weather.RelativeHumidity"><code class="docutils literal notranslate"><span class="pre">RelativeHumidity</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html#searx.weather.Compass"><code class="docutils literal notranslate"><span class="pre">Compass</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html#searx.weather.WeatherConditionType"><code class="docutils literal notranslate"><span class="pre">WeatherConditionType</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html#searx.weather.DateTime"><code class="docutils literal notranslate"><span class="pre">DateTime</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html#searx.weather.GeoLocation"><code class="docutils literal notranslate"><span class="pre">GeoLocation</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.babel_extract.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Custom message extractor (i18n)</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="../utils/searxng.sh.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer no-toc">
|
||||
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,542 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Bot Detection" href="searx.botdetection.html"><link rel="prev" title="Source-Code" href="index.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>Custom message extractor (i18n) - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.babel_extract.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.babel_extract.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-searx.babel_extract">
|
||||
<span id="custom-message-extractor-i18n"></span><span id="searx-babel-extract"></span><h1>Custom message extractor (i18n)<a class="headerlink" href="#module-searx.babel_extract" title="Link to this heading">¶</a></h1>
|
||||
<p>This module implements the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/babel.cfg">searxng_msg</a> extractor to
|
||||
extract messages from:</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/searxng.msg">git://searx/searxng.msg</a></p></li>
|
||||
</ul>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">searxng.msg</span></code> files are selected by <a class="reference external" href="https://babel.pocoo.org/en/latest/index.html">Babel</a>, see Babel’s configuration in
|
||||
<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/babel.cfg">git://babel.cfg</a>:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">searxng_msg</span> <span class="o">=</span> <span class="n">searx</span><span class="o">.</span><span class="n">babel_extract</span><span class="o">.</span><span class="n">extract</span>
|
||||
<span class="o">...</span>
|
||||
<span class="p">[</span><span class="n">searxng_msg</span><span class="p">:</span> <span class="o">**/</span><span class="n">searxng</span><span class="o">.</span><span class="n">msg</span><span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>A <code class="docutils literal notranslate"><span class="pre">searxng.msg</span></code> file is a python file that is <em>executed</em> by the
|
||||
<a class="reference internal" href="#searx.babel_extract.extract" title="searx.babel_extract.extract"><code class="xref py py-obj docutils literal notranslate"><span class="pre">extract</span></code></a> function. Additional <code class="docutils literal notranslate"><span class="pre">searxng.msg</span></code> files can be added by:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>Adding a <code class="docutils literal notranslate"><span class="pre">searxng.msg</span></code> file in one of the SearXNG python packages and</p></li>
|
||||
<li><p>implement a method in <a class="reference internal" href="#searx.babel_extract.extract" title="searx.babel_extract.extract"><code class="xref py py-obj docutils literal notranslate"><span class="pre">extract</span></code></a> that yields messages from this file.</p></li>
|
||||
</ol>
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.babel_extract.extract">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.babel_extract.</span></span><span class="sig-name descname"><span class="pre">extract</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fileobj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">keywords</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">comment_tags</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/babel_extract.html#extract"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.babel_extract.extract" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Extract messages from <code class="docutils literal notranslate"><span class="pre">searxng.msg</span></code> files by a custom <a class="reference external" href="https://babel.pocoo.org/en/latest/messages.html#writing-extraction-methods">extractor</a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.botdetection.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Bot Detection</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="index.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Source-Code</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Custom message extractor (i18n)</a><ul>
|
||||
<li><a class="reference internal" href="#searx.babel_extract.extract"><code class="docutils literal notranslate"><span class="pre">extract()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,974 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Caches" href="searx.cache.html"><link rel="prev" title="Custom message extractor (i18n)" href="searx.babel_extract.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>Bot Detection - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.botdetection.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.botdetection.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-searx.botdetection">
|
||||
<span id="bot-detection"></span><span id="botdetection"></span><h1>Bot Detection<a class="headerlink" href="#module-searx.botdetection" title="Link to this heading">¶</a></h1>
|
||||
<p id="botdetection-src">Implementations used for bot detection.</p>
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.get_network">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.</span></span><span class="sig-name descname"><span class="pre">get_network</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">real_ip</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address" title="(in Python v3.14)"><span class="pre">IPv4Address</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Address" title="(in Python v3.14)"><span class="pre">IPv6Address</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">cfg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#searx.botdetection.config.Config" title="searx.botdetection.config.Config"><span class="pre">config.Config</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network" title="(in Python v3.14)"><span class="pre">IPv4Network</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Network" title="(in Python v3.14)"><span class="pre">IPv6Network</span></a></span></span><a class="reference internal" href="../_modules/searx/botdetection/_helpers.html#get_network"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.get_network" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns the (client) network of whether the <code class="docutils literal notranslate"><span class="pre">real_ip</span></code> is part of.</p>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">ipv4_prefix</span></code> and <code class="docutils literal notranslate"><span class="pre">ipv6_prefix</span></code> define the number of leading bits in
|
||||
an address that are compared to determine whether or not an address is part
|
||||
of a (client) network.</p>
|
||||
<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="k">[botdetection]</span>
|
||||
|
||||
<span class="n">ipv4_prefix</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">32</span>
|
||||
<span class="n">ipv6_prefix</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">48</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.too_many_requests">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.</span></span><span class="sig-name descname"><span class="pre">too_many_requests</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">network</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network" title="(in Python v3.14)"><span class="pre">IPv4Network</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Network" title="(in Python v3.14)"><span class="pre">IPv6Network</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">log_msg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://werkzeug.palletsprojects.com/en/stable/wrappers/#werkzeug.wrappers.Response" title="(in Werkzeug v3.1.x)"><span class="pre">Response</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/botdetection/_helpers.html#too_many_requests"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.too_many_requests" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a HTTP 429 response object and writes a ERROR message to the
|
||||
‘botdetection’ logger. This function is used in part by the filter methods
|
||||
to return the default <code class="docutils literal notranslate"><span class="pre">Too</span> <span class="pre">Many</span> <span class="pre">Requests</span></code> response.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ProxyFix">
|
||||
<span class="property"><span class="k"><span class="pre">final</span></span><span class="w"> </span><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.botdetection.</span></span><span class="sig-name descname"><span class="pre">ProxyFix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">wsgi_app</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">WSGIApplication</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/trusted_proxies.html#ProxyFix"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.ProxyFix" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>A middleware like the <a class="reference external" href="https://werkzeug.palletsprojects.com/middleware/proxy_fix/">ProxyFix</a> class, where the <code class="docutils literal notranslate"><span class="pre">x_for</span></code> argument is
|
||||
replaced by a method that determines the number of trusted proxies via the
|
||||
<code class="docutils literal notranslate"><span class="pre">botdetection.trusted_proxies</span></code> setting.</p>
|
||||
<aside class="sidebar">
|
||||
<p class="sidebar-title"><a class="reference external" href="https://flask.palletsprojects.com/en/stable/api/#flask.Request.remote_addr" title="(in Flask v3.1.x)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flask.Request.remote_addr</span></code></a></p>
|
||||
<p>SearXNG uses Werkzeug’s <a class="reference external" href="https://werkzeug.palletsprojects.com/middleware/proxy_fix/">ProxyFix</a> (with it default <code class="docutils literal notranslate"><span class="pre">x_for=1</span></code>).</p>
|
||||
</aside>
|
||||
<p>The remote IP (<a class="reference external" href="https://flask.palletsprojects.com/en/stable/api/#flask.Request.remote_addr" title="(in Flask v3.1.x)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flask.Request.remote_addr</span></code></a>) of the request is taken
|
||||
from (first match):</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For">X-Forwarded-For</a>: If the header is set, the first untrusted IP that comes
|
||||
before the IPs that are still part of the <code class="docutils literal notranslate"><span class="pre">botdetection.trusted_proxies</span></code>
|
||||
is used.</p></li>
|
||||
<li><p><a class="reference external" href="https://github.com/searxng/searxng/issues/1237#issuecomment-1147564516">X-Real-IP</a>:
|
||||
If <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For">X-Forwarded-For</a> is not set, <cite>X-Real-IP</cite> is used
|
||||
(<code class="docutils literal notranslate"><span class="pre">botdetection.trusted_proxies</span></code> is ignored).</p></li>
|
||||
</ul>
|
||||
<p>If none of the header is set, the <a class="reference external" href="https://wsgi.readthedocs.io/en/latest/proposals-2.0.html#making-some-keys-required">REMOTE_ADDR</a> from the WSGI layer is used.
|
||||
If (for whatever reasons) none IP can be determined, an error message is
|
||||
displayed and <code class="docutils literal notranslate"><span class="pre">100::</span></code> is used instead (<span class="target" id="index-0"></span><a class="rfc reference external" href="https://datatracker.ietf.org/doc/html/rfc6666.html"><strong>RFC 6666</strong></a>).</p>
|
||||
</dd></dl>
|
||||
|
||||
<section id="module-searx.botdetection.ip_lists">
|
||||
<span id="ip-lists"></span><span id="botdetection-ip-lists"></span><h2>IP lists<a class="headerlink" href="#module-searx.botdetection.ip_lists" title="Link to this heading">¶</a></h2>
|
||||
<section id="method-ip-lists">
|
||||
<span id="id1"></span><h3>Method <code class="docutils literal notranslate"><span class="pre">ip_lists</span></code><a class="headerlink" href="#method-ip-lists" title="Link to this heading">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">ip_lists</span></code> method implements <a class="reference internal" href="#searx.botdetection.ip_lists.block_ip" title="searx.botdetection.ip_lists.block_ip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">block-list</span></code></a> and
|
||||
<a class="reference internal" href="#searx.botdetection.ip_lists.pass_ip" title="searx.botdetection.ip_lists.pass_ip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pass-list</span></code></a>.</p>
|
||||
<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="k">[botdetection.ip_lists]</span>
|
||||
|
||||
<span class="n">pass_ip</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span>
|
||||
<span class="w"> </span><span class="s1">'167.235.158.251'</span><span class="p">,</span><span class="w"> </span><span class="c1"># IPv4 of check.searx.space</span>
|
||||
<span class="w"> </span><span class="s1">'192.168.0.0/16'</span><span class="p">,</span><span class="w"> </span><span class="c1"># IPv4 private network</span>
|
||||
<span class="w"> </span><span class="s1">'fe80::/10'</span><span class="p">,</span><span class="w"> </span><span class="c1"># IPv6 linklocal</span>
|
||||
<span class="p">]</span>
|
||||
|
||||
<span class="n">block_ip</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span>
|
||||
<span class="w"> </span><span class="s1">'93.184.216.34'</span><span class="p">,</span><span class="w"> </span><span class="c1"># IPv4 of example.org</span>
|
||||
<span class="w"> </span><span class="s1">'257.1.1.1'</span><span class="p">,</span><span class="w"> </span><span class="c1"># invalid IP --> will be ignored, logged in ERROR class</span>
|
||||
<span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_lists.SEARXNG_ORG">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_lists.</span></span><span class="sig-name descname"><span class="pre">SEARXNG_ORG</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['167.235.158.251',</span> <span class="pre">'2a01:04f8:1c1c:8fc2::/64']</span></span><a class="headerlink" href="#searx.botdetection.ip_lists.SEARXNG_ORG" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Passlist of IPs from the SearXNG organization, e.g. <cite>check.searx.space</cite>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_lists.pass_ip">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_lists.</span></span><span class="sig-name descname"><span class="pre">pass_ip</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">real_ip</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address" title="(in Python v3.14)"><span class="pre">IPv4Address</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Address" title="(in Python v3.14)"><span class="pre">IPv6Address</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">cfg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#searx.botdetection.config.Config" title="searx.botdetection.config.Config"><span class="pre">Config</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Tuple" title="(in Python v3.14)"><span class="pre">Tuple</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/searx/botdetection/ip_lists.html#pass_ip"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.ip_lists.pass_ip" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Checks if the IP on the subnet is in one of the members of the
|
||||
<code class="docutils literal notranslate"><span class="pre">botdetection.ip_lists.pass_ip</span></code> list.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_lists.block_ip">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_lists.</span></span><span class="sig-name descname"><span class="pre">block_ip</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">real_ip</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address" title="(in Python v3.14)"><span class="pre">IPv4Address</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Address" title="(in Python v3.14)"><span class="pre">IPv6Address</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">cfg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#searx.botdetection.config.Config" title="searx.botdetection.config.Config"><span class="pre">Config</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Tuple" title="(in Python v3.14)"><span class="pre">Tuple</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/searx/botdetection/ip_lists.html#block_ip"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.ip_lists.block_ip" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Checks if the IP on the subnet is in one of the members of the
|
||||
<code class="docutils literal notranslate"><span class="pre">botdetection.ip_lists.block_ip</span></code> list.</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="module-searx.botdetection.ip_limit">
|
||||
<span id="rate-limit"></span><span id="botdetection-rate-limit"></span><h2>Rate limit<a class="headerlink" href="#module-searx.botdetection.ip_limit" title="Link to this heading">¶</a></h2>
|
||||
<section id="method-ip-limit">
|
||||
<span id="botdetection-ip-limit"></span><h3>Method <code class="docutils literal notranslate"><span class="pre">ip_limit</span></code><a class="headerlink" href="#method-ip-limit" title="Link to this heading">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">ip_limit</span></code> method counts request from an IP in <em>sliding windows</em>. If
|
||||
there are to many requests in a sliding window, the request is evaluated as a
|
||||
bot request. This method requires a valkey DB and needs a HTTP <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For">X-Forwarded-For</a>
|
||||
header. To take privacy only the hash value of an IP is stored in the valkey DB
|
||||
and at least for a maximum of 10 minutes.</p>
|
||||
<p>The <a class="reference internal" href="#module-searx.botdetection.link_token" title="searx.botdetection.link_token"><code class="xref py py-obj docutils literal notranslate"><span class="pre">link_token</span></code></a> method can be used to investigate whether a request is
|
||||
<em>suspicious</em>. To activate the <a class="reference internal" href="#module-searx.botdetection.link_token" title="searx.botdetection.link_token"><code class="xref py py-obj docutils literal notranslate"><span class="pre">link_token</span></code></a> method in the
|
||||
<a class="reference internal" href="#module-searx.botdetection.ip_limit" title="searx.botdetection.ip_limit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ip_limit</span></code></a> method add the following configuration:</p>
|
||||
<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="k">[botdetection.ip_limit]</span>
|
||||
<span class="n">link_token</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If the <a class="reference internal" href="#module-searx.botdetection.link_token" title="searx.botdetection.link_token"><code class="xref py py-obj docutils literal notranslate"><span class="pre">link_token</span></code></a> method is activated and a request is <em>suspicious</em>
|
||||
the request rates are reduced:</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference internal" href="#searx.botdetection.ip_limit.BURST_MAX" title="searx.botdetection.ip_limit.BURST_MAX"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BURST_MAX</span></code></a> -> <a class="reference internal" href="#searx.botdetection.ip_limit.BURST_MAX_SUSPICIOUS" title="searx.botdetection.ip_limit.BURST_MAX_SUSPICIOUS"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BURST_MAX_SUSPICIOUS</span></code></a></p></li>
|
||||
<li><p><a class="reference internal" href="#searx.botdetection.ip_limit.LONG_MAX" title="searx.botdetection.ip_limit.LONG_MAX"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LONG_MAX</span></code></a> -> <a class="reference internal" href="#searx.botdetection.ip_limit.LONG_MAX_SUSPICIOUS" title="searx.botdetection.ip_limit.LONG_MAX_SUSPICIOUS"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LONG_MAX_SUSPICIOUS</span></code></a></p></li>
|
||||
</ul>
|
||||
<p>To intercept bots that get their IPs from a range of IPs, there is a
|
||||
<a class="reference internal" href="#searx.botdetection.ip_limit.SUSPICIOUS_IP_WINDOW" title="searx.botdetection.ip_limit.SUSPICIOUS_IP_WINDOW"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SUSPICIOUS_IP_WINDOW</span></code></a>. In this window the suspicious IPs are stored
|
||||
for a longer time. IPs stored in this sliding window have a maximum of
|
||||
<a class="reference internal" href="#searx.botdetection.ip_limit.SUSPICIOUS_IP_MAX" title="searx.botdetection.ip_limit.SUSPICIOUS_IP_MAX"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SUSPICIOUS_IP_MAX</span></code></a> accesses before they are blocked. As soon as the IP
|
||||
makes a request that is not suspicious, the sliding window for this IP is
|
||||
dropped.</p>
|
||||
</section>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_limit.BURST_WINDOW">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_limit.</span></span><span class="sig-name descname"><span class="pre">BURST_WINDOW</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">20</span></span><a class="headerlink" href="#searx.botdetection.ip_limit.BURST_WINDOW" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Time (sec) before sliding window for <em>burst</em> requests expires.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_limit.BURST_MAX">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_limit.</span></span><span class="sig-name descname"><span class="pre">BURST_MAX</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">15</span></span><a class="headerlink" href="#searx.botdetection.ip_limit.BURST_MAX" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Maximum requests from one IP in the <a class="reference internal" href="#searx.botdetection.ip_limit.BURST_WINDOW" title="searx.botdetection.ip_limit.BURST_WINDOW"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BURST_WINDOW</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_limit.BURST_MAX_SUSPICIOUS">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_limit.</span></span><span class="sig-name descname"><span class="pre">BURST_MAX_SUSPICIOUS</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">2</span></span><a class="headerlink" href="#searx.botdetection.ip_limit.BURST_MAX_SUSPICIOUS" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Maximum of suspicious requests from one IP in the <a class="reference internal" href="#searx.botdetection.ip_limit.BURST_WINDOW" title="searx.botdetection.ip_limit.BURST_WINDOW"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BURST_WINDOW</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_limit.LONG_WINDOW">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_limit.</span></span><span class="sig-name descname"><span class="pre">LONG_WINDOW</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">600</span></span><a class="headerlink" href="#searx.botdetection.ip_limit.LONG_WINDOW" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Time (sec) before the longer sliding window expires.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_limit.LONG_MAX">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_limit.</span></span><span class="sig-name descname"><span class="pre">LONG_MAX</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">150</span></span><a class="headerlink" href="#searx.botdetection.ip_limit.LONG_MAX" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Maximum requests from one IP in the <a class="reference internal" href="#searx.botdetection.ip_limit.LONG_WINDOW" title="searx.botdetection.ip_limit.LONG_WINDOW"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LONG_WINDOW</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_limit.LONG_MAX_SUSPICIOUS">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_limit.</span></span><span class="sig-name descname"><span class="pre">LONG_MAX_SUSPICIOUS</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">10</span></span><a class="headerlink" href="#searx.botdetection.ip_limit.LONG_MAX_SUSPICIOUS" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Maximum suspicious requests from one IP in the <a class="reference internal" href="#searx.botdetection.ip_limit.LONG_WINDOW" title="searx.botdetection.ip_limit.LONG_WINDOW"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LONG_WINDOW</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_limit.API_WINDOW">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_limit.</span></span><span class="sig-name descname"><span class="pre">API_WINDOW</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">3600</span></span><a class="headerlink" href="#searx.botdetection.ip_limit.API_WINDOW" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Time (sec) before sliding window for API requests (format != html) expires.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_limit.API_MAX">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_limit.</span></span><span class="sig-name descname"><span class="pre">API_MAX</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">4</span></span><a class="headerlink" href="#searx.botdetection.ip_limit.API_MAX" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Maximum requests from one IP in the <a class="reference internal" href="#searx.botdetection.ip_limit.API_WINDOW" title="searx.botdetection.ip_limit.API_WINDOW"><code class="xref py py-obj docutils literal notranslate"><span class="pre">API_WINDOW</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_limit.SUSPICIOUS_IP_WINDOW">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_limit.</span></span><span class="sig-name descname"><span class="pre">SUSPICIOUS_IP_WINDOW</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">2592000</span></span><a class="headerlink" href="#searx.botdetection.ip_limit.SUSPICIOUS_IP_WINDOW" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Time (sec) before sliding window for one suspicious IP expires.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.ip_limit.SUSPICIOUS_IP_MAX">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.ip_limit.</span></span><span class="sig-name descname"><span class="pre">SUSPICIOUS_IP_MAX</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">3</span></span><a class="headerlink" href="#searx.botdetection.ip_limit.SUSPICIOUS_IP_MAX" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Maximum requests from one suspicious IP in the <a class="reference internal" href="#searx.botdetection.ip_limit.SUSPICIOUS_IP_WINDOW" title="searx.botdetection.ip_limit.SUSPICIOUS_IP_WINDOW"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SUSPICIOUS_IP_WINDOW</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<section id="method-link-token">
|
||||
<span id="module-searx.botdetection.link_token"></span><h3>Method <code class="docutils literal notranslate"><span class="pre">link_token</span></code><a class="headerlink" href="#method-link-token" title="Link to this heading">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">link_token</span></code> method evaluates a request as <a class="reference internal" href="#searx.botdetection.link_token.is_suspicious" title="searx.botdetection.link_token.is_suspicious"><code class="xref py py-obj docutils literal notranslate"><span class="pre">suspicious</span></code></a> if the URL <code class="docutils literal notranslate"><span class="pre">/client<token>.css</span></code> is not requested by the
|
||||
client. By adding a random component (the token) in the URL, a bot can not send
|
||||
a ping by request a static URL.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>This method requires a valkey DB and needs a HTTP <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For">X-Forwarded-For</a> header.</p>
|
||||
</div>
|
||||
<p>To get in use of this method a flask URL route needs to be added:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nd">@app</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s1">'/client<token>.css'</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s1">'GET'</span><span class="p">,</span> <span class="s1">'POST'</span><span class="p">])</span>
|
||||
<span class="k">def</span><span class="w"> </span><span class="nf">client_token</span><span class="p">(</span><span class="n">token</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="n">link_token</span><span class="o">.</span><span class="n">ping</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">token</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">Response</span><span class="p">(</span><span class="s1">''</span><span class="p">,</span> <span class="n">mimetype</span><span class="o">=</span><span class="s1">'text/css'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>And in the HTML template from flask a stylesheet link is needed (the value of
|
||||
<code class="docutils literal notranslate"><span class="pre">link_token</span></code> comes from <a class="reference internal" href="#searx.botdetection.link_token.get_token" title="searx.botdetection.link_token.get_token"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_token</span></code></a>):</p>
|
||||
<div class="highlight-html notranslate"><div class="highlight"><pre><span></span><span class="p"><</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">"stylesheet"</span>
|
||||
<span class="na">href</span><span class="o">=</span><span class="s">"{{ url_for('client_token', token=link_token) }}"</span>
|
||||
<span class="na">type</span><span class="o">=</span><span class="s">"text/css"</span> <span class="p">></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.link_token.TOKEN_LIVE_TIME">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.link_token.</span></span><span class="sig-name descname"><span class="pre">TOKEN_LIVE_TIME</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">600</span></span><a class="headerlink" href="#searx.botdetection.link_token.TOKEN_LIVE_TIME" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Lifetime (sec) of limiter’s CSS token.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.link_token.PING_LIVE_TIME">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.link_token.</span></span><span class="sig-name descname"><span class="pre">PING_LIVE_TIME</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">3600</span></span><a class="headerlink" href="#searx.botdetection.link_token.PING_LIVE_TIME" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Lifetime (sec) of the ping-key from a client (request)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.link_token.PING_KEY">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.link_token.</span></span><span class="sig-name descname"><span class="pre">PING_KEY</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'SearXNG_limiter.ping'</span></span><a class="headerlink" href="#searx.botdetection.link_token.PING_KEY" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Prefix of all ping-keys generated by <a class="reference internal" href="#searx.botdetection.link_token.get_ping_key" title="searx.botdetection.link_token.get_ping_key"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_ping_key</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.link_token.TOKEN_KEY">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.link_token.</span></span><span class="sig-name descname"><span class="pre">TOKEN_KEY</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'SearXNG_limiter.token'</span></span><a class="headerlink" href="#searx.botdetection.link_token.TOKEN_KEY" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Key for which the current token is stored in the DB</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.link_token.is_suspicious">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.link_token.</span></span><span class="sig-name descname"><span class="pre">is_suspicious</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">network</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network" title="(in Python v3.14)"><span class="pre">IPv4Network</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Network" title="(in Python v3.14)"><span class="pre">IPv6Network</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://flask.palletsprojects.com/en/stable/api/#flask.Request" title="(in Flask v3.1.x)"><span class="pre">Request</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">renew</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/link_token.html#is_suspicious"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.link_token.is_suspicious" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Checks whether a valid ping is exists for this (client) network, if not
|
||||
this request is rated as <em>suspicious</em>. If a valid ping exists and argument
|
||||
<code class="docutils literal notranslate"><span class="pre">renew</span></code> is <code class="docutils literal notranslate"><span class="pre">True</span></code> the expire time of this ping is reset to
|
||||
<a class="reference internal" href="#searx.botdetection.link_token.PING_LIVE_TIME" title="searx.botdetection.link_token.PING_LIVE_TIME"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PING_LIVE_TIME</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.link_token.ping">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.link_token.</span></span><span class="sig-name descname"><span class="pre">ping</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://flask.palletsprojects.com/en/stable/api/#flask.Request" title="(in Flask v3.1.x)"><span class="pre">Request</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">token</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/link_token.html#ping"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.link_token.ping" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>This function is called by a request to URL <code class="docutils literal notranslate"><span class="pre">/client<token>.css</span></code>. If
|
||||
<code class="docutils literal notranslate"><span class="pre">token</span></code> is valid a <a class="reference internal" href="#searx.botdetection.link_token.PING_KEY" title="searx.botdetection.link_token.PING_KEY"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PING_KEY</span></code></a> for the client is stored in the DB.
|
||||
The expire time of this ping-key is <a class="reference internal" href="#searx.botdetection.link_token.PING_LIVE_TIME" title="searx.botdetection.link_token.PING_LIVE_TIME"><code class="xref py py-obj docutils literal notranslate"><span class="pre">PING_LIVE_TIME</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.link_token.get_ping_key">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.link_token.</span></span><span class="sig-name descname"><span class="pre">get_ping_key</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">network</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network" title="(in Python v3.14)"><span class="pre">IPv4Network</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Network" title="(in Python v3.14)"><span class="pre">IPv6Network</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://flask.palletsprojects.com/en/stable/api/#flask.Request" title="(in Flask v3.1.x)"><span class="pre">Request</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/botdetection/link_token.html#get_ping_key"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.link_token.get_ping_key" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Generates a hashed key that fits (more or less) to a <em>WEB-browser
|
||||
session</em> in a network.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.link_token.get_token">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.link_token.</span></span><span class="sig-name descname"><span class="pre">get_token</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/botdetection/link_token.html#get_token"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.link_token.get_token" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns current token. If there is no currently active token a new token
|
||||
is generated randomly and stored in the Valkey DB. Without without a
|
||||
database connection, string “12345678” is returned.</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference internal" href="#searx.botdetection.link_token.TOKEN_LIVE_TIME" title="searx.botdetection.link_token.TOKEN_LIVE_TIME"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TOKEN_LIVE_TIME</span></code></a></p></li>
|
||||
<li><p><a class="reference internal" href="#searx.botdetection.link_token.TOKEN_KEY" title="searx.botdetection.link_token.TOKEN_KEY"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TOKEN_KEY</span></code></a></p></li>
|
||||
</ul>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="module-searx.botdetection.http_accept">
|
||||
<span id="probe-http-headers"></span><span id="botdetection-probe-headers"></span><h2>Probe HTTP headers<a class="headerlink" href="#module-searx.botdetection.http_accept" title="Link to this heading">¶</a></h2>
|
||||
<section id="method-http-accept">
|
||||
<h3>Method <code class="docutils literal notranslate"><span class="pre">http_accept</span></code><a class="headerlink" href="#method-http-accept" title="Link to this heading">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">http_accept</span></code> method evaluates a request as the request of a bot if the
|
||||
<a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept">Accept</a> header ..</p>
|
||||
<ul class="simple">
|
||||
<li><p>did not contain <code class="docutils literal notranslate"><span class="pre">text/html</span></code></p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="method-http-accept-encoding">
|
||||
<span id="module-searx.botdetection.http_accept_encoding"></span><h3>Method <code class="docutils literal notranslate"><span class="pre">http_accept_encoding</span></code><a class="headerlink" href="#method-http-accept-encoding" title="Link to this heading">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">http_accept_encoding</span></code> method evaluates a request as the request of a
|
||||
bot if the <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding">Accept-Encoding</a> header ..</p>
|
||||
<ul class="simple">
|
||||
<li><p>did not contain <code class="docutils literal notranslate"><span class="pre">gzip</span></code> AND <code class="docutils literal notranslate"><span class="pre">deflate</span></code> (if both values are missed)</p></li>
|
||||
<li><p>did not contain <code class="docutils literal notranslate"><span class="pre">text/html</span></code></p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="method-http-accept-language">
|
||||
<span id="module-searx.botdetection.http_accept_language"></span><h3>Method <code class="docutils literal notranslate"><span class="pre">http_accept_language</span></code><a class="headerlink" href="#method-http-accept-language" title="Link to this heading">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">http_accept_language</span></code> method evaluates a request as the request of a bot
|
||||
if the <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent">Accept-Language</a> header is unset.</p>
|
||||
</section>
|
||||
<section id="method-http-connection">
|
||||
<span id="module-searx.botdetection.http_connection"></span><h3>Method <code class="docutils literal notranslate"><span class="pre">http_connection</span></code><a class="headerlink" href="#method-http-connection" title="Link to this heading">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">http_connection</span></code> method evaluates a request as the request of a bot if
|
||||
the <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Connection">Connection</a> header is set to <code class="docutils literal notranslate"><span class="pre">close</span></code>.</p>
|
||||
</section>
|
||||
<section id="method-http-user-agent">
|
||||
<span id="module-searx.botdetection.http_user_agent"></span><h3>Method <code class="docutils literal notranslate"><span class="pre">http_user_agent</span></code><a class="headerlink" href="#method-http-user-agent" title="Link to this heading">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">http_user_agent</span></code> method evaluates a request as the request of a bot if
|
||||
the <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent">User-Agent</a> header is unset or matches the regular expression
|
||||
<a class="reference internal" href="#searx.botdetection.http_user_agent.USER_AGENT" title="searx.botdetection.http_user_agent.USER_AGENT"><code class="xref py py-obj docutils literal notranslate"><span class="pre">USER_AGENT</span></code></a>.</p>
|
||||
</section>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.http_user_agent.USER_AGENT">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.http_user_agent.</span></span><span class="sig-name descname"><span class="pre">USER_AGENT</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'(unknown|[Cc][Uu][Rr][Ll]|[wW]get|Scrapy|splash|JavaFX|FeedFetcher|python-requests|Go-http-client|Java|Jakarta|okhttp|HttpClient|Jersey|Python|libwww-perl|Ruby|SynHttpClient|UniversalFeedParser|Googlebot|GoogleImageProxy|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo!</span> <span class="pre">Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James</span> <span class="pre">BOT|Sogou|Abonti|Pixray|Spinn3r|SemrushBot|Exabot|ZmEu|BLEXBot|bitlybot|HeadlessChrome|Mozilla/5\\.0\\</span> <span class="pre">\\(compatible;\\</span> <span class="pre">Farside/0\\.1\\.0;\\</span> <span class="pre">\\+https://farside\\.link\\)|.*PetalBot.*)'</span></span><a class="headerlink" href="#searx.botdetection.http_user_agent.USER_AGENT" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Regular expression that matches to <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent">User-Agent</a> from known <em>bots</em></p>
|
||||
</dd></dl>
|
||||
|
||||
<section id="method-http-sec-fetch">
|
||||
<span id="module-searx.botdetection.http_sec_fetch"></span><h3>Method <code class="docutils literal notranslate"><span class="pre">http_sec_fetch</span></code><a class="headerlink" href="#method-http-sec-fetch" title="Link to this heading">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">http_sec_fetch</span></code> method protect resources from web attacks with <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Glossary/Fetch_metadata_request_header">Fetch
|
||||
Metadata</a>. A request is filtered out in case of:</p>
|
||||
<ul class="simple">
|
||||
<li><p>http header <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/Request/mode">Sec-Fetch-Mode</a> is invalid</p></li>
|
||||
<li><p>http header <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/API/Request/destination">Sec-Fetch-Dest</a> is invalid</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.http_sec_fetch.is_browser_supported">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.botdetection.http_sec_fetch.</span></span><span class="sig-name descname"><span class="pre">is_browser_supported</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user_agent</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/searx/botdetection/http_sec_fetch.html#is_browser_supported"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.http_sec_fetch.is_browser_supported" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Check if the browser supports Sec-Fetch headers.</p>
|
||||
<p><a class="reference external" href="https://caniuse.com/mdn-http_headers_sec-fetch-dest">https://caniuse.com/mdn-http_headers_sec-fetch-dest</a>
|
||||
<a class="reference external" href="https://caniuse.com/mdn-http_headers_sec-fetch-mode">https://caniuse.com/mdn-http_headers_sec-fetch-mode</a>
|
||||
<a class="reference external" href="https://caniuse.com/mdn-http_headers_sec-fetch-site">https://caniuse.com/mdn-http_headers_sec-fetch-site</a></p>
|
||||
<p>Supported browsers:
|
||||
- Chrome >= 80
|
||||
- Firefox >= 90
|
||||
- Safari >= 16.4
|
||||
- Edge (mirrors Chrome)
|
||||
- Opera (mirrors Chrome)</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="module-searx.botdetection.config">
|
||||
<span id="config"></span><span id="botdetection-config"></span><h2>Config<a class="headerlink" href="#module-searx.botdetection.config" title="Link to this heading">¶</a></h2>
|
||||
<p>Configuration class <a class="reference internal" href="#searx.botdetection.config.Config" title="searx.botdetection.config.Config"><code class="xref py py-class docutils literal notranslate"><span class="pre">Config</span></code></a> with deep-update, schema validation
|
||||
and deprecated names.</p>
|
||||
<p>The <a class="reference internal" href="#searx.botdetection.config.Config" title="searx.botdetection.config.Config"><code class="xref py py-class docutils literal notranslate"><span class="pre">Config</span></code></a> class implements a configuration that is based on
|
||||
structured dictionaries. The configuration schema is defined in a dictionary
|
||||
structure and the configuration data is given in a dictionary structure.</p>
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.config.Config">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.botdetection.config.</span></span><span class="sig-name descname"><span class="pre">Config</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cfg_schema</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">deprecated</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/config.html#Config"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.config.Config" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Base class used for configuration</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.config.Config.validate">
|
||||
<span class="sig-name descname"><span class="pre">validate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cfg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/config.html#Config.validate"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.config.Config.validate" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Validation of dictionary <code class="docutils literal notranslate"><span class="pre">cfg</span></code> on <code class="xref py py-obj docutils literal notranslate"><span class="pre">Config.SCHEMA</span></code>.
|
||||
Validation is done by <a class="reference internal" href="#searx.botdetection.config.Config.validate" title="searx.botdetection.config.Config.validate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">validate</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.config.Config.update">
|
||||
<span class="sig-name descname"><span class="pre">update</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">upd_cfg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/config.html#Config.update"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.config.Config.update" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Update this configuration by <code class="docutils literal notranslate"><span class="pre">upd_cfg</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.config.Config.default">
|
||||
<span class="sig-name descname"><span class="pre">default</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/config.html#Config.default"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.config.Config.default" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns default value of field <code class="docutils literal notranslate"><span class="pre">name</span></code> in <code class="docutils literal notranslate"><span class="pre">self.cfg_schema</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.config.Config.get">
|
||||
<span class="sig-name descname"><span class="pre">get</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre"><UNSET></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">replace</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></span><a class="reference internal" href="../_modules/searx/botdetection/config.html#Config.get"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.config.Config.get" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns the value to which <code class="docutils literal notranslate"><span class="pre">name</span></code> points in the configuration.</p>
|
||||
<p>If there is no such <code class="docutils literal notranslate"><span class="pre">name</span></code> in the config and the <code class="docutils literal notranslate"><span class="pre">default</span></code> is
|
||||
<code class="xref py py-obj docutils literal notranslate"><span class="pre">UNSET</span></code>, a <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#KeyError" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">KeyError</span></code></a> is raised.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.config.Config.set">
|
||||
<span class="sig-name descname"><span class="pre">set</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">val</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/config.html#Config.set"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.config.Config.set" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Set the value to which <code class="docutils literal notranslate"><span class="pre">name</span></code> points in the configuration.</p>
|
||||
<p>If there is no such <code class="docutils literal notranslate"><span class="pre">name</span></code> in the config, a <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#KeyError" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">KeyError</span></code></a> is
|
||||
raised.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.config.Config.path">
|
||||
<span class="sig-name descname"><span class="pre">path</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre"><UNSET></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/config.html#Config.path"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.config.Config.path" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Get a <a class="reference external" href="https://docs.python.org/3/library/pathlib.html#pathlib.Path" title="(in Python v3.14)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pathlib.Path</span></code></a> object from a config string.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.config.Config.pyobj">
|
||||
<span class="sig-name descname"><span class="pre">pyobj</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre"><UNSET></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/config.html#Config.pyobj"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.config.Config.pyobj" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Get python object referred by full qualiffied name (FQN) in the config
|
||||
string.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.botdetection.config.SchemaIssue">
|
||||
<span class="property"><span class="k"><span class="pre">final</span></span><span class="w"> </span><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.botdetection.config.</span></span><span class="sig-name descname"><span class="pre">SchemaIssue</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">level</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Literal" title="(in Python v3.14)"><span class="pre">Literal</span></a><span class="p"><span class="pre">[</span></span><span class="s"><span class="pre">'warn'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'invalid'</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/botdetection/config.html#SchemaIssue"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.botdetection.config.SchemaIssue" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Exception to store and/or raise a message from a schema issue.</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.cache.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Caches</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="searx.babel_extract.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Custom message extractor (i18n)</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Bot Detection</a><ul>
|
||||
<li><a class="reference internal" href="#searx.botdetection.get_network"><code class="docutils literal notranslate"><span class="pre">get_network()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.too_many_requests"><code class="docutils literal notranslate"><span class="pre">too_many_requests()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ProxyFix"><code class="docutils literal notranslate"><span class="pre">ProxyFix</span></code></a></li>
|
||||
<li><a class="reference internal" href="#module-searx.botdetection.ip_lists">IP lists</a><ul>
|
||||
<li><a class="reference internal" href="#method-ip-lists">Method <code class="docutils literal notranslate"><span class="pre">ip_lists</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_lists.SEARXNG_ORG"><code class="docutils literal notranslate"><span class="pre">SEARXNG_ORG</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_lists.pass_ip"><code class="docutils literal notranslate"><span class="pre">pass_ip()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_lists.block_ip"><code class="docutils literal notranslate"><span class="pre">block_ip()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#module-searx.botdetection.ip_limit">Rate limit</a><ul>
|
||||
<li><a class="reference internal" href="#method-ip-limit">Method <code class="docutils literal notranslate"><span class="pre">ip_limit</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_limit.BURST_WINDOW"><code class="docutils literal notranslate"><span class="pre">BURST_WINDOW</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_limit.BURST_MAX"><code class="docutils literal notranslate"><span class="pre">BURST_MAX</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_limit.BURST_MAX_SUSPICIOUS"><code class="docutils literal notranslate"><span class="pre">BURST_MAX_SUSPICIOUS</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_limit.LONG_WINDOW"><code class="docutils literal notranslate"><span class="pre">LONG_WINDOW</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_limit.LONG_MAX"><code class="docutils literal notranslate"><span class="pre">LONG_MAX</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_limit.LONG_MAX_SUSPICIOUS"><code class="docutils literal notranslate"><span class="pre">LONG_MAX_SUSPICIOUS</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_limit.API_WINDOW"><code class="docutils literal notranslate"><span class="pre">API_WINDOW</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_limit.API_MAX"><code class="docutils literal notranslate"><span class="pre">API_MAX</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_limit.SUSPICIOUS_IP_WINDOW"><code class="docutils literal notranslate"><span class="pre">SUSPICIOUS_IP_WINDOW</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.ip_limit.SUSPICIOUS_IP_MAX"><code class="docutils literal notranslate"><span class="pre">SUSPICIOUS_IP_MAX</span></code></a></li>
|
||||
<li><a class="reference internal" href="#method-link-token">Method <code class="docutils literal notranslate"><span class="pre">link_token</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.link_token.TOKEN_LIVE_TIME"><code class="docutils literal notranslate"><span class="pre">TOKEN_LIVE_TIME</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.link_token.PING_LIVE_TIME"><code class="docutils literal notranslate"><span class="pre">PING_LIVE_TIME</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.link_token.PING_KEY"><code class="docutils literal notranslate"><span class="pre">PING_KEY</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.link_token.TOKEN_KEY"><code class="docutils literal notranslate"><span class="pre">TOKEN_KEY</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.link_token.is_suspicious"><code class="docutils literal notranslate"><span class="pre">is_suspicious()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.link_token.ping"><code class="docutils literal notranslate"><span class="pre">ping()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.link_token.get_ping_key"><code class="docutils literal notranslate"><span class="pre">get_ping_key()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.link_token.get_token"><code class="docutils literal notranslate"><span class="pre">get_token()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#module-searx.botdetection.http_accept">Probe HTTP headers</a><ul>
|
||||
<li><a class="reference internal" href="#method-http-accept">Method <code class="docutils literal notranslate"><span class="pre">http_accept</span></code></a></li>
|
||||
<li><a class="reference internal" href="#method-http-accept-encoding">Method <code class="docutils literal notranslate"><span class="pre">http_accept_encoding</span></code></a></li>
|
||||
<li><a class="reference internal" href="#method-http-accept-language">Method <code class="docutils literal notranslate"><span class="pre">http_accept_language</span></code></a></li>
|
||||
<li><a class="reference internal" href="#method-http-connection">Method <code class="docutils literal notranslate"><span class="pre">http_connection</span></code></a></li>
|
||||
<li><a class="reference internal" href="#method-http-user-agent">Method <code class="docutils literal notranslate"><span class="pre">http_user_agent</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.http_user_agent.USER_AGENT"><code class="docutils literal notranslate"><span class="pre">USER_AGENT</span></code></a></li>
|
||||
<li><a class="reference internal" href="#method-http-sec-fetch">Method <code class="docutils literal notranslate"><span class="pre">http_sec_fetch</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.http_sec_fetch.is_browser_supported"><code class="docutils literal notranslate"><span class="pre">is_browser_supported()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#module-searx.botdetection.config">Config</a><ul>
|
||||
<li><a class="reference internal" href="#searx.botdetection.config.Config"><code class="docutils literal notranslate"><span class="pre">Config</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.botdetection.config.Config.validate"><code class="docutils literal notranslate"><span class="pre">Config.validate()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.config.Config.update"><code class="docutils literal notranslate"><span class="pre">Config.update()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.config.Config.default"><code class="docutils literal notranslate"><span class="pre">Config.default()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.config.Config.get"><code class="docutils literal notranslate"><span class="pre">Config.get()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.config.Config.set"><code class="docutils literal notranslate"><span class="pre">Config.set()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.config.Config.path"><code class="docutils literal notranslate"><span class="pre">Config.path()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.config.Config.pyobj"><code class="docutils literal notranslate"><span class="pre">Config.pyobj()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.botdetection.config.SchemaIssue"><code class="docutils literal notranslate"><span class="pre">SchemaIssue</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,820 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="SearXNG Exceptions" href="searx.exceptions.html"><link rel="prev" title="Bot Detection" href="searx.botdetection.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>Caches - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.cache.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.cache.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-searx.cache">
|
||||
<span id="caches"></span><span id="searx-cache"></span><h1>Caches<a class="headerlink" href="#module-searx.cache" title="Link to this heading">¶</a></h1>
|
||||
<p>Implementation of caching solutions.</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference internal" href="#searx.cache.ExpireCache" title="searx.cache.ExpireCache"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.cache.ExpireCache</span></code></a> and its <a class="reference internal" href="#searx.cache.ExpireCacheCfg" title="searx.cache.ExpireCacheCfg"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.cache.ExpireCacheCfg</span></code></a></p></li>
|
||||
</ul>
|
||||
<hr class="docutils" />
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheCfg">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.cache.</span></span><span class="sig-name descname"><span class="pre">ExpireCacheCfg</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">db_url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">MAX_VALUE_LEN</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">10240</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">MAXHOLD_TIME</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">604800</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">MAINTENANCE_PERIOD</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">3600</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">MAINTENANCE_MODE</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Literal" title="(in Python v3.14)"><span class="pre">Literal</span></a><span class="p"><span class="pre">[</span></span><span class="s"><span class="pre">'auto'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'off'</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'auto'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">password</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bytes" title="(in Python v3.14)"><span class="pre">bytes</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">b'ultrasecretkey'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheCfg"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheCfg" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Configuration of a <a class="reference internal" href="#searx.cache.ExpireCache" title="searx.cache.ExpireCache"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCache</span></code></a> cache.</p>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheCfg.name">
|
||||
<span class="sig-name descname"><span class="pre">name</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.cache.ExpireCacheCfg.name" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Name of the cache.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheCfg.db_url">
|
||||
<span class="sig-name descname"><span class="pre">db_url</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.cache.ExpireCacheCfg.db_url" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>URL of the SQLite DB, the path to the database file. If unset a default
|
||||
DB will be created in <cite>/tmp/sxng_cache_{self.name}.db</cite></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheCfg.MAX_VALUE_LEN">
|
||||
<span class="sig-name descname"><span class="pre">MAX_VALUE_LEN</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><a class="headerlink" href="#searx.cache.ExpireCacheCfg.MAX_VALUE_LEN" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Max length of a <em>serialized</em> value.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheCfg.MAXHOLD_TIME">
|
||||
<span class="sig-name descname"><span class="pre">MAXHOLD_TIME</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><a class="headerlink" href="#searx.cache.ExpireCacheCfg.MAXHOLD_TIME" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Hold time (default in sec.), after which a value is removed from the cache.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheCfg.MAINTENANCE_PERIOD">
|
||||
<span class="sig-name descname"><span class="pre">MAINTENANCE_PERIOD</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><a class="headerlink" href="#searx.cache.ExpireCacheCfg.MAINTENANCE_PERIOD" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Maintenance period in seconds / when <a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAINTENANCE_MODE" title="searx.cache.ExpireCacheCfg.MAINTENANCE_MODE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MAINTENANCE_MODE</span></code></a> is set to
|
||||
<code class="docutils literal notranslate"><span class="pre">auto</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheCfg.MAINTENANCE_MODE">
|
||||
<span class="sig-name descname"><span class="pre">MAINTENANCE_MODE</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Literal" title="(in Python v3.14)"><span class="pre">Literal</span></a><span class="p"><span class="pre">[</span></span><span class="s"><span class="pre">'auto'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'off'</span></span><span class="p"><span class="pre">]</span></span></span><a class="headerlink" href="#searx.cache.ExpireCacheCfg.MAINTENANCE_MODE" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Type of maintenance mode</p>
|
||||
<dl class="simple">
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">auto</span></code>:</dt><dd><p>Maintenance is carried out automatically as part of the maintenance
|
||||
intervals (<a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAINTENANCE_PERIOD" title="searx.cache.ExpireCacheCfg.MAINTENANCE_PERIOD"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MAINTENANCE_PERIOD</span></code></a>); no external process is required.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">off</span></code>:</dt><dd><p>Maintenance is switched off and must be carried out by an external process
|
||||
if required.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheCfg.password">
|
||||
<span class="sig-name descname"><span class="pre">password</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bytes" title="(in Python v3.14)"><span class="pre">bytes</span></a></span><a class="headerlink" href="#searx.cache.ExpireCacheCfg.password" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Password used by <a class="reference internal" href="#searx.cache.ExpireCache.secret_hash" title="searx.cache.ExpireCache.secret_hash"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCache.secret_hash</span></code></a>.</p>
|
||||
<p>The default password is taken from <a class="reference internal" href="../admin/settings/settings_server.html#server-secret-key"><span class="std std-ref">secret_key</span></a>.
|
||||
When the password is changed, the hashed keys in the cache can no longer be
|
||||
used, which is why all values in the cache are deleted when the password is
|
||||
changed.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheStats">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.cache.</span></span><span class="sig-name descname"><span class="pre">ExpireCacheStats</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cached_items</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.14)"><span class="pre">tuple</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheStats"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheStats" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Dataclass which provides information on the status of the cache.</p>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheStats.cached_items">
|
||||
<span class="sig-name descname"><span class="pre">cached_items</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.14)"><span class="pre">tuple</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span><a class="headerlink" href="#searx.cache.ExpireCacheStats.cached_items" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Values in the cache mapped by context name.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCache">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.cache.</span></span><span class="sig-name descname"><span class="pre">ExpireCache</span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCache"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCache" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Abstract base class for the implementation of a key/value cache
|
||||
with expire date.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCache.set">
|
||||
<span class="property"><span class="k"><span class="pre">abstractmethod</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">set</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">expire</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">ctx</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCache.set"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCache.set" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Set <em>key</em> to <em>value</em>. To set a timeout on key use argument
|
||||
<code class="docutils literal notranslate"><span class="pre">expire</span></code> (in sec.). If expire is unset the default is taken from
|
||||
<a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAXHOLD_TIME" title="searx.cache.ExpireCacheCfg.MAXHOLD_TIME"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheCfg.MAXHOLD_TIME</span></code></a>. After the timeout has expired,
|
||||
the key will automatically be deleted.</p>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">ctx</span></code> argument specifies the context of the <code class="docutils literal notranslate"><span class="pre">key</span></code>. A key is
|
||||
only unique in its context.</p>
|
||||
<p>The concrete implementations of this abstraction determine how the
|
||||
context is mapped in the connected database. In SQL databases, for
|
||||
example, the context is a DB table or in a Key/Value DB it could be
|
||||
a prefix for the key.</p>
|
||||
<p>If the context is not specified (the default is <code class="docutils literal notranslate"><span class="pre">None</span></code>) then a
|
||||
default context should be used, e.g. a default table for SQL databases
|
||||
or a default prefix in a Key/Value DB.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCache.get">
|
||||
<span class="property"><span class="k"><span class="pre">abstractmethod</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">get</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ctx</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCache.get"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCache.get" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Return <em>value</em> of <em>key</em>. If key is unset, <code class="docutils literal notranslate"><span class="pre">None</span></code> is returned.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCache.maintenance">
|
||||
<span class="property"><span class="k"><span class="pre">abstractmethod</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">maintenance</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">force</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">truncate</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCache.maintenance"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCache.maintenance" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Performs maintenance on the cache.</p>
|
||||
<dl class="simple">
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">force</span></code>:</dt><dd><p>Maintenance should be carried out even if the maintenance interval has
|
||||
not yet been reached.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">truncate</span></code>:</dt><dd><p>Truncate the entire cache, which is necessary, for example, if the
|
||||
password has changed.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCache.state">
|
||||
<span class="property"><span class="k"><span class="pre">abstractmethod</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">state</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="#searx.cache.ExpireCacheStats" title="searx.cache.ExpireCacheStats"><span class="pre">ExpireCacheStats</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCache.state"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCache.state" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a <a class="reference internal" href="#searx.cache.ExpireCacheStats" title="searx.cache.ExpireCacheStats"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheStats</span></code></a>, which provides information
|
||||
about the status of the cache.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCache.build_cache">
|
||||
<span class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">build_cache</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cfg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#searx.cache.ExpireCacheCfg" title="searx.cache.ExpireCacheCfg"><span class="pre">ExpireCacheCfg</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="#searx.cache.ExpireCacheSQLite" title="searx.cache.ExpireCacheSQLite"><span class="pre">ExpireCacheSQLite</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCache.build_cache"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCache.build_cache" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Factory to build a caching instance.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>Currently, only the SQLite adapter is available, but other database
|
||||
types could be implemented in the future, e.g. a Valkey (Redis)
|
||||
adapter.</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCache.normalize_name">
|
||||
<span class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">normalize_name</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCache.normalize_name"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCache.normalize_name" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a normalized name that can be used as a file name or as a SQL
|
||||
table name (is used, for example, to normalize the context name).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCache.secret_hash">
|
||||
<span class="sig-name descname"><span class="pre">secret_hash</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bytes" title="(in Python v3.14)"><span class="pre">bytes</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCache.secret_hash"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCache.secret_hash" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Creates a hash of the argument <code class="docutils literal notranslate"><span class="pre">name</span></code>. The hash value is formed
|
||||
from the <code class="docutils literal notranslate"><span class="pre">name</span></code> combined with the <a class="reference internal" href="#searx.cache.ExpireCacheCfg.password" title="searx.cache.ExpireCacheCfg.password"><code class="xref py py-obj docutils literal notranslate"><span class="pre">password</span></code></a>. Can be used, for example, to make the
|
||||
<code class="docutils literal notranslate"><span class="pre">key</span></code> stored in the DB unreadable for third parties.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.cache.</span></span><span class="sig-name descname"><span class="pre">ExpireCacheSQLite</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cfg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#searx.cache.ExpireCacheCfg" title="searx.cache.ExpireCacheCfg"><span class="pre">ExpireCacheCfg</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheSQLite"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheSQLite" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Cache that manages key/value pairs in a SQLite DB. The DB model in the
|
||||
SQLite DB is implemented in abstract class <a class="reference internal" href="searx.sqlitedb.html#searx.sqlitedb.SQLiteAppl" title="searx.sqlitedb.SQLiteAppl"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLiteAppl</span></code></a>.</p>
|
||||
<p>The following configurations are required / supported:</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference internal" href="#searx.cache.ExpireCacheCfg.db_url" title="searx.cache.ExpireCacheCfg.db_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheCfg.db_url</span></code></a></p></li>
|
||||
<li><p><a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAXHOLD_TIME" title="searx.cache.ExpireCacheCfg.MAXHOLD_TIME"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheCfg.MAXHOLD_TIME</span></code></a></p></li>
|
||||
<li><p><a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAINTENANCE_PERIOD" title="searx.cache.ExpireCacheCfg.MAINTENANCE_PERIOD"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheCfg.MAINTENANCE_PERIOD</span></code></a></p></li>
|
||||
<li><p><a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAINTENANCE_MODE" title="searx.cache.ExpireCacheCfg.MAINTENANCE_MODE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheCfg.MAINTENANCE_MODE</span></code></a></p></li>
|
||||
</ul>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.DB_SCHEMA">
|
||||
<span class="sig-name descname"><span class="pre">DB_SCHEMA</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">1</span></span><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.DB_SCHEMA" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>As soon as changes are made to the DB schema, the version number must be
|
||||
increased. Changes to the version number require the DB to be recreated (or
|
||||
migrated / if an migration path exists and is implemented).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.init">
|
||||
<span class="sig-name descname"><span class="pre">init</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">conn</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection" title="(in Python v3.14)"><span class="pre">Connection</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheSQLite.init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.init" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Initializes the DB schema and properties, is only executed once even
|
||||
if called several times.</p>
|
||||
<p>If the initialization has not yet taken place, it is carried out and a
|
||||
<cite>True</cite> is returned to the caller at the end. If the initialization has
|
||||
already been carried out in the past, <cite>False</cite> is returned.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.maintenance">
|
||||
<span class="sig-name descname"><span class="pre">maintenance</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">force</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">truncate</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheSQLite.maintenance"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.maintenance" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Performs maintenance on the cache.</p>
|
||||
<dl class="simple">
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">force</span></code>:</dt><dd><p>Maintenance should be carried out even if the maintenance interval has
|
||||
not yet been reached.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">truncate</span></code>:</dt><dd><p>Truncate the entire cache, which is necessary, for example, if the
|
||||
password has changed.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.create_table">
|
||||
<span class="sig-name descname"><span class="pre">create_table</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">table</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheSQLite.create_table"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.create_table" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Create DB <code class="docutils literal notranslate"><span class="pre">table</span></code> if it has not yet been created, no recreates are
|
||||
initiated if the table already exists.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py property">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.table_names">
|
||||
<span class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">table_names</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.table_names" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>List of key/value tables already created in the DB.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py property">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.next_maintenance_time">
|
||||
<span class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">next_maintenance_time</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.next_maintenance_time" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns (unix epoch) time of the next maintenance.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.set">
|
||||
<span class="sig-name descname"><span class="pre">set</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">expire</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">ctx</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheSQLite.set"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.set" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Set key/value in DB table given by argument <code class="docutils literal notranslate"><span class="pre">ctx</span></code>. If expire is
|
||||
unset the default is taken from <a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAXHOLD_TIME" title="searx.cache.ExpireCacheCfg.MAXHOLD_TIME"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheCfg.MAXHOLD_TIME</span></code></a>.
|
||||
If <code class="docutils literal notranslate"><span class="pre">ctx</span></code> argument is <code class="docutils literal notranslate"><span class="pre">None</span></code> (the default), a table name is
|
||||
generated from the <a class="reference internal" href="#searx.cache.ExpireCacheCfg.name" title="searx.cache.ExpireCacheCfg.name"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheCfg.name</span></code></a>. If DB table does not
|
||||
exists, it will be created (on demand) by <a class="reference internal" href="#searx.cache.ExpireCacheSQLite.create_table" title="searx.cache.ExpireCacheSQLite.create_table"><code class="xref py py-obj docutils literal notranslate"><span class="pre">self.create_table</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.setmany">
|
||||
<span class="sig-name descname"><span class="pre">setmany</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">opt_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.14)"><span class="pre">tuple</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ctx</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheSQLite.setmany"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.setmany" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Efficient bootload of the cache from a list of options. The list
|
||||
contains tuples with the arguments described in
|
||||
<a class="reference internal" href="#searx.cache.ExpireCacheSQLite.set" title="searx.cache.ExpireCacheSQLite.set"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheSQLite.set</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.get">
|
||||
<span class="sig-name descname"><span class="pre">get</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ctx</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheSQLite.get"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.get" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Get value of <code class="docutils literal notranslate"><span class="pre">key</span></code> from table given by argument <code class="docutils literal notranslate"><span class="pre">ctx</span></code>. If
|
||||
<code class="docutils literal notranslate"><span class="pre">ctx</span></code> argument is <code class="docutils literal notranslate"><span class="pre">None</span></code> (the default), a table name is generated
|
||||
from the <a class="reference internal" href="#searx.cache.ExpireCacheCfg.name" title="searx.cache.ExpireCacheCfg.name"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheCfg.name</span></code></a>. If <code class="docutils literal notranslate"><span class="pre">key</span></code> not exists (in
|
||||
table), the <code class="docutils literal notranslate"><span class="pre">default</span></code> value is returned.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.pairs">
|
||||
<span class="sig-name descname"><span class="pre">pairs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ctx</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator" title="(in Python v3.14)"><span class="pre">Iterator</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.14)"><span class="pre">tuple</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheSQLite.pairs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.pairs" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Iterate over key/value pairs from table given by argument <code class="docutils literal notranslate"><span class="pre">ctx</span></code>.
|
||||
If <code class="docutils literal notranslate"><span class="pre">ctx</span></code> argument is <code class="docutils literal notranslate"><span class="pre">None</span></code> (the default), a table name is
|
||||
generated from the <a class="reference internal" href="#searx.cache.ExpireCacheCfg.name" title="searx.cache.ExpireCacheCfg.name"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheCfg.name</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.cache.ExpireCacheSQLite.state">
|
||||
<span class="sig-name descname"><span class="pre">state</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="#searx.cache.ExpireCacheStats" title="searx.cache.ExpireCacheStats"><span class="pre">ExpireCacheStats</span></a></span></span><a class="reference internal" href="../_modules/searx/cache.html#ExpireCacheSQLite.state"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.cache.ExpireCacheSQLite.state" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a <a class="reference internal" href="#searx.cache.ExpireCacheStats" title="searx.cache.ExpireCacheStats"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ExpireCacheStats</span></code></a>, which provides information
|
||||
about the status of the cache.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.exceptions.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">SearXNG Exceptions</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="searx.botdetection.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Bot Detection</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Caches</a><ul>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheCfg"><code class="docutils literal notranslate"><span class="pre">ExpireCacheCfg</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheCfg.name"><code class="docutils literal notranslate"><span class="pre">ExpireCacheCfg.name</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheCfg.db_url"><code class="docutils literal notranslate"><span class="pre">ExpireCacheCfg.db_url</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAX_VALUE_LEN"><code class="docutils literal notranslate"><span class="pre">ExpireCacheCfg.MAX_VALUE_LEN</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAXHOLD_TIME"><code class="docutils literal notranslate"><span class="pre">ExpireCacheCfg.MAXHOLD_TIME</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAINTENANCE_PERIOD"><code class="docutils literal notranslate"><span class="pre">ExpireCacheCfg.MAINTENANCE_PERIOD</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheCfg.MAINTENANCE_MODE"><code class="docutils literal notranslate"><span class="pre">ExpireCacheCfg.MAINTENANCE_MODE</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheCfg.password"><code class="docutils literal notranslate"><span class="pre">ExpireCacheCfg.password</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheStats"><code class="docutils literal notranslate"><span class="pre">ExpireCacheStats</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheStats.cached_items"><code class="docutils literal notranslate"><span class="pre">ExpireCacheStats.cached_items</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCache"><code class="docutils literal notranslate"><span class="pre">ExpireCache</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCache.set"><code class="docutils literal notranslate"><span class="pre">ExpireCache.set()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCache.get"><code class="docutils literal notranslate"><span class="pre">ExpireCache.get()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCache.maintenance"><code class="docutils literal notranslate"><span class="pre">ExpireCache.maintenance()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCache.state"><code class="docutils literal notranslate"><span class="pre">ExpireCache.state()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCache.build_cache"><code class="docutils literal notranslate"><span class="pre">ExpireCache.build_cache()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCache.normalize_name"><code class="docutils literal notranslate"><span class="pre">ExpireCache.normalize_name()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCache.secret_hash"><code class="docutils literal notranslate"><span class="pre">ExpireCache.secret_hash()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.DB_SCHEMA"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.DB_SCHEMA</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.init"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.init()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.maintenance"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.maintenance()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.create_table"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.create_table()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.table_names"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.table_names</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.next_maintenance_time"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.next_maintenance_time</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.set"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.set()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.setmany"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.setmany()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.get"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.get()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.pairs"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.pairs()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.cache.ExpireCacheSQLite.state"><code class="docutils literal notranslate"><span class="pre">ExpireCacheSQLite.state()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,626 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Favicons (source)" href="searx.favicons.html"><link rel="prev" title="Caches" href="searx.cache.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>SearXNG Exceptions - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.exceptions.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.exceptions.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-searx.exceptions">
|
||||
<span id="searxng-exceptions"></span><span id="searx-exceptions"></span><h1>SearXNG Exceptions<a class="headerlink" href="#module-searx.exceptions" title="Link to this heading">¶</a></h1>
|
||||
<p>Exception types raised by SearXNG modules.</p>
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxException">
|
||||
<span class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxException</span></span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Base SearXNG exception.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxParameterException">
|
||||
<span class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxParameterException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxParameterException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxParameterException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Raised when query miss a required parameter</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxSettingsException">
|
||||
<span class="property"><span class="k"><span class="pre">final</span></span><span class="w"> </span><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxSettingsException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.14)"><span class="pre">Exception</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">filename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxSettingsException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxSettingsException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Error while loading the settings</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxEngineException">
|
||||
<span class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxEngineException</span></span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxEngineException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxEngineException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Error inside an engine</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxXPathSyntaxException">
|
||||
<span class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxXPathSyntaxException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath_spec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">XPath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">message</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxXPathSyntaxException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxXPathSyntaxException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Syntax error in a XPATH</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxEngineResponseException">
|
||||
<span class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxEngineResponseException</span></span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxEngineResponseException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxEngineResponseException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Impossible to parse the result of an engine</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxEngineAPIException">
|
||||
<span class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxEngineAPIException</span></span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxEngineAPIException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxEngineAPIException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>The website has returned an application error</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxEngineAccessDeniedException">
|
||||
<span class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxEngineAccessDeniedException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">suspended_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">message</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'Access</span> <span class="pre">denied'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxEngineAccessDeniedException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxEngineAccessDeniedException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>The website is blocking the access</p>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxEngineAccessDeniedException.SUSPEND_TIME_SETTING">
|
||||
<span class="sig-name descname"><span class="pre">SUSPEND_TIME_SETTING</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'search.suspended_times.SearxEngineAccessDenied'</span></span><a class="headerlink" href="#searx.exceptions.SearxEngineAccessDeniedException.SUSPEND_TIME_SETTING" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>This settings contains the default suspended time (default 86400 sec / 1
|
||||
day).</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxEngineCaptchaException">
|
||||
<span class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxEngineCaptchaException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">suspended_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">message</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'CAPTCHA'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxEngineCaptchaException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxEngineCaptchaException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>The website has returned a CAPTCHA.</p>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxEngineCaptchaException.SUSPEND_TIME_SETTING">
|
||||
<span class="sig-name descname"><span class="pre">SUSPEND_TIME_SETTING</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'search.suspended_times.SearxEngineCaptcha'</span></span><a class="headerlink" href="#searx.exceptions.SearxEngineCaptchaException.SUSPEND_TIME_SETTING" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>This settings contains the default suspended time (default 86400 sec / 1
|
||||
day).</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxEngineTooManyRequestsException">
|
||||
<span class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxEngineTooManyRequestsException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">suspended_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">message</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'Too</span> <span class="pre">many</span> <span class="pre">request'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxEngineTooManyRequestsException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxEngineTooManyRequestsException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>The website has returned a Too Many Request status code</p>
|
||||
<p>By default, SearXNG stops sending requests to this engine for 1 hour.</p>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxEngineTooManyRequestsException.SUSPEND_TIME_SETTING">
|
||||
<span class="sig-name descname"><span class="pre">SUSPEND_TIME_SETTING</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'search.suspended_times.SearxEngineTooManyRequests'</span></span><a class="headerlink" href="#searx.exceptions.SearxEngineTooManyRequestsException.SUSPEND_TIME_SETTING" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>This settings contains the default suspended time (default 3660 sec / 1
|
||||
hour).</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py exception">
|
||||
<dt class="sig sig-object py" id="searx.exceptions.SearxEngineXPathException">
|
||||
<span class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.exceptions.</span></span><span class="sig-name descname"><span class="pre">SearxEngineXPathException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath_spec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">XPath</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">message</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/exceptions.html#SearxEngineXPathException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.exceptions.SearxEngineXPathException" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Error while getting the result of an XPath expression</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.favicons.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Favicons (source)</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="searx.cache.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Caches</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">SearXNG Exceptions</a><ul>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxException"><code class="docutils literal notranslate"><span class="pre">SearxException</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxParameterException"><code class="docutils literal notranslate"><span class="pre">SearxParameterException</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxSettingsException"><code class="docutils literal notranslate"><span class="pre">SearxSettingsException</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxEngineException"><code class="docutils literal notranslate"><span class="pre">SearxEngineException</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxXPathSyntaxException"><code class="docutils literal notranslate"><span class="pre">SearxXPathSyntaxException</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxEngineResponseException"><code class="docutils literal notranslate"><span class="pre">SearxEngineResponseException</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxEngineAPIException"><code class="docutils literal notranslate"><span class="pre">SearxEngineAPIException</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxEngineAccessDeniedException"><code class="docutils literal notranslate"><span class="pre">SearxEngineAccessDeniedException</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxEngineAccessDeniedException.SUSPEND_TIME_SETTING"><code class="docutils literal notranslate"><span class="pre">SearxEngineAccessDeniedException.SUSPEND_TIME_SETTING</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxEngineCaptchaException"><code class="docutils literal notranslate"><span class="pre">SearxEngineCaptchaException</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxEngineCaptchaException.SUSPEND_TIME_SETTING"><code class="docutils literal notranslate"><span class="pre">SearxEngineCaptchaException.SUSPEND_TIME_SETTING</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxEngineTooManyRequestsException"><code class="docutils literal notranslate"><span class="pre">SearxEngineTooManyRequestsException</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxEngineTooManyRequestsException.SUSPEND_TIME_SETTING"><code class="docutils literal notranslate"><span class="pre">SearxEngineTooManyRequestsException.SUSPEND_TIME_SETTING</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.exceptions.SearxEngineXPathException"><code class="docutils literal notranslate"><span class="pre">SearxEngineXPathException</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,643 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Locales" href="searx.locales.html"><link rel="prev" title="Favicons (source)" href="searx.favicons.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>Online /info - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.infopage.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.infopage.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-searx.infopage">
|
||||
<span id="online-info"></span><span id="searx-infopage"></span><h1>Online <code class="docutils literal notranslate"><span class="pre">/info</span></code><a class="headerlink" href="#module-searx.infopage" title="Link to this heading">¶</a></h1>
|
||||
<p>Render SearXNG instance documentation.</p>
|
||||
<p>Usage in a Flask app route:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">searx</span><span class="w"> </span><span class="kn">import</span> <span class="n">infopage</span>
|
||||
<span class="kn">from</span><span class="w"> </span><span class="nn">searx.extended_types</span><span class="w"> </span><span class="kn">import</span> <span class="n">sxng_request</span>
|
||||
|
||||
<span class="n">_INFO_PAGES</span> <span class="o">=</span> <span class="n">infopage</span><span class="o">.</span><span class="n">InfoPageSet</span><span class="p">(</span><span class="n">infopage</span><span class="o">.</span><span class="n">MistletoePage</span><span class="p">)</span>
|
||||
|
||||
<span class="nd">@app</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s1">'/info/<pagename>'</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s1">'GET'</span><span class="p">])</span>
|
||||
<span class="k">def</span><span class="w"> </span><span class="nf">info</span><span class="p">(</span><span class="n">pagename</span><span class="p">):</span>
|
||||
|
||||
<span class="n">locale</span> <span class="o">=</span> <span class="n">sxng_request</span><span class="o">.</span><span class="n">preferences</span><span class="o">.</span><span class="n">get_value</span><span class="p">(</span><span class="s1">'locale'</span><span class="p">)</span>
|
||||
<span class="n">page</span> <span class="o">=</span> <span class="n">_INFO_PAGES</span><span class="o">.</span><span class="n">get_page</span><span class="p">(</span><span class="n">pagename</span><span class="p">,</span> <span class="n">locale</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPage">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.infopage.</span></span><span class="sig-name descname"><span class="pre">InfoPage</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fname</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/infopage.html#InfoPage"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.infopage.InfoPage" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>A page of the <a class="reference internal" href="#searx.infopage.InfoPageSet" title="searx.infopage.InfoPageSet"><code class="xref py py-obj docutils literal notranslate"><span class="pre">online</span> <span class="pre">documentation</span></code></a>.</p>
|
||||
<dl class="py property">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPage.raw_content">
|
||||
<span class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">raw_content</span></span><a class="reference internal" href="../_modules/searx/infopage.html#InfoPage.raw_content"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.infopage.InfoPage.raw_content" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Raw content of the page (without any jinja rendering)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py property">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPage.content">
|
||||
<span class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">content</span></span><a class="reference internal" href="../_modules/searx/infopage.html#InfoPage.content"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.infopage.InfoPage.content" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Content of the page (rendered in a Jinja context)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py property">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPage.title">
|
||||
<span class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">title</span></span><a class="reference internal" href="../_modules/searx/infopage.html#InfoPage.title"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.infopage.InfoPage.title" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Title of the content (without any markup)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py property">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPage.html">
|
||||
<span class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">html</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="reference internal" href="../_modules/searx/infopage.html#InfoPage.html"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.infopage.InfoPage.html" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Render Markdown (<a class="reference external" href="https://commonmark.org/">CommonMark</a>) to HTML by using <a class="reference external" href="https://github.com/executablebooks/markdown-it-py">markdown-it-py</a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPage.get_ctx">
|
||||
<span class="sig-name descname"><span class="pre">get_ctx</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/searx/infopage.html#InfoPage.get_ctx"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.infopage.InfoPage.get_ctx" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Jinja context to render <a class="reference internal" href="#searx.infopage.InfoPage.content" title="searx.infopage.InfoPage.content"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InfoPage.content</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPageSet">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.infopage.</span></span><span class="sig-name descname"><span class="pre">InfoPageSet</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">page_class</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../dev/result_types/main/paper.html#searx.result_types.paper.Paper.type" title="searx.result_types.paper.Paper.type"><span class="pre">type</span></a><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#searx.infopage.InfoPage" title="searx.infopage.InfoPage"><span class="pre">InfoPage</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">info_folder</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/infopage.html#InfoPageSet"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.infopage.InfoPageSet" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Cached rendering of the online documentation a SearXNG instance has.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>page_class</strong> (<a class="reference internal" href="#searx.infopage.InfoPage" title="searx.infopage.InfoPage"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InfoPage</span></code></a>) – render online documentation by <a class="reference internal" href="#searx.infopage.InfoPage" title="searx.infopage.InfoPage"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InfoPage</span></code></a> parser.</p></li>
|
||||
<li><p><strong>info_folder</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – information directory</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPageSet.folder">
|
||||
<span class="sig-name descname"><span class="pre">folder</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.infopage.InfoPageSet.folder" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>location of the Markdown files</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPageSet.locale_default">
|
||||
<span class="sig-name descname"><span class="pre">locale_default</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.infopage.InfoPageSet.locale_default" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>default language</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPageSet.locales">
|
||||
<span class="sig-name descname"><span class="pre">locales</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span><a class="headerlink" href="#searx.infopage.InfoPageSet.locales" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>list of supported languages (aka locales)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPageSet.toc">
|
||||
<span class="sig-name descname"><span class="pre">toc</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span><a class="headerlink" href="#searx.infopage.InfoPageSet.toc" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>list of articles in the online documentation</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPageSet.get_page">
|
||||
<span class="sig-name descname"><span class="pre">get_page</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pagename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">locale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/infopage.html#InfoPageSet.get_page"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.infopage.InfoPageSet.get_page" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Return <code class="docutils literal notranslate"><span class="pre">pagename</span></code> instance of <a class="reference internal" href="#searx.infopage.InfoPage" title="searx.infopage.InfoPage"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InfoPage</span></code></a></p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>pagename</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – name of the page, a value from <a class="reference internal" href="#searx.infopage.InfoPageSet.toc" title="searx.infopage.InfoPageSet.toc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InfoPageSet.toc</span></code></a></p></li>
|
||||
<li><p><strong>locale</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – language of the page, e.g. <code class="docutils literal notranslate"><span class="pre">en</span></code>, <code class="docutils literal notranslate"><span class="pre">zh_Hans_CN</span></code>
|
||||
(default: <code class="xref py py-obj docutils literal notranslate"><span class="pre">InfoPageSet.i18n_origin</span></code>)</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.infopage.InfoPageSet.iter_pages">
|
||||
<span class="sig-name descname"><span class="pre">iter_pages</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">locale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fallback_to_default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/infopage.html#InfoPageSet.iter_pages"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.infopage.InfoPageSet.iter_pages" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Iterate over all pages of the TOC</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.locales.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Locales</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="searx.favicons.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Favicons (source)</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPage"><code class="docutils literal notranslate"><span class="pre">InfoPage</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPage.raw_content"><code class="docutils literal notranslate"><span class="pre">InfoPage.raw_content</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPage.content"><code class="docutils literal notranslate"><span class="pre">InfoPage.content</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPage.title"><code class="docutils literal notranslate"><span class="pre">InfoPage.title</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPage.html"><code class="docutils literal notranslate"><span class="pre">InfoPage.html</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPage.get_ctx"><code class="docutils literal notranslate"><span class="pre">InfoPage.get_ctx()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPageSet"><code class="docutils literal notranslate"><span class="pre">InfoPageSet</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPageSet.folder"><code class="docutils literal notranslate"><span class="pre">InfoPageSet.folder</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPageSet.locale_default"><code class="docutils literal notranslate"><span class="pre">InfoPageSet.locale_default</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPageSet.locales"><code class="docutils literal notranslate"><span class="pre">InfoPageSet.locales</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPageSet.toc"><code class="docutils literal notranslate"><span class="pre">InfoPageSet.toc</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPageSet.get_page"><code class="docutils literal notranslate"><span class="pre">InfoPageSet.get_page()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.infopage.InfoPageSet.iter_pages"><code class="docutils literal notranslate"><span class="pre">InfoPageSet.iter_pages()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,796 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Search" href="searx.search.html"><link rel="prev" title="Online /info" href="searx.infopage.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>Locales - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.locales.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.locales.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-searx.locales">
|
||||
<span id="locales"></span><span id="searx-locales"></span><h1>Locales<a class="headerlink" href="#module-searx.locales" title="Link to this heading">¶</a></h1>
|
||||
<section id="searxngs-locale-data">
|
||||
<h2>SearXNG’s locale data<a class="headerlink" href="#searxngs-locale-data" title="Link to this heading">¶</a></h2>
|
||||
<p>The variables <a class="reference internal" href="#searx.locales.RTL_LOCALES" title="searx.locales.RTL_LOCALES"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RTL_LOCALES</span></code></a> and <a class="reference internal" href="#searx.locales.LOCALE_NAMES" title="searx.locales.LOCALE_NAMES"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LOCALE_NAMES</span></code></a> are loaded from
|
||||
<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/locales.json">git://searx/data/locales.json</a> / see <a class="reference internal" href="#searx.locales.locales_initialize" title="searx.locales.locales_initialize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">locales_initialize</span></code></a> and
|
||||
<a class="reference internal" href="../dev/searxng_extra/update.html#update-locales-py"><span class="std std-ref">update_locales.py</span></a>.</p>
|
||||
<div class="admonition hint">
|
||||
<p class="admonition-title">Hint</p>
|
||||
<p>Whenever the value of <a class="reference internal" href="#searx.locales.ADDITIONAL_TRANSLATIONS" title="searx.locales.ADDITIONAL_TRANSLATIONS"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ADDITIONAL_TRANSLATIONS</span></code></a> or
|
||||
<a class="reference internal" href="#searx.locales.LOCALE_BEST_MATCH" title="searx.locales.LOCALE_BEST_MATCH"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LOCALE_BEST_MATCH</span></code></a> is modified, the
|
||||
<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/locales.json">git://searx/data/locales.json</a> needs to be rebuild:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">manage</span> <span class="n">data</span><span class="o">.</span><span class="n">locales</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="module-searx.sxng_locales">
|
||||
<span id="searxng-s-locale-codes"></span><h2>SearXNG’s locale codes<a class="headerlink" href="#module-searx.sxng_locales" title="Link to this heading">¶</a></h2>
|
||||
<p>List of SearXNG’s locale codes used for the search language/region.</p>
|
||||
<div class="admonition hint">
|
||||
<p class="admonition-title">Hint</p>
|
||||
<p>Don’t modify this file, this file is generated by:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">manage</span> <span class="n">data</span><span class="o">.</span><span class="n">traits</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.sxng_locales.sxng_locales">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.sxng_locales.</span></span><span class="sig-name descname"><span class="pre">sxng_locales</span></span><a class="headerlink" href="#searx.sxng_locales.sxng_locales" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>A list of five-digit tuples:</p>
|
||||
<ol class="arabic simple" start="0">
|
||||
<li><p>SearXNG’s internal locale tag (a language or region tag)</p></li>
|
||||
<li><p>Name of the language (<a class="reference external" href="https://babel.readthedocs.io/en/latest/api/core.html#babel.core.Locale.get_language_name" title="(in Babel v2.2)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">babel.core.Locale.get_language_name</span></code></a>)</p></li>
|
||||
<li><p>For region tags the name of the region (<a class="reference external" href="https://babel.readthedocs.io/en/latest/api/core.html#babel.core.Locale.get_territory_name" title="(in Babel v2.2)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">babel.core.Locale.get_territory_name</span></code></a>).
|
||||
Empty string for language tags.</p></li>
|
||||
<li><p>English language name (from <a class="reference external" href="https://babel.readthedocs.io/en/latest/api/core.html#babel.core.Locale.english_name" title="(in Babel v2.2)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">babel.core.Locale.english_name</span></code></a>)</p></li>
|
||||
<li><p>Unicode flag (emoji) that fits to SearXNG’s internal region tag. Languages
|
||||
are represented by a globe (🌐)</p></li>
|
||||
</ol>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">(</span><span class="s1">'en'</span><span class="p">,</span> <span class="s1">'English'</span><span class="p">,</span> <span class="s1">''</span><span class="p">,</span> <span class="s1">'English'</span><span class="p">,</span> <span class="s1">'🌐'</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="s1">'en-CA'</span><span class="p">,</span> <span class="s1">'English'</span><span class="p">,</span> <span class="s1">'Canada'</span><span class="p">,</span> <span class="s1">'English'</span><span class="p">,</span> <span class="s1">'🇨🇦'</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="s1">'en-US'</span><span class="p">,</span> <span class="s1">'English'</span><span class="p">,</span> <span class="s1">'United States'</span><span class="p">,</span> <span class="s1">'English'</span><span class="p">,</span> <span class="s1">'🇺🇸'</span><span class="p">),</span>
|
||||
<span class="o">..</span>
|
||||
<span class="p">(</span><span class="s1">'fr'</span><span class="p">,</span> <span class="s1">'Français'</span><span class="p">,</span> <span class="s1">''</span><span class="p">,</span> <span class="s1">'French'</span><span class="p">,</span> <span class="s1">'🌐'</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="s1">'fr-BE'</span><span class="p">,</span> <span class="s1">'Français'</span><span class="p">,</span> <span class="s1">'Belgique'</span><span class="p">,</span> <span class="s1">'French'</span><span class="p">,</span> <span class="s1">'🇧🇪'</span><span class="p">),</span>
|
||||
<span class="p">(</span><span class="s1">'fr-CA'</span><span class="p">,</span> <span class="s1">'Français'</span><span class="p">,</span> <span class="s1">'Canada'</span><span class="p">,</span> <span class="s1">'French'</span><span class="p">,</span> <span class="s1">'🇨🇦'</span><span class="p">),</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<dl class="field-list simple">
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="searxngs-locale-implementations">
|
||||
<h2>SearXNG’s locale implementations<a class="headerlink" href="#searxngs-locale-implementations" title="Link to this heading">¶</a></h2>
|
||||
</section>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.locales.LOCALE_NAMES">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">LOCALE_NAMES</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span><a class="headerlink" href="#searx.locales.LOCALE_NAMES" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Mapping of locales and their description. Locales e.g. ‘fr’ or ‘pt-BR’ (see
|
||||
<a class="reference internal" href="#searx.locales.locales_initialize" title="searx.locales.locales_initialize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">locales_initialize</span></code></a>).</p>
|
||||
<dl class="field-list simple">
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.locales.RTL_LOCALES">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">RTL_LOCALES</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#set" title="(in Python v3.14)"><span class="pre">set</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'ar',</span> <span class="pre">'fa-IR',</span> <span class="pre">'he'}</span></span><a class="headerlink" href="#searx.locales.RTL_LOCALES" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>List of <em>Right-To-Left</em> locales e.g. ‘he’ or ‘fa-IR’ (see
|
||||
<a class="reference internal" href="#searx.locales.locales_initialize" title="searx.locales.locales_initialize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">locales_initialize</span></code></a>).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.locales.ADDITIONAL_TRANSLATIONS">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">ADDITIONAL_TRANSLATIONS</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'dv':</span> <span class="pre">'ދިވެހި</span> <span class="pre">(Dhivehi)',</span> <span class="pre">'oc':</span> <span class="pre">'Occitan',</span> <span class="pre">'pap':</span> <span class="pre">'Papiamento',</span> <span class="pre">'szl':</span> <span class="pre">'Ślōnski</span> <span class="pre">(Silesian)'}</span></span><a class="headerlink" href="#searx.locales.ADDITIONAL_TRANSLATIONS" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Additional languages SearXNG has translations for but not supported by
|
||||
python-babel (see <a class="reference internal" href="#searx.locales.locales_initialize" title="searx.locales.locales_initialize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">locales_initialize</span></code></a>).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.locales.LOCALE_BEST_MATCH">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">LOCALE_BEST_MATCH</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'dv':</span> <span class="pre">'si',</span> <span class="pre">'nl-BE':</span> <span class="pre">'nl',</span> <span class="pre">'oc':</span> <span class="pre">'fr-FR',</span> <span class="pre">'pap':</span> <span class="pre">'pt-BR',</span> <span class="pre">'szl':</span> <span class="pre">'pl',</span> <span class="pre">'zh-HK':</span> <span class="pre">'zh-Hant-TW'}</span></span><a class="headerlink" href="#searx.locales.LOCALE_BEST_MATCH" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Map a locale we do not have a translations for to a locale we have a
|
||||
translation for. By example: use Taiwan version of the translation for Hong
|
||||
Kong.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.locales.get_translations">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">get_translations</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/locales.html#get_translations"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.locales.get_translations" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Monkey patch of <a class="reference external" href="https://python-babel.github.io/flask-babel/index.html#flask_babel.get_translations" title="(in Flask-Babel)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flask_babel.get_translations</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.locales.get_translation_locales">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">get_translation_locales</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/searx/locales.html#get_translation_locales"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.locales.get_translation_locales" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns the list of translation locales (<em>underscore</em>). The list is
|
||||
generated from the translation folders in <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/translations">git://searx/translations</a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.locales.locales_initialize">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">locales_initialize</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/locales.html#locales_initialize"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.locales.locales_initialize" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Initialize locales environment of the SearXNG session.</p>
|
||||
<ul class="simple">
|
||||
<li><p>monkey patch <a class="reference external" href="https://python-babel.github.io/flask-babel/index.html#flask_babel.get_translations" title="(in Flask-Babel)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flask_babel.get_translations</span></code></a> by <a class="reference internal" href="#searx.locales.get_translations" title="searx.locales.get_translations"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_translations</span></code></a></p></li>
|
||||
<li><p>init global names <a class="reference internal" href="#searx.locales.LOCALE_NAMES" title="searx.locales.LOCALE_NAMES"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LOCALE_NAMES</span></code></a>, <a class="reference internal" href="#searx.locales.RTL_LOCALES" title="searx.locales.RTL_LOCALES"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RTL_LOCALES</span></code></a></p></li>
|
||||
</ul>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.locales.region_tag">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">region_tag</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">locale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://babel.readthedocs.io/en/latest/api/core.html#babel.core.Locale" title="(in Babel v2.2)"><span class="pre">Locale</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/locales.html#region_tag"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.locales.region_tag" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns SearXNG’s region tag from the locale (e.g. zh-TW , en-US).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.locales.language_tag">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">language_tag</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">locale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://babel.readthedocs.io/en/latest/api/core.html#babel.core.Locale" title="(in Babel v2.2)"><span class="pre">Locale</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/locales.html#language_tag"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.locales.language_tag" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns SearXNG’s language tag from the locale and if exits, the tag
|
||||
includes the script name (e.g. en, zh_Hant).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.locales.get_locale">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">get_locale</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">locale_tag</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://babel.readthedocs.io/en/latest/api/core.html#babel.core.Locale" title="(in Babel v2.2)"><span class="pre">Locale</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/locales.html#get_locale"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.locales.get_locale" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a <code class="xref py py-obj docutils literal notranslate"><span class="pre">babel.Locale</span></code> object parsed from argument
|
||||
<code class="docutils literal notranslate"><span class="pre">locale_tag</span></code></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.locales.get_official_locales">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">get_official_locales</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">territory</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">languages</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">regional</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">de_facto</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#set" title="(in Python v3.14)"><span class="pre">set</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://babel.readthedocs.io/en/latest/api/core.html#babel.core.Locale" title="(in Babel v2.2)"><span class="pre">Locale</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/searx/locales.html#get_official_locales"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.locales.get_official_locales" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a list of <code class="xref py py-obj docutils literal notranslate"><span class="pre">babel.Locale</span></code> with languages from
|
||||
<a class="reference external" href="https://babel.readthedocs.io/en/latest/api/languages.html#babel.languages.get_official_languages" title="(in Babel v2.2)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">babel.languages.get_official_languages</span></code></a>.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>territory</strong> – The territory (country or region) code.</p></li>
|
||||
<li><p><strong>languages</strong> – A list of language codes the languages from
|
||||
<a class="reference external" href="https://babel.readthedocs.io/en/latest/api/languages.html#babel.languages.get_official_languages" title="(in Babel v2.2)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">babel.languages.get_official_languages</span></code></a> should be in
|
||||
(intersection). If this argument is <code class="docutils literal notranslate"><span class="pre">None</span></code>, all official languages in
|
||||
this territory are used.</p></li>
|
||||
<li><p><strong>regional</strong> – If the regional flag is set, then languages which are
|
||||
regionally official are also returned.</p></li>
|
||||
<li><p><strong>de_facto</strong> – If the de_facto flag is set to <cite>False</cite>, then languages
|
||||
which are “de facto” official are not returned.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.locales.get_engine_locale">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">get_engine_locale</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">searxng_locale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">engine_locales</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/locales.html#get_engine_locale"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.locales.get_engine_locale" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Return engine’s language (aka locale) string that best fits to argument
|
||||
<code class="docutils literal notranslate"><span class="pre">searxng_locale</span></code>.</p>
|
||||
<p>Argument <code class="docutils literal notranslate"><span class="pre">engine_locales</span></code> is a python dict that maps <em>SearXNG locales</em> to
|
||||
corresponding <em>engine locales</em>:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o"><</span><span class="n">engine</span><span class="o">></span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="c1"># SearXNG string : engine-string</span>
|
||||
<span class="s1">'ca-ES'</span> <span class="p">:</span> <span class="s1">'ca_ES'</span><span class="p">,</span>
|
||||
<span class="s1">'fr-BE'</span> <span class="p">:</span> <span class="s1">'fr_BE'</span><span class="p">,</span>
|
||||
<span class="s1">'fr-CA'</span> <span class="p">:</span> <span class="s1">'fr_CA'</span><span class="p">,</span>
|
||||
<span class="s1">'fr-CH'</span> <span class="p">:</span> <span class="s1">'fr_CH'</span><span class="p">,</span>
|
||||
<span class="s1">'fr'</span> <span class="p">:</span> <span class="s1">'fr_FR'</span><span class="p">,</span>
|
||||
<span class="o">...</span>
|
||||
<span class="s1">'pl-PL'</span> <span class="p">:</span> <span class="s1">'pl_PL'</span><span class="p">,</span>
|
||||
<span class="s1">'pt-PT'</span> <span class="p">:</span> <span class="s1">'pt_PT'</span>
|
||||
<span class="o">..</span>
|
||||
<span class="s1">'zh'</span> <span class="p">:</span> <span class="s1">'zh'</span>
|
||||
<span class="s1">'zh_Hans'</span> <span class="p">:</span> <span class="s1">'zh'</span>
|
||||
<span class="s1">'zh_Hant'</span> <span class="p">:</span> <span class="s1">'zh_TW'</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition hint">
|
||||
<p class="admonition-title">Hint</p>
|
||||
<p>The <em>SearXNG locale</em> string has to be known by babel!</p>
|
||||
</div>
|
||||
<p>If there is no direct 1:1 mapping, this functions tries to narrow down
|
||||
engine’s language (locale). If no value can be determined by these
|
||||
approximation attempts the <code class="docutils literal notranslate"><span class="pre">default</span></code> value is returned.</p>
|
||||
<p>Assumptions:</p>
|
||||
<ol class="upperalpha simple">
|
||||
<li><p>When user select a language the results should be optimized according to
|
||||
the selected language.</p></li>
|
||||
<li><p>When user select a language and a territory the results should be
|
||||
optimized with first priority on territory and second on language.</p></li>
|
||||
</ol>
|
||||
<p>First approximation rule (<em>by territory</em>):</p>
|
||||
<blockquote>
|
||||
<div><p>When the user selects a locale with territory (and a language), the
|
||||
territory has priority over the language. If any of the official languages
|
||||
in the territory is supported by the engine (<code class="docutils literal notranslate"><span class="pre">engine_locales</span></code>) it will
|
||||
be used.</p>
|
||||
</div></blockquote>
|
||||
<p>Second approximation rule (<em>by language</em>):</p>
|
||||
<blockquote>
|
||||
<div><p>If “First approximation rule” brings no result or the user selects only a
|
||||
language without a territory. Check in which territories the language
|
||||
has an official status and if one of these territories is supported by the
|
||||
engine.</p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.locales.match_locale">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">match_locale</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">searxng_locale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">locale_tag_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fallback</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/locales.html#match_locale"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.locales.match_locale" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Return tag from <code class="docutils literal notranslate"><span class="pre">locale_tag_list</span></code> that best fits to <code class="docutils literal notranslate"><span class="pre">searxng_locale</span></code>.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>searxng_locale</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – SearXNG’s internal representation of locale (de,
|
||||
de-DE, fr-BE, zh, zh-CN, zh-TW ..).</p></li>
|
||||
<li><p><strong>locale_tag_list</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><em>list</em></a>) – The list of locale tags to select from</p></li>
|
||||
<li><p><strong>fallback</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – fallback locale tag (if unset –> <code class="docutils literal notranslate"><span class="pre">None</span></code>)</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>The rules to find a match are implemented in <a class="reference internal" href="#searx.locales.get_engine_locale" title="searx.locales.get_engine_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_engine_locale</span></code></a>,
|
||||
the <code class="docutils literal notranslate"><span class="pre">engine_locales</span></code> is build up by <a class="reference internal" href="#searx.locales.build_engine_locales" title="searx.locales.build_engine_locales"><code class="xref py py-obj docutils literal notranslate"><span class="pre">build_engine_locales</span></code></a>.</p>
|
||||
<div class="admonition hint">
|
||||
<p class="admonition-title">Hint</p>
|
||||
<p>The <em>SearXNG locale</em> string and the members of <code class="docutils literal notranslate"><span class="pre">locale_tag_list</span></code> has to
|
||||
be known by babel! The <a class="reference internal" href="#searx.locales.ADDITIONAL_TRANSLATIONS" title="searx.locales.ADDITIONAL_TRANSLATIONS"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ADDITIONAL_TRANSLATIONS</span></code></a> are used in the
|
||||
UI and are not known by babel –> will be ignored.</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.locales.build_engine_locales">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.locales.</span></span><span class="sig-name descname"><span class="pre">build_engine_locales</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tag_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/searx/locales.html#build_engine_locales"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.locales.build_engine_locales" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>From a list of locale tags a dictionary is build that can be passed by
|
||||
argument <code class="docutils literal notranslate"><span class="pre">engine_locales</span></code> to <a class="reference internal" href="#searx.locales.get_engine_locale" title="searx.locales.get_engine_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_engine_locale</span></code></a>. This function
|
||||
is mainly used by <a class="reference internal" href="#searx.locales.match_locale" title="searx.locales.match_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">match_locale</span></code></a> and is similar to what the
|
||||
<code class="docutils literal notranslate"><span class="pre">fetch_traits(..)</span></code> function of engines do.</p>
|
||||
<p>If there are territory codes in the <code class="docutils literal notranslate"><span class="pre">tag_list</span></code> that have a <em>script code</em>
|
||||
additional keys are added to the returned dictionary.</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span><span class="w"> </span><span class="nn">locales</span>
|
||||
<span class="gp">>>> </span><span class="n">engine_locales</span> <span class="o">=</span> <span class="n">locales</span><span class="o">.</span><span class="n">build_engine_locales</span><span class="p">([</span><span class="s1">'en'</span><span class="p">,</span> <span class="s1">'en-US'</span><span class="p">,</span> <span class="s1">'zh'</span><span class="p">,</span> <span class="s1">'zh-CN'</span><span class="p">,</span> <span class="s1">'zh-TW'</span><span class="p">])</span>
|
||||
<span class="gp">>>> </span><span class="n">engine_locales</span>
|
||||
<span class="go">{</span>
|
||||
<span class="go"> 'en': 'en', 'en-US': 'en-US',</span>
|
||||
<span class="go"> 'zh': 'zh', 'zh-CN': 'zh-CN', 'zh_Hans': 'zh-CN',</span>
|
||||
<span class="go"> 'zh-TW': 'zh-TW', 'zh_Hant': 'zh-TW'</span>
|
||||
<span class="go">}</span>
|
||||
<span class="gp">>>> </span><span class="n">get_engine_locale</span><span class="p">(</span><span class="s1">'zh-Hans'</span><span class="p">,</span> <span class="n">engine_locales</span><span class="p">)</span>
|
||||
<span class="go">'zh-CN'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This function is a good example to understand the language/region model
|
||||
of SearXNG:</p>
|
||||
<blockquote>
|
||||
<div><p>SearXNG only distinguishes between <strong>search languages</strong> and <strong>search
|
||||
regions</strong>, by adding the <em>script-tags</em>, languages with <em>script-tags</em> can
|
||||
be assigned to the <strong>regions</strong> that SearXNG supports.</p>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.search.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Search</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="searx.infopage.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Locales</a><ul>
|
||||
<li><a class="reference internal" href="#searxngs-locale-data">SearXNG’s locale data</a></li>
|
||||
<li><a class="reference internal" href="#module-searx.sxng_locales">SearXNG’s locale codes</a><ul>
|
||||
<li><a class="reference internal" href="#searx.sxng_locales.sxng_locales"><code class="docutils literal notranslate"><span class="pre">sxng_locales</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searxngs-locale-implementations">SearXNG’s locale implementations</a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.LOCALE_NAMES"><code class="docutils literal notranslate"><span class="pre">LOCALE_NAMES</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.RTL_LOCALES"><code class="docutils literal notranslate"><span class="pre">RTL_LOCALES</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.ADDITIONAL_TRANSLATIONS"><code class="docutils literal notranslate"><span class="pre">ADDITIONAL_TRANSLATIONS</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.LOCALE_BEST_MATCH"><code class="docutils literal notranslate"><span class="pre">LOCALE_BEST_MATCH</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.get_translations"><code class="docutils literal notranslate"><span class="pre">get_translations()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.get_translation_locales"><code class="docutils literal notranslate"><span class="pre">get_translation_locales()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.locales_initialize"><code class="docutils literal notranslate"><span class="pre">locales_initialize()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.region_tag"><code class="docutils literal notranslate"><span class="pre">region_tag()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.language_tag"><code class="docutils literal notranslate"><span class="pre">language_tag()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.get_locale"><code class="docutils literal notranslate"><span class="pre">get_locale()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.get_official_locales"><code class="docutils literal notranslate"><span class="pre">get_official_locales()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.get_engine_locale"><code class="docutils literal notranslate"><span class="pre">get_engine_locale()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.match_locale"><code class="docutils literal notranslate"><span class="pre">match_locale()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.locales.build_engine_locales"><code class="docutils literal notranslate"><span class="pre">build_engine_locales()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,901 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Settings Loader" href="searx.settings.html"><link rel="prev" title="Search" href="searx.search.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>Search processors - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.search.processors.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.search.processors.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="search-processors">
|
||||
<span id="searx-search-processors"></span><h1>Search processors<a class="headerlink" href="#search-processors" title="Link to this heading">¶</a></h1>
|
||||
<section id="module-searx.search.processors.abstract">
|
||||
<span id="abstract-processor-class"></span><h2>Abstract processor class<a class="headerlink" href="#module-searx.search.processors.abstract" title="Link to this heading">¶</a></h2>
|
||||
<p>Abstract base classes for all engine processors.</p>
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.RequestParams">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.abstract.</span></span><span class="sig-name descname"><span class="pre">RequestParams</span></span><a class="reference internal" href="../_modules/searx/search/processors/abstract.html#RequestParams"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.abstract.RequestParams" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Basic quantity of the Request parameters of all engine types.</p>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.RequestParams.query">
|
||||
<span class="sig-name descname"><span class="pre">query</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.search.processors.abstract.RequestParams.query" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Search term, stripped of search syntax arguments.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.RequestParams.category">
|
||||
<span class="sig-name descname"><span class="pre">category</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.search.processors.abstract.RequestParams.category" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Current category, like <code class="docutils literal notranslate"><span class="pre">general</span></code>.</p>
|
||||
<div class="admonition hint">
|
||||
<p class="admonition-title">Hint</p>
|
||||
<p>This field is deprecated, don’t use it in further implementations.</p>
|
||||
</div>
|
||||
<p>This field is currently <em>arbitrarily</em> filled with the name of “one””
|
||||
category (the name of the first category of the engine). In practice,
|
||||
however, it is not clear what this “one” category should be; in principle,
|
||||
multiple categories can also be activated in a search.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.RequestParams.pageno">
|
||||
<span class="sig-name descname"><span class="pre">pageno</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><a class="headerlink" href="#searx.search.processors.abstract.RequestParams.pageno" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Current page number, where the first page is <code class="docutils literal notranslate"><span class="pre">1</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.RequestParams.safesearch">
|
||||
<span class="sig-name descname"><span class="pre">safesearch</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Literal" title="(in Python v3.14)"><span class="pre">Literal</span></a><span class="p"><span class="pre">[</span></span><span class="m"><span class="pre">0</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="m"><span class="pre">1</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="m"><span class="pre">2</span></span><span class="p"><span class="pre">]</span></span></span><a class="headerlink" href="#searx.search.processors.abstract.RequestParams.safesearch" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Safe-Search filter (0:normal, 1:moderate, 2:strict).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.RequestParams.time_range">
|
||||
<span class="sig-name descname"><span class="pre">time_range</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Literal" title="(in Python v3.14)"><span class="pre">Literal</span></a><span class="p"><span class="pre">[</span></span><span class="s"><span class="pre">'day'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'week'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'month'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'year'</span></span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><a class="headerlink" href="#searx.search.processors.abstract.RequestParams.time_range" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Time-range filter.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.RequestParams.engine_data">
|
||||
<span class="sig-name descname"><span class="pre">engine_data</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span><a class="headerlink" href="#searx.search.processors.abstract.RequestParams.engine_data" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Allows the transfer of (engine specific) data to the next request of the
|
||||
client. In the case of the <code class="docutils literal notranslate"><span class="pre">online</span></code> engines, this data is delivered to
|
||||
the client via the HTML <code class="docutils literal notranslate"><span class="pre"><form></span></code> in response.</p>
|
||||
<p>If the client then sends this form back to the server with the next request,
|
||||
this data will be available.</p>
|
||||
<p>This makes it possible to carry data from one request to the next without a
|
||||
session context, but this feature (is fragile) and should only be used in
|
||||
exceptional cases. See also <a class="reference internal" href="../dev/templates.html#engine-data"><span class="std std-ref">engine_data_form</span></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.RequestParams.searxng_locale">
|
||||
<span class="sig-name descname"><span class="pre">searxng_locale</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.search.processors.abstract.RequestParams.searxng_locale" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Language / locale filter from the search request, a string like ‘all’,
|
||||
‘en’, ‘en-US’, ‘zh-HK’ .. and others, for more details see
|
||||
<a class="reference internal" href="searx.locales.html#module-searx.locales" title="searx.locales"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.locales</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.SuspendedStatus">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.abstract.</span></span><span class="sig-name descname"><span class="pre">SuspendedStatus</span></span><a class="reference internal" href="../_modules/searx/search/processors/abstract.html#SuspendedStatus"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.abstract.SuspendedStatus" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Class to handle suspend state.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.EngineProcessor">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.abstract.</span></span><span class="sig-name descname"><span class="pre">EngineProcessor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../dev/engines/enginelib.html#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/types.html#types.ModuleType" title="(in Python v3.14)"><span class="pre">types.ModuleType</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/search/processors/abstract.html#EngineProcessor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.abstract.EngineProcessor" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Base classes used for all types of request processors.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.EngineProcessor.initialize">
|
||||
<span class="sig-name descname"><span class="pre">initialize</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">callback</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Callable" title="(in Python v3.14)"><span class="pre">Callable</span></a><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#searx.search.processors.abstract.EngineProcessor" title="searx.search.processors.abstract.EngineProcessor"><span class="pre">EngineProcessor</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/search/processors/abstract.html#EngineProcessor.initialize"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.abstract.EngineProcessor.initialize" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Initialization of <em>this</em> <a class="reference internal" href="#searx.search.processors.abstract.EngineProcessor" title="searx.search.processors.abstract.EngineProcessor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineProcessor</span></code></a>.</p>
|
||||
<p>If processor’s engine has an <code class="docutils literal notranslate"><span class="pre">init</span></code> method, it is called first.
|
||||
Engine’s <code class="docutils literal notranslate"><span class="pre">init</span></code> method is executed in a thread, meaning that the
|
||||
<em>registration</em> (the <code class="docutils literal notranslate"><span class="pre">callback</span></code>) may occur later and is not already
|
||||
established by the return from this registration method.</p>
|
||||
<p>Registration only takes place if the <code class="docutils literal notranslate"><span class="pre">init</span></code> method is not available or
|
||||
is successfully run through.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.abstract.EngineProcessor.get_params">
|
||||
<span class="sig-name descname"><span class="pre">get_params</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">search_query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="searx.search.html#searx.search.models.SearchQuery" title="searx.search.models.SearchQuery"><span class="pre">SearchQuery</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">engine_category</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="#searx.search.processors.abstract.RequestParams" title="searx.search.processors.abstract.RequestParams"><span class="pre">RequestParams</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/search/processors/abstract.html#EngineProcessor.get_params"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.abstract.EngineProcessor.get_params" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a dictionary with the <a class="reference internal" href="../dev/engines/engine_overview.html#engine-request-arguments"><span class="std std-ref">request parameters</span></a> (<a class="reference internal" href="#searx.search.processors.abstract.RequestParams" title="searx.search.processors.abstract.RequestParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RequestParams</span></code></a>), if the search condition
|
||||
is not supported by the engine, <code class="docutils literal notranslate"><span class="pre">None</span></code> is returned:</p>
|
||||
<ul class="simple">
|
||||
<li><dl class="simple">
|
||||
<dt><em>time range</em> filter in search conditions, but the engine does not have</dt><dd><p>a corresponding filter</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><p>page number > 1 when engine does not support paging</p></li>
|
||||
<li><p>page number > <code class="docutils literal notranslate"><span class="pre">max_page</span></code></p></li>
|
||||
</ul>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="module-searx.search.processors.offline">
|
||||
<span id="offline-processor"></span><h2>Offline processor<a class="headerlink" href="#module-searx.search.processors.offline" title="Link to this heading">¶</a></h2>
|
||||
<p>Processors for engine-type: <code class="docutils literal notranslate"><span class="pre">offline</span></code></p>
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.offline.OfflineProcessor">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.offline.</span></span><span class="sig-name descname"><span class="pre">OfflineProcessor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../dev/engines/enginelib.html#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/types.html#types.ModuleType" title="(in Python v3.14)"><span class="pre">types.ModuleType</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/search/processors/offline.html#OfflineProcessor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.offline.OfflineProcessor" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Processor class used by <code class="docutils literal notranslate"><span class="pre">offline</span></code> engines.</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="module-searx.search.processors.online">
|
||||
<span id="online-processor"></span><h2>Online processor<a class="headerlink" href="#module-searx.search.processors.online" title="Link to this heading">¶</a></h2>
|
||||
<p>Processor used for <code class="docutils literal notranslate"><span class="pre">online</span></code> engines.</p>
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online.OnlineProcessor">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online.</span></span><span class="sig-name descname"><span class="pre">OnlineProcessor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../dev/engines/enginelib.html#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/types.html#types.ModuleType" title="(in Python v3.14)"><span class="pre">types.ModuleType</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/search/processors/online.html#OnlineProcessor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online.OnlineProcessor" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Processor class for <code class="docutils literal notranslate"><span class="pre">online</span></code> engines.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online.OnlineProcessor.init_engine">
|
||||
<span class="sig-name descname"><span class="pre">init_engine</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/searx/search/processors/online.html#OnlineProcessor.init_engine"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online.OnlineProcessor.init_engine" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>This method is called in a thread, and before the base method is
|
||||
called, the network must be set up for the <code class="docutils literal notranslate"><span class="pre">online</span></code> engines.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online.OnlineProcessor.get_params">
|
||||
<span class="sig-name descname"><span class="pre">get_params</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">search_query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="searx.search.html#searx.search.models.SearchQuery" title="searx.search.models.SearchQuery"><span class="pre">SearchQuery</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">engine_category</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="#searx.search.processors.online.OnlineParams" title="searx.search.processors.online.OnlineParams"><span class="pre">OnlineParams</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/search/processors/online.html#OnlineProcessor.get_params"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online.OnlineProcessor.get_params" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a dictionary with the <a class="reference internal" href="../dev/engines/engine_overview.html#engine-request-online"><span class="std std-ref">request params</span></a> (<a class="reference internal" href="#searx.search.processors.online.OnlineParams" title="searx.search.processors.online.OnlineParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OnlineParams</span></code></a>), if the search condition is not
|
||||
supported by the engine, <code class="docutils literal notranslate"><span class="pre">None</span></code> is returned.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online.OnlineParams">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online.</span></span><span class="sig-name descname"><span class="pre">OnlineParams</span></span><a class="reference internal" href="../_modules/searx/search/processors/online.html#OnlineParams"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online.OnlineParams" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Request parameters of a <code class="docutils literal notranslate"><span class="pre">online</span></code> engine.</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="module-searx.search.processors.online_currency">
|
||||
<span id="online-currency-processor"></span><h2>Online currency processor<a class="headerlink" href="#module-searx.search.processors.online_currency" title="Link to this heading">¶</a></h2>
|
||||
<p>Processor used for <code class="docutils literal notranslate"><span class="pre">online_currency</span></code> engines.</p>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_currency.search_syntax">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_currency.</span></span><span class="sig-name descname"><span class="pre">search_syntax</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">re.compile('.*?(\\d+(?:\\.\\d+)?)</span> <span class="pre">([^.0-9]+)</span> <span class="pre">(?:in|to)</span> <span class="pre">([^.0-9]+)',</span> <span class="pre">re.IGNORECASE)</span></span><a class="headerlink" href="#searx.search.processors.online_currency.search_syntax" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Search syntax used for from/to currency (e.g. <code class="docutils literal notranslate"><span class="pre">10</span> <span class="pre">usd</span> <span class="pre">to</span> <span class="pre">eur</span></code>)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_currency.CurrenciesParams">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_currency.</span></span><span class="sig-name descname"><span class="pre">CurrenciesParams</span></span><a class="reference internal" href="../_modules/searx/search/processors/online_currency.html#CurrenciesParams"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_currency.CurrenciesParams" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Currencies request parameters.</p>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_currency.CurrenciesParams.amount">
|
||||
<span class="sig-name descname"><span class="pre">amount</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.14)"><span class="pre">float</span></a></span><a class="headerlink" href="#searx.search.processors.online_currency.CurrenciesParams.amount" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Currency amount to be converted</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_currency.CurrenciesParams.to_iso4217">
|
||||
<span class="sig-name descname"><span class="pre">to_iso4217</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.search.processors.online_currency.CurrenciesParams.to_iso4217" title="Link to this definition">¶</a></dt>
|
||||
<dd><p><a class="reference external" href="https://en.wikipedia.org/wiki/ISO_4217">ISO_4217</a> alpha code of the currency used as the basis for conversion.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_currency.CurrenciesParams.from_iso4217">
|
||||
<span class="sig-name descname"><span class="pre">from_iso4217</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.search.processors.online_currency.CurrenciesParams.from_iso4217" title="Link to this definition">¶</a></dt>
|
||||
<dd><p><a class="reference external" href="https://en.wikipedia.org/wiki/ISO_4217">ISO_4217</a> alpha code of the currency to be converted.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_currency.CurrenciesParams.from_name">
|
||||
<span class="sig-name descname"><span class="pre">from_name</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.search.processors.online_currency.CurrenciesParams.from_name" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Name of the currency used as the basis for conversion.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_currency.CurrenciesParams.to_name">
|
||||
<span class="sig-name descname"><span class="pre">to_name</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.search.processors.online_currency.CurrenciesParams.to_name" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Name of the currency of the currency to be converted.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_currency.OnlineCurrenciesParams">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_currency.</span></span><span class="sig-name descname"><span class="pre">OnlineCurrenciesParams</span></span><a class="reference internal" href="../_modules/searx/search/processors/online_currency.html#OnlineCurrenciesParams"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_currency.OnlineCurrenciesParams" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Request parameters of a <code class="docutils literal notranslate"><span class="pre">online_currency</span></code> engine.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_currency.OnlineCurrencyProcessor">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_currency.</span></span><span class="sig-name descname"><span class="pre">OnlineCurrencyProcessor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../dev/engines/enginelib.html#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/types.html#types.ModuleType" title="(in Python v3.14)"><span class="pre">types.ModuleType</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/search/processors/online_currency.html#OnlineCurrencyProcessor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_currency.OnlineCurrencyProcessor" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Processor class used by <code class="docutils literal notranslate"><span class="pre">online_currency</span></code> engines.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_currency.OnlineCurrencyProcessor.get_params">
|
||||
<span class="sig-name descname"><span class="pre">get_params</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">search_query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="searx.search.html#searx.search.models.SearchQuery" title="searx.search.models.SearchQuery"><span class="pre">SearchQuery</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">engine_category</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="#searx.search.processors.online_currency.OnlineCurrenciesParams" title="searx.search.processors.online_currency.OnlineCurrenciesParams"><span class="pre">OnlineCurrenciesParams</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/search/processors/online_currency.html#OnlineCurrencyProcessor.get_params"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_currency.OnlineCurrencyProcessor.get_params" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a dictionary with the <a class="reference internal" href="../dev/engines/engine_overview.html#engine-request-online-currency"><span class="std std-ref">request params</span></a> (<a class="reference internal" href="#searx.search.processors.online_currency.OnlineCurrenciesParams" title="searx.search.processors.online_currency.OnlineCurrenciesParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OnlineCurrenciesParams</span></code></a>). <code class="docutils literal notranslate"><span class="pre">None</span></code> is
|
||||
returned if the search query does not match <a class="reference internal" href="#searx.search.processors.online_currency.search_syntax" title="searx.search.processors.online_currency.search_syntax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_syntax</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="module-searx.search.processors.online_dictionary">
|
||||
<span id="online-dictionary-processor"></span><h2>Online dictionary processor<a class="headerlink" href="#module-searx.search.processors.online_dictionary" title="Link to this heading">¶</a></h2>
|
||||
<p>Processor used for <code class="docutils literal notranslate"><span class="pre">online_dictionary</span></code> engines.</p>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_dictionary.search_syntax">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_dictionary.</span></span><span class="sig-name descname"><span class="pre">search_syntax</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">re.compile('.*?([a-z]+)-([a-z]+)</span> <span class="pre">(.+)$',</span> <span class="pre">re.IGNORECASE)</span></span><a class="headerlink" href="#searx.search.processors.online_dictionary.search_syntax" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Search syntax used for from/to language (e.g. <code class="docutils literal notranslate"><span class="pre">en-de</span></code>)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_dictionary.FromToType">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_dictionary.</span></span><span class="sig-name descname"><span class="pre">FromToType</span></span><a class="headerlink" href="#searx.search.processors.online_dictionary.FromToType" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Type of a language descriptions in the context of a <code class="docutils literal notranslate"><span class="pre">online_dictionary</span></code>.</p>
|
||||
<p>alias of <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.14)"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_dictionary.DictParams">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_dictionary.</span></span><span class="sig-name descname"><span class="pre">DictParams</span></span><a class="reference internal" href="../_modules/searx/search/processors/online_dictionary.html#DictParams"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_dictionary.DictParams" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Dictionary request parameters.</p>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_dictionary.DictParams.from_lang">
|
||||
<span class="sig-name descname"><span class="pre">from_lang</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.14)"><span class="pre">tuple</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span><a class="headerlink" href="#searx.search.processors.online_dictionary.DictParams.from_lang" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Language from which is to be translated.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_dictionary.DictParams.to_lang">
|
||||
<span class="sig-name descname"><span class="pre">to_lang</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.14)"><span class="pre">tuple</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span><a class="headerlink" href="#searx.search.processors.online_dictionary.DictParams.to_lang" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Language to translate into.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_dictionary.DictParams.query">
|
||||
<span class="sig-name descname"><span class="pre">query</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><a class="headerlink" href="#searx.search.processors.online_dictionary.DictParams.query" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Search term, cleaned of search syntax (<em>from-to</em> has been removed).</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_dictionary.OnlineDictParams">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_dictionary.</span></span><span class="sig-name descname"><span class="pre">OnlineDictParams</span></span><a class="reference internal" href="../_modules/searx/search/processors/online_dictionary.html#OnlineDictParams"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_dictionary.OnlineDictParams" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Request parameters of a <code class="docutils literal notranslate"><span class="pre">online_dictionary</span></code> engine.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_dictionary.OnlineDictionaryProcessor">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_dictionary.</span></span><span class="sig-name descname"><span class="pre">OnlineDictionaryProcessor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../dev/engines/enginelib.html#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/types.html#types.ModuleType" title="(in Python v3.14)"><span class="pre">types.ModuleType</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/search/processors/online_dictionary.html#OnlineDictionaryProcessor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_dictionary.OnlineDictionaryProcessor" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Processor class for <code class="docutils literal notranslate"><span class="pre">online_dictionary</span></code> engines.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_dictionary.OnlineDictionaryProcessor.get_params">
|
||||
<span class="sig-name descname"><span class="pre">get_params</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">search_query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="searx.search.html#searx.search.models.SearchQuery" title="searx.search.models.SearchQuery"><span class="pre">SearchQuery</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">engine_category</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="#searx.search.processors.online_dictionary.OnlineDictParams" title="searx.search.processors.online_dictionary.OnlineDictParams"><span class="pre">OnlineDictParams</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/search/processors/online_dictionary.html#OnlineDictionaryProcessor.get_params"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_dictionary.OnlineDictionaryProcessor.get_params" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a dictionary with the <a class="reference internal" href="../dev/engines/engine_overview.html#engine-request-online-dictionary"><span class="std std-ref">request params</span></a> (<a class="reference internal" href="#searx.search.processors.online_dictionary.OnlineDictParams" title="searx.search.processors.online_dictionary.OnlineDictParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OnlineDictParams</span></code></a>). <code class="docutils literal notranslate"><span class="pre">None</span></code> is returned
|
||||
if the search query does not match <a class="reference internal" href="#searx.search.processors.online_dictionary.search_syntax" title="searx.search.processors.online_dictionary.search_syntax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_syntax</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="module-searx.search.processors.online_url_search">
|
||||
<span id="online-url-search-processor"></span><h2>Online URL search processor<a class="headerlink" href="#module-searx.search.processors.online_url_search" title="Link to this heading">¶</a></h2>
|
||||
<p>Processor used for <code class="docutils literal notranslate"><span class="pre">online_url_search</span></code> engines.</p>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_url_search.search_syntax">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_url_search.</span></span><span class="sig-name descname"><span class="pre">search_syntax</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'data:image':</span> <span class="pre">re.compile('data:image/[^;</span> <span class="pre">]*;base64,[^</span> <span class="pre">]*'),</span> <span class="pre">'ftp':</span> <span class="pre">re.compile('ftps?:\\/\\/[^</span> <span class="pre">]*'),</span> <span class="pre">'http':</span> <span class="pre">re.compile('https?:\\/\\/[^</span> <span class="pre">]*')}</span></span><a class="headerlink" href="#searx.search.processors.online_url_search.search_syntax" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Search syntax used for a URL search.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_url_search.UrlParams">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_url_search.</span></span><span class="sig-name descname"><span class="pre">UrlParams</span></span><a class="reference internal" href="../_modules/searx/search/processors/online_url_search.html#UrlParams"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_url_search.UrlParams" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>URL request parameters.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_url_search.OnlineUrlSearchParams">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_url_search.</span></span><span class="sig-name descname"><span class="pre">OnlineUrlSearchParams</span></span><a class="reference internal" href="../_modules/searx/search/processors/online_url_search.html#OnlineUrlSearchParams"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_url_search.OnlineUrlSearchParams" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Request parameters of a <code class="docutils literal notranslate"><span class="pre">online_url_search</span></code> engine.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_url_search.OnlineUrlSearchProcessor">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.search.processors.online_url_search.</span></span><span class="sig-name descname"><span class="pre">OnlineUrlSearchProcessor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../dev/engines/enginelib.html#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/types.html#types.ModuleType" title="(in Python v3.14)"><span class="pre">types.ModuleType</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/search/processors/online_url_search.html#OnlineUrlSearchProcessor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_url_search.OnlineUrlSearchProcessor" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Processor class used by <code class="docutils literal notranslate"><span class="pre">online_url_search</span></code> engines.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.search.processors.online_url_search.OnlineUrlSearchProcessor.get_params">
|
||||
<span class="sig-name descname"><span class="pre">get_params</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">search_query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="searx.search.html#searx.search.models.SearchQuery" title="searx.search.models.SearchQuery"><span class="pre">SearchQuery</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">engine_category</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="#searx.search.processors.online_url_search.OnlineUrlSearchParams" title="searx.search.processors.online_url_search.OnlineUrlSearchParams"><span class="pre">OnlineUrlSearchParams</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/search/processors/online_url_search.html#OnlineUrlSearchProcessor.get_params"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.search.processors.online_url_search.OnlineUrlSearchProcessor.get_params" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a dictionary with the <a class="reference internal" href="../dev/engines/engine_overview.html#engine-request-online-currency"><span class="std std-ref">request params</span></a> (<a class="reference internal" href="#searx.search.processors.online_url_search.OnlineUrlSearchParams" title="searx.search.processors.online_url_search.OnlineUrlSearchParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OnlineUrlSearchParams</span></code></a>). <code class="docutils literal notranslate"><span class="pre">None</span></code> is
|
||||
returned if the search query does not match <a class="reference internal" href="#searx.search.processors.online_url_search.search_syntax" title="searx.search.processors.online_url_search.search_syntax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_syntax</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.settings.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Settings Loader</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="searx.search.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Search</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Search processors</a><ul>
|
||||
<li><a class="reference internal" href="#module-searx.search.processors.abstract">Abstract processor class</a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.RequestParams"><code class="docutils literal notranslate"><span class="pre">RequestParams</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.RequestParams.query"><code class="docutils literal notranslate"><span class="pre">RequestParams.query</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.RequestParams.category"><code class="docutils literal notranslate"><span class="pre">RequestParams.category</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.RequestParams.pageno"><code class="docutils literal notranslate"><span class="pre">RequestParams.pageno</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.RequestParams.safesearch"><code class="docutils literal notranslate"><span class="pre">RequestParams.safesearch</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.RequestParams.time_range"><code class="docutils literal notranslate"><span class="pre">RequestParams.time_range</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.RequestParams.engine_data"><code class="docutils literal notranslate"><span class="pre">RequestParams.engine_data</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.RequestParams.searxng_locale"><code class="docutils literal notranslate"><span class="pre">RequestParams.searxng_locale</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.SuspendedStatus"><code class="docutils literal notranslate"><span class="pre">SuspendedStatus</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.EngineProcessor"><code class="docutils literal notranslate"><span class="pre">EngineProcessor</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.EngineProcessor.initialize"><code class="docutils literal notranslate"><span class="pre">EngineProcessor.initialize()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.abstract.EngineProcessor.get_params"><code class="docutils literal notranslate"><span class="pre">EngineProcessor.get_params()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#module-searx.search.processors.offline">Offline processor</a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.offline.OfflineProcessor"><code class="docutils literal notranslate"><span class="pre">OfflineProcessor</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#module-searx.search.processors.online">Online processor</a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online.OnlineProcessor"><code class="docutils literal notranslate"><span class="pre">OnlineProcessor</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online.OnlineProcessor.init_engine"><code class="docutils literal notranslate"><span class="pre">OnlineProcessor.init_engine()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online.OnlineProcessor.get_params"><code class="docutils literal notranslate"><span class="pre">OnlineProcessor.get_params()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online.OnlineParams"><code class="docutils literal notranslate"><span class="pre">OnlineParams</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#module-searx.search.processors.online_currency">Online currency processor</a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_currency.search_syntax"><code class="docutils literal notranslate"><span class="pre">search_syntax</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_currency.CurrenciesParams"><code class="docutils literal notranslate"><span class="pre">CurrenciesParams</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_currency.CurrenciesParams.amount"><code class="docutils literal notranslate"><span class="pre">CurrenciesParams.amount</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_currency.CurrenciesParams.to_iso4217"><code class="docutils literal notranslate"><span class="pre">CurrenciesParams.to_iso4217</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_currency.CurrenciesParams.from_iso4217"><code class="docutils literal notranslate"><span class="pre">CurrenciesParams.from_iso4217</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_currency.CurrenciesParams.from_name"><code class="docutils literal notranslate"><span class="pre">CurrenciesParams.from_name</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_currency.CurrenciesParams.to_name"><code class="docutils literal notranslate"><span class="pre">CurrenciesParams.to_name</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_currency.OnlineCurrenciesParams"><code class="docutils literal notranslate"><span class="pre">OnlineCurrenciesParams</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_currency.OnlineCurrencyProcessor"><code class="docutils literal notranslate"><span class="pre">OnlineCurrencyProcessor</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_currency.OnlineCurrencyProcessor.get_params"><code class="docutils literal notranslate"><span class="pre">OnlineCurrencyProcessor.get_params()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#module-searx.search.processors.online_dictionary">Online dictionary processor</a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_dictionary.search_syntax"><code class="docutils literal notranslate"><span class="pre">search_syntax</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_dictionary.FromToType"><code class="docutils literal notranslate"><span class="pre">FromToType</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_dictionary.DictParams"><code class="docutils literal notranslate"><span class="pre">DictParams</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_dictionary.DictParams.from_lang"><code class="docutils literal notranslate"><span class="pre">DictParams.from_lang</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_dictionary.DictParams.to_lang"><code class="docutils literal notranslate"><span class="pre">DictParams.to_lang</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_dictionary.DictParams.query"><code class="docutils literal notranslate"><span class="pre">DictParams.query</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_dictionary.OnlineDictParams"><code class="docutils literal notranslate"><span class="pre">OnlineDictParams</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_dictionary.OnlineDictionaryProcessor"><code class="docutils literal notranslate"><span class="pre">OnlineDictionaryProcessor</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_dictionary.OnlineDictionaryProcessor.get_params"><code class="docutils literal notranslate"><span class="pre">OnlineDictionaryProcessor.get_params()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#module-searx.search.processors.online_url_search">Online URL search processor</a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_url_search.search_syntax"><code class="docutils literal notranslate"><span class="pre">search_syntax</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_url_search.UrlParams"><code class="docutils literal notranslate"><span class="pre">UrlParams</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_url_search.OnlineUrlSearchParams"><code class="docutils literal notranslate"><span class="pre">OnlineUrlSearchParams</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_url_search.OnlineUrlSearchProcessor"><code class="docutils literal notranslate"><span class="pre">OnlineUrlSearchProcessor</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.search.processors.online_url_search.OnlineUrlSearchProcessor.get_params"><code class="docutils literal notranslate"><span class="pre">OnlineUrlSearchProcessor.get_params()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,805 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Utility functions for the engines" href="searx.utils.html"><link rel="prev" title="Settings Loader" href="searx.settings.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>SQLite DB - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.sqlitedb.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.sqlitedb.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="sqlite-db">
|
||||
<span id="id1"></span><h1>SQLite DB<a class="headerlink" href="#sqlite-db" title="Link to this heading">¶</a></h1>
|
||||
<p id="module-searx.sqlitedb">Implementations to make access to SQLite databases a little more convenient.</p>
|
||||
<dl class="simple">
|
||||
<dt><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl" title="searx.sqlitedb.SQLiteAppl"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLiteAppl</span></code></a></dt><dd><p>Abstract class with which DB applications can be implemented.</p>
|
||||
</dd>
|
||||
<dt><a class="reference internal" href="#searx.sqlitedb.SQLiteProperties" title="searx.sqlitedb.SQLiteProperties"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLiteProperties</span></code></a>:</dt><dd><p>Class to manage properties stored in a database.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Examplarical implementations based on <a class="reference internal" href="#searx.sqlitedb.SQLiteAppl" title="searx.sqlitedb.SQLiteAppl"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLiteAppl</span></code></a>:</p>
|
||||
<dl class="simple">
|
||||
<dt><a class="reference internal" href="searx.cache.html#searx.cache.ExpireCacheSQLite" title="searx.cache.ExpireCacheSQLite"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.cache.ExpireCacheSQLite</span></code></a> :</dt><dd><p>Cache that manages key/value pairs in a SQLite DB, in which the key/value
|
||||
pairs are deleted after an “expire” time. This type of cache is used, for
|
||||
example, for the engines, see <a class="reference internal" href="../dev/engines/enginelib.html#searx.enginelib.EngineCache" title="searx.enginelib.EngineCache"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.enginelib.EngineCache</span></code></a>.</p>
|
||||
</dd>
|
||||
<dt><a class="reference internal" href="searx.favicons.html#searx.favicons.cache.FaviconCacheSQLite" title="searx.favicons.cache.FaviconCacheSQLite"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.favicons.cache.FaviconCacheSQLite</span></code></a> :</dt><dd><p>Favicon cache that manages the favicon BLOBs in a SQLite DB.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<hr class="docutils" />
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.DBSession">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.sqlitedb.</span></span><span class="sig-name descname"><span class="pre">DBSession</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">app</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl" title="searx.sqlitedb.SQLiteAppl"><span class="pre">SQLiteAppl</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/sqlitedb.html#DBSession"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.DBSession" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>A <em>thead-local</em> DB session</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.DBSession.get_connect">
|
||||
<span class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">get_connect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">app</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl" title="searx.sqlitedb.SQLiteAppl"><span class="pre">SQLiteAppl</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection" title="(in Python v3.14)"><span class="pre">Connection</span></a></span></span><a class="reference internal" href="../_modules/searx/sqlitedb.html#DBSession.get_connect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.DBSession.get_connect" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a thread local DB connection. The connection is only
|
||||
established once per thread.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteAppl">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.sqlitedb.</span></span><span class="sig-name descname"><span class="pre">SQLiteAppl</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">db_url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/sqlitedb.html#SQLiteAppl"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.SQLiteAppl" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Abstract base class for implementing convenient DB access in SQLite
|
||||
applications. In the constructor, a <a class="reference internal" href="#searx.sqlitedb.SQLiteProperties" title="searx.sqlitedb.SQLiteProperties"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLiteProperties</span></code></a> instance is
|
||||
already aggregated under <code class="docutils literal notranslate"><span class="pre">self.properties</span></code>.</p>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteAppl.DB_SCHEMA">
|
||||
<span class="sig-name descname"><span class="pre">DB_SCHEMA</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">1</span></span><a class="headerlink" href="#searx.sqlitedb.SQLiteAppl.DB_SCHEMA" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>As soon as changes are made to the DB schema, the version number must be
|
||||
increased. Changes to the version number require the DB to be recreated (or
|
||||
migrated / if an migration path exists and is implemented).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteAppl.SQLITE_THREADING_MODE">
|
||||
<span class="sig-name descname"><span class="pre">SQLITE_THREADING_MODE</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'serialized'</span></span><a class="headerlink" href="#searx.sqlitedb.SQLiteAppl.SQLITE_THREADING_MODE" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Threading mode of the SQLite library. Depends on the options used at
|
||||
compile time and is different for different distributions and architectures.</p>
|
||||
<p>Possible values are 0:<code class="docutils literal notranslate"><span class="pre">single-thread</span></code>, 1:<code class="docutils literal notranslate"><span class="pre">multi-thread</span></code>,
|
||||
3:<code class="docutils literal notranslate"><span class="pre">serialized</span></code> (see <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.threadsafety" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sqlite3.threadsafety</span></code></a>). Pre- Python 3.11
|
||||
this value was hard coded to 1.</p>
|
||||
<p>Depending on this value, optimizations are made, e.g. in “serialized” mode
|
||||
it is not necessary to create a separate DB connector for each thread.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteAppl.SQLITE_JOURNAL_MODE">
|
||||
<span class="sig-name descname"><span class="pre">SQLITE_JOURNAL_MODE</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'WAL'</span></span><a class="headerlink" href="#searx.sqlitedb.SQLiteAppl.SQLITE_JOURNAL_MODE" title="Link to this definition">¶</a></dt>
|
||||
<dd><p><code class="docutils literal notranslate"><span class="pre">SQLiteAppl</span></code> applications are optimized for <a class="reference external" href="https://sqlite.org/wal.html">WAL</a> mode, its not recommend
|
||||
to change the journal mode (see <code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLiteAppl.tear_down</span></code>).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteAppl.SQLITE_CONNECT_ARGS">
|
||||
<span class="sig-name descname"><span class="pre">SQLITE_CONNECT_ARGS</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a><span class="p"><span class="pre">]</span></span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'cached_statements':</span> <span class="pre">0,</span> <span class="pre">'check_same_thread':</span> <span class="pre">False}</span></span><a class="headerlink" href="#searx.sqlitedb.SQLiteAppl.SQLITE_CONNECT_ARGS" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Connection arguments (<a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.connect" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sqlite3.connect</span></code></a>)</p>
|
||||
<dl>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">check_same_thread</span></code>: <em>bool</em></dt><dd><p>Is disabled by default when <a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.SQLITE_THREADING_MODE" title="searx.sqlitedb.SQLiteAppl.SQLITE_THREADING_MODE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLITE_THREADING_MODE</span></code></a> is
|
||||
<cite>serialized</cite>. The check is more of a hindrance when <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.threadsafety">threadsafety</a> is
|
||||
<cite>serialized</cite> because it would prevent a DB connector from being used in
|
||||
multiple threads.</p>
|
||||
<p>Is enabled when <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.threadsafety">threadsafety</a> is <code class="docutils literal notranslate"><span class="pre">single-thread</span></code> or <code class="docutils literal notranslate"><span class="pre">multi-thread</span></code>
|
||||
(when threads cannot share a connection <a class="reference external" href="https://peps.python.org/pep-0249/#threadsafety">PEP-0249</a>).</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">cached_statements</span></code>:</dt><dd><p>Is set to <code class="docutils literal notranslate"><span class="pre">0</span></code> by default. Note: Python 3.12+ fetch result are not
|
||||
consistent in multi-threading application and causing an API misuse error.</p>
|
||||
<p>The multithreading use in SQLiteAppl is intended and supported if
|
||||
threadsafety is set to 3 (aka “serialized”). CPython supports “serialized”
|
||||
from version 3.12 on, but unfortunately only with errors:</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="https://github.com/python/cpython/issues/118172">https://github.com/python/cpython/issues/118172</a></p></li>
|
||||
<li><p><a class="reference external" href="https://github.com/python/cpython/issues/123873">https://github.com/python/cpython/issues/123873</a></p></li>
|
||||
</ul>
|
||||
<p>The workaround for SQLite3 multithreading cache inconsistency is to set
|
||||
option <code class="docutils literal notranslate"><span class="pre">cached_statements</span></code> to <code class="docutils literal notranslate"><span class="pre">0</span></code> by default.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">isolation_level</span></code>: <em>unset</em></dt><dd><p>If the connection attribute <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.isolation_level">isolation_level</a> is <strong>not</strong> <code class="docutils literal notranslate"><span class="pre">None</span></code>, new
|
||||
transactions are implicitly opened before <code class="docutils literal notranslate"><span class="pre">execute()</span></code> and
|
||||
<code class="docutils literal notranslate"><span class="pre">executemany()</span></code> executes SQL- INSERT, UPDATE, DELETE, or REPLACE
|
||||
statements <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3-transaction-control-isolation-level">[1]</a>.</p>
|
||||
<p>By default, the value is not set, which means the default from Python is
|
||||
used: Python’s default is <code class="docutils literal notranslate"><span class="pre">""</span></code>, which is an alias for <code class="docutils literal notranslate"><span class="pre">"DEFERRED"</span></code>.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">autocommit</span></code>: <em>unset</em></dt><dd><p>Starting with Python 3.12 the DB connection has a <code class="docutils literal notranslate"><span class="pre">autocommit</span></code> attribute
|
||||
and the recommended way of controlling transaction behaviour is through
|
||||
this attribute <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#transaction-control-via-the-autocommit-attribute">[2]</a>.</p>
|
||||
<p>By default, the value is not set, which means the default from Python is
|
||||
used: Python’s default is the constant <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.LEGACY_TRANSACTION_CONTROL">LEGACY_TRANSACTION_CONTROL</a>:
|
||||
Pre-Python 3.12 (non-PEP 249-compliant) transaction control, see
|
||||
<code class="docutils literal notranslate"><span class="pre">isolation_level</span></code> above for more details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteAppl.connect">
|
||||
<span class="sig-name descname"><span class="pre">connect</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection" title="(in Python v3.14)"><span class="pre">Connection</span></a></span></span><a class="reference internal" href="../_modules/searx/sqlitedb.html#SQLiteAppl.connect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.SQLiteAppl.connect" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Creates a new DB connection (<a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.SQLITE_CONNECT_ARGS" title="searx.sqlitedb.SQLiteAppl.SQLITE_CONNECT_ARGS"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLITE_CONNECT_ARGS</span></code></a>). If not
|
||||
already done, the DB schema is set up. The caller must take care of
|
||||
closing the resource. Alternatively, <a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.DB" title="searx.sqlitedb.SQLiteAppl.DB"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLiteAppl.DB</span></code></a> can also
|
||||
be used (the resource behind <cite>self.DB</cite> is automatically closed when the
|
||||
process or thread is terminated).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteAppl.register_functions">
|
||||
<span class="sig-name descname"><span class="pre">register_functions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">conn</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection" title="(in Python v3.14)"><span class="pre">Connection</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/sqlitedb.html#SQLiteAppl.register_functions"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.SQLiteAppl.register_functions" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Create <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.create_function">user-defined</a> SQL functions.</p>
|
||||
<dl>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">REGEXP(<pattern>,</span> <span class="pre"><field>)</span></code><span class="classifier">0 | 1</span></dt><dd><p><a class="reference external" href="https://docs.python.org/3/library/re.html#re.search">re.search</a> returns (int) 1 for a match and 0 for none match of
|
||||
<code class="docutils literal notranslate"><span class="pre"><pattern></span></code> in <code class="docutils literal notranslate"><span class="pre"><field></span></code>.</p>
|
||||
<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="s1">'12'</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="n">field</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">REGEXP</span><span class="p">(</span><span class="s1">'^[0-9][0-9]$'</span><span class="p">,</span><span class="w"> </span><span class="n">field</span><span class="p">)</span>
|
||||
<span class="c1">-- 12</span>
|
||||
|
||||
<span class="k">SELECT</span><span class="w"> </span><span class="n">REGEXP</span><span class="p">(</span><span class="s1">'[0-9][0-9]'</span><span class="p">,</span><span class="w"> </span><span class="s1">'X12Y'</span><span class="p">)</span>
|
||||
<span class="c1">-- 1</span>
|
||||
<span class="k">SELECT</span><span class="w"> </span><span class="n">REGEXP</span><span class="p">(</span><span class="s1">'[0-9][0-9]'</span><span class="p">,</span><span class="w"> </span><span class="s1">'X1Y'</span><span class="p">)</span>
|
||||
<span class="c1">-- 0</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py property">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteAppl.DB">
|
||||
<span class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></span><span class="sig-name descname"><span class="pre">DB</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection" title="(in Python v3.14)"><span class="pre">Connection</span></a></span><a class="headerlink" href="#searx.sqlitedb.SQLiteAppl.DB" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Provides a DB connection. The connection is a <em>singleton</em> and
|
||||
therefore well suited for read access. If
|
||||
<a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.SQLITE_THREADING_MODE" title="searx.sqlitedb.SQLiteAppl.SQLITE_THREADING_MODE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLITE_THREADING_MODE</span></code></a> is <code class="docutils literal notranslate"><span class="pre">serialized</span></code> only one DB connection
|
||||
is created for all threads.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>For dedicated <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3-controlling-transactions">transaction control</a>, it is recommended to create a
|
||||
new connection (<a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.connect" title="searx.sqlitedb.SQLiteAppl.connect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLiteAppl.connect</span></code></a>).</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteAppl.init">
|
||||
<span class="sig-name descname"><span class="pre">init</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">conn</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection" title="(in Python v3.14)"><span class="pre">Connection</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/searx/sqlitedb.html#SQLiteAppl.init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.SQLiteAppl.init" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Initializes the DB schema and properties, is only executed once even
|
||||
if called several times.</p>
|
||||
<p>If the initialization has not yet taken place, it is carried out and a
|
||||
<cite>True</cite> is returned to the caller at the end. If the initialization has
|
||||
already been carried out in the past, <cite>False</cite> is returned.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteProperties">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.sqlitedb.</span></span><span class="sig-name descname"><span class="pre">SQLiteProperties</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">db_url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/sqlitedb.html#SQLiteProperties"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.SQLiteProperties" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Simple class to manage properties of a DB application in the DB. The
|
||||
object has its own DB connection and transaction area.</p>
|
||||
<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="k">IF</span><span class="w"> </span><span class="k">NOT</span><span class="w"> </span><span class="k">EXISTS</span><span class="w"> </span><span class="n">properties</span><span class="w"> </span><span class="p">(</span>
|
||||
<span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="nb">TEXT</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="nb">TEXT</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="n">m_time</span><span class="w"> </span><span class="nb">INTEGER</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="p">(</span><span class="n">strftime</span><span class="p">(</span><span class="s1">'%s'</span><span class="p">,</span><span class="w"> </span><span class="s1">'now'</span><span class="p">)),</span>
|
||||
<span class="w"> </span><span class="k">PRIMARY</span><span class="w"> </span><span class="k">KEY</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">))</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteProperties.SQLITE_JOURNAL_MODE">
|
||||
<span class="sig-name descname"><span class="pre">SQLITE_JOURNAL_MODE</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'WAL'</span></span><a class="headerlink" href="#searx.sqlitedb.SQLiteProperties.SQLITE_JOURNAL_MODE" title="Link to this definition">¶</a></dt>
|
||||
<dd><p><code class="docutils literal notranslate"><span class="pre">SQLiteAppl</span></code> applications are optimized for <a class="reference external" href="https://sqlite.org/wal.html">WAL</a> mode, its not recommend
|
||||
to change the journal mode (see <code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLiteAppl.tear_down</span></code>).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteProperties.DDL_PROPERTIES">
|
||||
<span class="sig-name descname"><span class="pre">DDL_PROPERTIES</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">"CREATE</span> <span class="pre">TABLE</span> <span class="pre">IF</span> <span class="pre">NOT</span> <span class="pre">EXISTS</span> <span class="pre">properties</span> <span class="pre">(\n</span>  <span class="pre">name</span>       <span class="pre">TEXT,\n</span>  <span class="pre">value</span>      <span class="pre">TEXT,\n</span>  <span class="pre">m_time</span>     <span class="pre">INTEGER</span> <span class="pre">DEFAULT</span> <span class="pre">(strftime('%s',</span> <span class="pre">'now')),</span>  <span class="pre">--</span> <span class="pre">last</span> <span class="pre">modified</span> <span class="pre">(unix</span> <span class="pre">epoch)</span> <span class="pre">time</span> <span class="pre">in</span> <span class="pre">sec.\n</span>  <span class="pre">PRIMARY</span> <span class="pre">KEY</span> <span class="pre">(name))"</span></span><a class="headerlink" href="#searx.sqlitedb.SQLiteProperties.DDL_PROPERTIES" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Table to store properties of the DB application</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteProperties.SQLITE_CONNECT_ARGS">
|
||||
<span class="sig-name descname"><span class="pre">SQLITE_CONNECT_ARGS</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a><span class="p"><span class="pre">]</span></span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'cached_statements':</span> <span class="pre">0,</span> <span class="pre">'check_same_thread':</span> <span class="pre">False}</span></span><a class="headerlink" href="#searx.sqlitedb.SQLiteProperties.SQLITE_CONNECT_ARGS" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Connection arguments (<a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.connect" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sqlite3.connect</span></code></a>)</p>
|
||||
<dl>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">check_same_thread</span></code>: <em>bool</em></dt><dd><p>Is disabled by default when <code class="xref py py-obj docutils literal notranslate"><span class="pre">SQLITE_THREADING_MODE</span></code> is
|
||||
<cite>serialized</cite>. The check is more of a hindrance when <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.threadsafety">threadsafety</a> is
|
||||
<cite>serialized</cite> because it would prevent a DB connector from being used in
|
||||
multiple threads.</p>
|
||||
<p>Is enabled when <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.threadsafety">threadsafety</a> is <code class="docutils literal notranslate"><span class="pre">single-thread</span></code> or <code class="docutils literal notranslate"><span class="pre">multi-thread</span></code>
|
||||
(when threads cannot share a connection <a class="reference external" href="https://peps.python.org/pep-0249/#threadsafety">PEP-0249</a>).</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">cached_statements</span></code>:</dt><dd><p>Is set to <code class="docutils literal notranslate"><span class="pre">0</span></code> by default. Note: Python 3.12+ fetch result are not
|
||||
consistent in multi-threading application and causing an API misuse error.</p>
|
||||
<p>The multithreading use in SQLiteAppl is intended and supported if
|
||||
threadsafety is set to 3 (aka “serialized”). CPython supports “serialized”
|
||||
from version 3.12 on, but unfortunately only with errors:</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="https://github.com/python/cpython/issues/118172">https://github.com/python/cpython/issues/118172</a></p></li>
|
||||
<li><p><a class="reference external" href="https://github.com/python/cpython/issues/123873">https://github.com/python/cpython/issues/123873</a></p></li>
|
||||
</ul>
|
||||
<p>The workaround for SQLite3 multithreading cache inconsistency is to set
|
||||
option <code class="docutils literal notranslate"><span class="pre">cached_statements</span></code> to <code class="docutils literal notranslate"><span class="pre">0</span></code> by default.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">isolation_level</span></code>: <em>unset</em></dt><dd><p>If the connection attribute <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.isolation_level">isolation_level</a> is <strong>not</strong> <code class="docutils literal notranslate"><span class="pre">None</span></code>, new
|
||||
transactions are implicitly opened before <code class="docutils literal notranslate"><span class="pre">execute()</span></code> and
|
||||
<code class="docutils literal notranslate"><span class="pre">executemany()</span></code> executes SQL- INSERT, UPDATE, DELETE, or REPLACE
|
||||
statements <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3-transaction-control-isolation-level">[1]</a>.</p>
|
||||
<p>By default, the value is not set, which means the default from Python is
|
||||
used: Python’s default is <code class="docutils literal notranslate"><span class="pre">""</span></code>, which is an alias for <code class="docutils literal notranslate"><span class="pre">"DEFERRED"</span></code>.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">autocommit</span></code>: <em>unset</em></dt><dd><p>Starting with Python 3.12 the DB connection has a <code class="docutils literal notranslate"><span class="pre">autocommit</span></code> attribute
|
||||
and the recommended way of controlling transaction behaviour is through
|
||||
this attribute <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#transaction-control-via-the-autocommit-attribute">[2]</a>.</p>
|
||||
<p>By default, the value is not set, which means the default from Python is
|
||||
used: Python’s default is the constant <a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.LEGACY_TRANSACTION_CONTROL">LEGACY_TRANSACTION_CONTROL</a>:
|
||||
Pre-Python 3.12 (non-PEP 249-compliant) transaction control, see
|
||||
<code class="docutils literal notranslate"><span class="pre">isolation_level</span></code> above for more details.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteProperties.init">
|
||||
<span class="sig-name descname"><span class="pre">init</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">conn</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection" title="(in Python v3.14)"><span class="pre">Connection</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../_modules/searx/sqlitedb.html#SQLiteProperties.init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.SQLiteProperties.init" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Initializes DB schema of the properties in the DB.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteProperties.set">
|
||||
<span class="sig-name descname"><span class="pre">set</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/sqlitedb.html#SQLiteProperties.set"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.SQLiteProperties.set" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Set <code class="docutils literal notranslate"><span class="pre">value</span></code> of property <code class="docutils literal notranslate"><span class="pre">name</span></code> in DB. If property already
|
||||
exists, update the <code class="docutils literal notranslate"><span class="pre">m_time</span></code> (and the value).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteProperties.delete">
|
||||
<span class="sig-name descname"><span class="pre">delete</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></span><a class="reference internal" href="../_modules/searx/sqlitedb.html#SQLiteProperties.delete"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.SQLiteProperties.delete" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Delete of property <code class="docutils literal notranslate"><span class="pre">name</span></code> from DB.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteProperties.row">
|
||||
<span class="sig-name descname"><span class="pre">row</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/sqlitedb.html#SQLiteProperties.row"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.SQLiteProperties.row" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns the DB row of property <code class="docutils literal notranslate"><span class="pre">name</span></code> or <code class="docutils literal notranslate"><span class="pre">default</span></code> if property
|
||||
not exists in DB.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="searx.sqlitedb.SQLiteProperties.m_time">
|
||||
<span class="sig-name descname"><span class="pre">m_time</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></span><a class="reference internal" href="../_modules/searx/sqlitedb.html#SQLiteProperties.m_time"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.sqlitedb.SQLiteProperties.m_time" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Last modification time of this property.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.utils.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Utility functions for the engines</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="searx.settings.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Settings Loader</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">SQLite DB</a><ul>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.DBSession"><code class="docutils literal notranslate"><span class="pre">DBSession</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.DBSession.get_connect"><code class="docutils literal notranslate"><span class="pre">DBSession.get_connect()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl"><code class="docutils literal notranslate"><span class="pre">SQLiteAppl</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.DB_SCHEMA"><code class="docutils literal notranslate"><span class="pre">SQLiteAppl.DB_SCHEMA</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.SQLITE_THREADING_MODE"><code class="docutils literal notranslate"><span class="pre">SQLiteAppl.SQLITE_THREADING_MODE</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.SQLITE_JOURNAL_MODE"><code class="docutils literal notranslate"><span class="pre">SQLiteAppl.SQLITE_JOURNAL_MODE</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.SQLITE_CONNECT_ARGS"><code class="docutils literal notranslate"><span class="pre">SQLiteAppl.SQLITE_CONNECT_ARGS</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.connect"><code class="docutils literal notranslate"><span class="pre">SQLiteAppl.connect()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.register_functions"><code class="docutils literal notranslate"><span class="pre">SQLiteAppl.register_functions()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.DB"><code class="docutils literal notranslate"><span class="pre">SQLiteAppl.DB</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteAppl.init"><code class="docutils literal notranslate"><span class="pre">SQLiteAppl.init()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteProperties"><code class="docutils literal notranslate"><span class="pre">SQLiteProperties</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteProperties.SQLITE_JOURNAL_MODE"><code class="docutils literal notranslate"><span class="pre">SQLiteProperties.SQLITE_JOURNAL_MODE</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteProperties.DDL_PROPERTIES"><code class="docutils literal notranslate"><span class="pre">SQLiteProperties.DDL_PROPERTIES</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteProperties.SQLITE_CONNECT_ARGS"><code class="docutils literal notranslate"><span class="pre">SQLiteProperties.SQLITE_CONNECT_ARGS</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteProperties.init"><code class="docutils literal notranslate"><span class="pre">SQLiteProperties.init()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteProperties.set"><code class="docutils literal notranslate"><span class="pre">SQLiteProperties.set()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteProperties.delete"><code class="docutils literal notranslate"><span class="pre">SQLiteProperties.delete()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteProperties.row"><code class="docutils literal notranslate"><span class="pre">SQLiteProperties.row()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.sqlitedb.SQLiteProperties.m_time"><code class="docutils literal notranslate"><span class="pre">SQLiteProperties.m_time()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,908 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Valkey DB" href="searx.valkeydb.html"><link rel="prev" title="SQLite DB" href="searx.sqlitedb.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>Utility functions for the engines - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.utils.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.utils.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-searx.utils">
|
||||
<span id="utility-functions-for-the-engines"></span><span id="searx-utils"></span><h1>Utility functions for the engines<a class="headerlink" href="#module-searx.utils" title="Link to this heading">¶</a></h1>
|
||||
<p>Utility functions for the engines</p>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.utils.XPathSpecType">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">XPathSpecType</span></span><span class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.TypeAlias" title="(in Python v3.14)"><span class="pre">TypeAlias</span></a></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">str</span> <span class="pre">|</span> <span class="pre">lxml.etree.XPath</span></span><a class="headerlink" href="#searx.utils.XPathSpecType" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Type alias used by <a class="reference internal" href="#searx.utils.get_xpath" title="searx.utils.get_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.utils.get_xpath</span></code></a>,
|
||||
<a class="reference internal" href="#searx.utils.eval_xpath" title="searx.utils.eval_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.utils.eval_xpath</span></code></a> and other XPath selectors.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.searxng_useragent">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">searxng_useragent</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#searxng_useragent"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.searxng_useragent" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Return the SearXNG User Agent</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.gen_useragent">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">gen_useragent</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">os_string</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#gen_useragent"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.gen_useragent" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Return a random browser User Agent</p>
|
||||
<p>See searx/data/useragents.json</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.gen_gsa_useragent">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">gen_gsa_useragent</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#gen_gsa_useragent"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.gen_gsa_useragent" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Return a random “Google Go App” User Agent suitable for Google</p>
|
||||
<p>See searx/data/gsa_useragents.txt</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="searx.utils.HTMLTextExtractor">
|
||||
<span class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></span><span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">HTMLTextExtractor</span></span><a class="reference internal" href="../_modules/searx/utils.html#HTMLTextExtractor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.HTMLTextExtractor" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Internal class to extract text from HTML</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.html_to_text">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">html_to_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">html_str</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#html_to_text"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.html_to_text" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Extract text from a HTML string</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><ul class="simple">
|
||||
<li><p>html_str (str): string HTML</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><ul class="simple">
|
||||
<li><p>str: extracted text</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>Examples:</dt><dd><div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">html_to_text</span><span class="p">(</span><span class="s1">'Example <span id="42">#2</span>'</span><span class="p">)</span>
|
||||
<span class="go">'Example #2'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">html_to_text</span><span class="p">(</span><span class="s1">'<style>.span { color: red; }</style><span>Example</span>'</span><span class="p">)</span>
|
||||
<span class="go">'Example'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">html_to_text</span><span class="p">(</span><span class="sa">r</span><span class="s1">'regexp: (?&lt;![a-zA-Z]'</span><span class="p">)</span>
|
||||
<span class="go">'regexp: (?<![a-zA-Z]'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">html_to_text</span><span class="p">(</span><span class="sa">r</span><span class="s1">'<p><b>Lorem ipsum </i>dolor sit amet</p>'</span><span class="p">)</span>
|
||||
<span class="go">'Lorem ipsum </i>dolor sit amet</p>'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">html_to_text</span><span class="p">(</span><span class="sa">r</span><span class="s1">'&#x3e &#x3c &#97'</span><span class="p">)</span>
|
||||
<span class="go">'> < a'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.markdown_to_text">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">markdown_to_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">markdown_str</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#markdown_to_text"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.markdown_to_text" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Extract text from a Markdown string</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><ul class="simple">
|
||||
<li><p>markdown_str (str): string Markdown</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><ul class="simple">
|
||||
<li><p>str: extracted text</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>Examples:</dt><dd><div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">markdown_to_text</span><span class="p">(</span><span class="s1">'[example](https://example.com)'</span><span class="p">)</span>
|
||||
<span class="go">'example'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">markdown_to_text</span><span class="p">(</span><span class="s1">'## Headline'</span><span class="p">)</span>
|
||||
<span class="go">'Headline'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.extract_text">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">extract_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath_results</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.ElementBase" title="(in lxml v7.0.0a1)"><span class="pre">ElementBase</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree._Element" title="(in lxml v7.0.0a1)"><span class="pre">_Element</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.ElementBase" title="(in lxml v7.0.0a1)"><span class="pre">ElementBase</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree._Element" title="(in lxml v7.0.0a1)"><span class="pre">_Element</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/numbers.html#numbers.Number" title="(in Python v3.14)"><span class="pre">Number</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">allow_none</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#extract_text"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.extract_text" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Extract text from a lxml result</p>
|
||||
<ul class="simple">
|
||||
<li><p>If <code class="docutils literal notranslate"><span class="pre">xpath_results</span></code> is a list of <code class="xref py py-obj docutils literal notranslate"><span class="pre">ElementType</span></code> objects, extract
|
||||
the text from each result and concatenate the list in a string.</p></li>
|
||||
<li><p>If <code class="docutils literal notranslate"><span class="pre">xpath_results</span></code> is a <code class="xref py py-obj docutils literal notranslate"><span class="pre">ElementType</span></code> object, extract all the
|
||||
text node from it ( <a class="reference external" href="https://lxml.de/apidoc/lxml.html.html#lxml.html.tostring" title="(in lxml v7.0.0a1)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lxml.html.tostring</span></code></a>, <code class="docutils literal notranslate"><span class="pre">method="text"</span></code> )</p></li>
|
||||
<li><p>If <code class="docutils literal notranslate"><span class="pre">xpath_results</span></code> is of type <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">str</span></code></a> or <code class="xref py py-obj docutils literal notranslate"><span class="pre">Number</span></code>,
|
||||
<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bool</span></code></a> the string value is returned.</p></li>
|
||||
<li><p>If <code class="docutils literal notranslate"><span class="pre">xpath_results</span></code> is of type <code class="docutils literal notranslate"><span class="pre">None</span></code> a <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ValueError</span></code></a> is raised,
|
||||
except <code class="docutils literal notranslate"><span class="pre">allow_none</span></code> is <code class="docutils literal notranslate"><span class="pre">True</span></code> where <code class="docutils literal notranslate"><span class="pre">None</span></code> is returned.</p></li>
|
||||
</ul>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.normalize_url">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">normalize_url</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">base_url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#normalize_url"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.normalize_url" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Normalize URL: add protocol, join URL with base_url, add trailing slash if there is no path</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><ul class="simple">
|
||||
<li><p>url (str): Relative URL</p></li>
|
||||
<li><p>base_url (str): Base URL, it must be an absolute URL.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>Example:</dt><dd><div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">normalize_url</span><span class="p">(</span><span class="s1">'https://example.com'</span><span class="p">,</span> <span class="s1">'http://example.com/'</span><span class="p">)</span>
|
||||
<span class="go">'https://example.com/'</span>
|
||||
<span class="gp">>>> </span><span class="n">normalize_url</span><span class="p">(</span><span class="s1">'//example.com'</span><span class="p">,</span> <span class="s1">'http://example.com/'</span><span class="p">)</span>
|
||||
<span class="go">'http://example.com/'</span>
|
||||
<span class="gp">>>> </span><span class="n">normalize_url</span><span class="p">(</span><span class="s1">'//example.com'</span><span class="p">,</span> <span class="s1">'https://example.com/'</span><span class="p">)</span>
|
||||
<span class="go">'https://example.com/'</span>
|
||||
<span class="gp">>>> </span><span class="n">normalize_url</span><span class="p">(</span><span class="s1">'/path?a=1'</span><span class="p">,</span> <span class="s1">'https://example.com'</span><span class="p">)</span>
|
||||
<span class="go">'https://example.com/path?a=1'</span>
|
||||
<span class="gp">>>> </span><span class="n">normalize_url</span><span class="p">(</span><span class="s1">''</span><span class="p">,</span> <span class="s1">'https://example.com'</span><span class="p">)</span>
|
||||
<span class="go">'https://example.com/'</span>
|
||||
<span class="gp">>>> </span><span class="n">normalize_url</span><span class="p">(</span><span class="s1">'/test'</span><span class="p">,</span> <span class="s1">'/path'</span><span class="p">)</span>
|
||||
<span class="go">raise ValueError</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><ul class="simple">
|
||||
<li><p>lxml.etree.ParserError</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><ul class="simple">
|
||||
<li><p>str: normalized URL</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.extract_url">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">extract_url</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath_results</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.ElementBase" title="(in lxml v7.0.0a1)"><span class="pre">ElementBase</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree._Element" title="(in lxml v7.0.0a1)"><span class="pre">_Element</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.ElementBase" title="(in lxml v7.0.0a1)"><span class="pre">ElementBase</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree._Element" title="(in lxml v7.0.0a1)"><span class="pre">_Element</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/numbers.html#numbers.Number" title="(in Python v3.14)"><span class="pre">Number</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.14)"><span class="pre">bool</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">base_url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#extract_url"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.extract_url" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Extract and normalize URL from lxml Element</p>
|
||||
<dl>
|
||||
<dt>Example:</dt><dd><div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="k">def</span><span class="w"> </span><span class="nf">f</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">search_url</span><span class="p">):</span>
|
||||
<span class="gp">>>> </span> <span class="k">return</span> <span class="n">searx</span><span class="o">.</span><span class="n">utils</span><span class="o">.</span><span class="n">extract_url</span><span class="p">(</span><span class="n">html</span><span class="o">.</span><span class="n">fromstring</span><span class="p">(</span><span class="n">s</span><span class="p">),</span> <span class="n">search_url</span><span class="p">)</span>
|
||||
<span class="gp">>>> </span><span class="n">f</span><span class="p">(</span><span class="s1">'<span id="42">https://example.com</span>'</span><span class="p">,</span> <span class="s1">'http://example.com/'</span><span class="p">)</span>
|
||||
<span class="go">'https://example.com/'</span>
|
||||
<span class="gp">>>> </span><span class="n">f</span><span class="p">(</span><span class="s1">'https://example.com'</span><span class="p">,</span> <span class="s1">'http://example.com/'</span><span class="p">)</span>
|
||||
<span class="go">'https://example.com/'</span>
|
||||
<span class="gp">>>> </span><span class="n">f</span><span class="p">(</span><span class="s1">'//example.com'</span><span class="p">,</span> <span class="s1">'http://example.com/'</span><span class="p">)</span>
|
||||
<span class="go">'http://example.com/'</span>
|
||||
<span class="gp">>>> </span><span class="n">f</span><span class="p">(</span><span class="s1">'//example.com'</span><span class="p">,</span> <span class="s1">'https://example.com/'</span><span class="p">)</span>
|
||||
<span class="go">'https://example.com/'</span>
|
||||
<span class="gp">>>> </span><span class="n">f</span><span class="p">(</span><span class="s1">'/path?a=1'</span><span class="p">,</span> <span class="s1">'https://example.com'</span><span class="p">)</span>
|
||||
<span class="go">'https://example.com/path?a=1'</span>
|
||||
<span class="gp">>>> </span><span class="n">f</span><span class="p">(</span><span class="s1">''</span><span class="p">,</span> <span class="s1">'https://example.com'</span><span class="p">)</span>
|
||||
<span class="go">raise lxml.etree.ParserError</span>
|
||||
<span class="gp">>>> </span><span class="n">searx</span><span class="o">.</span><span class="n">utils</span><span class="o">.</span><span class="n">extract_url</span><span class="p">([],</span> <span class="s1">'https://example.com'</span><span class="p">)</span>
|
||||
<span class="go">raise ValueError</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><ul class="simple">
|
||||
<li><p>ValueError</p></li>
|
||||
<li><p>lxml.etree.ParserError</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><ul class="simple">
|
||||
<li><p>str: normalized URL</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.dict_subset">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">dict_subset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dictionary</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/collections.abc.html#collections.abc.MutableMapping" title="(in Python v3.14)"><span class="pre">MutableMapping</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">properties</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#set" title="(in Python v3.14)"><span class="pre">set</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/collections.abc.html#collections.abc.MutableMapping" title="(in Python v3.14)"><span class="pre">MutableMapping</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/searx/utils.html#dict_subset"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.dict_subset" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Extract a subset of a dict</p>
|
||||
<dl>
|
||||
<dt>Examples:</dt><dd><div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">dict_subset</span><span class="p">({</span><span class="s1">'A'</span><span class="p">:</span> <span class="s1">'a'</span><span class="p">,</span> <span class="s1">'B'</span><span class="p">:</span> <span class="s1">'b'</span><span class="p">,</span> <span class="s1">'C'</span><span class="p">:</span> <span class="s1">'c'</span><span class="p">},</span> <span class="p">[</span><span class="s1">'A'</span><span class="p">,</span> <span class="s1">'C'</span><span class="p">])</span>
|
||||
<span class="go">{'A': 'a', 'C': 'c'}</span>
|
||||
<span class="gp">>>> </span><span class="o">>></span> <span class="n">dict_subset</span><span class="p">({</span><span class="s1">'A'</span><span class="p">:</span> <span class="s1">'a'</span><span class="p">,</span> <span class="s1">'B'</span><span class="p">:</span> <span class="s1">'b'</span><span class="p">,</span> <span class="s1">'C'</span><span class="p">:</span> <span class="s1">'c'</span><span class="p">},</span> <span class="p">[</span><span class="s1">'A'</span><span class="p">,</span> <span class="s1">'D'</span><span class="p">])</span>
|
||||
<span class="go">{'A': 'a'}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.humanize_bytes">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">humanize_bytes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">size</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.14)"><span class="pre">float</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">precision</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">2</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/utils.html#humanize_bytes"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.humanize_bytes" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Determine the <em>human readable</em> value of bytes on 1024 base (1KB=1024B).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.humanize_number">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">humanize_number</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">size</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.14)"><span class="pre">float</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">precision</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/utils.html#humanize_number"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.humanize_number" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Determine the <em>human readable</em> value of a decimal number.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.convert_str_to_int">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">convert_str_to_int</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">number_str</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#convert_str_to_int"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.convert_str_to_int" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Convert number_str to int or 0 if number_str is not a number.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.extr">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">extr</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">txt</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">begin</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">end</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#extr"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.extr" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Extract the string between <code class="docutils literal notranslate"><span class="pre">begin</span></code> and <code class="docutils literal notranslate"><span class="pre">end</span></code> from <code class="docutils literal notranslate"><span class="pre">txt</span></code></p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>txt</strong> – String to search in</p></li>
|
||||
<li><p><strong>begin</strong> – First string to be searched for</p></li>
|
||||
<li><p><strong>end</strong> – Second string to be searched for after <code class="docutils literal notranslate"><span class="pre">begin</span></code></p></li>
|
||||
<li><p><strong>default</strong> – Default value if one of <code class="docutils literal notranslate"><span class="pre">begin</span></code> or <code class="docutils literal notranslate"><span class="pre">end</span></code> is not
|
||||
found. Defaults to an empty string.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||||
<dd class="field-even"><p>The string between the two search-strings <code class="docutils literal notranslate"><span class="pre">begin</span></code> and <code class="docutils literal notranslate"><span class="pre">end</span></code>.
|
||||
If at least one of <code class="docutils literal notranslate"><span class="pre">begin</span></code> or <code class="docutils literal notranslate"><span class="pre">end</span></code> is not found, the value of
|
||||
<code class="docutils literal notranslate"><span class="pre">default</span></code> is returned.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>Examples:</dt><dd><div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">extr</span><span class="p">(</span><span class="s2">"abcde"</span><span class="p">,</span> <span class="s2">"a"</span><span class="p">,</span> <span class="s2">"e"</span><span class="p">)</span>
|
||||
<span class="go">"bcd"</span>
|
||||
<span class="gp">>>> </span><span class="n">extr</span><span class="p">(</span><span class="s2">"abcde"</span><span class="p">,</span> <span class="s2">"a"</span><span class="p">,</span> <span class="s2">"z"</span><span class="p">,</span> <span class="n">deafult</span><span class="o">=</span><span class="s2">"nothing"</span><span class="p">)</span>
|
||||
<span class="go">"nothing"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.int_or_zero">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">int_or_zero</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">num</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#int_or_zero"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.int_or_zero" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Convert num to int or 0. num can be either a str or a list.
|
||||
If num is a list, the first element is converted to int (or return 0 if the list is empty).
|
||||
If num is a str, see convert_str_to_int</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.to_string">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">to_string</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#to_string"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.to_string" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Convert obj to its string representation.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.ecma_unescape">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">ecma_unescape</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">string</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#ecma_unescape"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.ecma_unescape" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Python implementation of the unescape javascript function</p>
|
||||
<p><a class="reference external" href="https://www.ecma-international.org/ecma-262/6.0/#sec-unescape-string">https://www.ecma-international.org/ecma-262/6.0/#sec-unescape-string</a>
|
||||
<a class="reference external" href="https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/unescape">https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/unescape</a></p>
|
||||
<dl>
|
||||
<dt>Examples:</dt><dd><div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">ecma_unescape</span><span class="p">(</span><span class="s1">'</span><span class="si">%u</span><span class="s1">5409'</span><span class="p">)</span>
|
||||
<span class="go">'吉'</span>
|
||||
<span class="gp">>>> </span><span class="n">ecma_unescape</span><span class="p">(</span><span class="s1">'%20'</span><span class="p">)</span>
|
||||
<span class="go">' '</span>
|
||||
<span class="gp">>>> </span><span class="n">ecma_unescape</span><span class="p">(</span><span class="s1">'</span><span class="si">%F</span><span class="s1">3'</span><span class="p">)</span>
|
||||
<span class="go">'ó'</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.remove_pua_from_str">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">remove_pua_from_str</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">string</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/utils.html#remove_pua_from_str"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.remove_pua_from_str" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Removes unicode’s “PRIVATE USE CHARACTER”s (<a class="reference external" href="https://en.wikipedia.org/wiki/Private_Use_Areas">PUA</a>) from a string.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.get_engine_from_settings">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">get_engine_from_settings</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><span class="pre">dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/searx/utils.html#get_engine_from_settings"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.get_engine_from_settings" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Return engine configuration from settings.yml of a given engine name</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.get_xpath">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">get_xpath</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpath_spec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XPath" title="(in lxml v7.0.0a1)"><span class="pre">XPath</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XPath" title="(in lxml v7.0.0a1)"><span class="pre">XPath</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#get_xpath"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.get_xpath" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Return cached compiled <a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XPath" title="(in lxml v7.0.0a1)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lxml.etree.XPath</span></code></a> object.</p>
|
||||
<dl class="simple">
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">TypeError</span></code>:</dt><dd><p>Raised when <code class="docutils literal notranslate"><span class="pre">xpath_spec</span></code> is neither a <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">str</span></code></a> nor a
|
||||
<a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XPath" title="(in lxml v7.0.0a1)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lxml.etree.XPath</span></code></a>.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">SearxXPathSyntaxException</span></code>:</dt><dd><p>Raised when there is a syntax error in the <em>XPath</em> selector (<code class="docutils literal notranslate"><span class="pre">str</span></code>).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.eval_xpath">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">eval_xpath</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">element</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.ElementBase" title="(in lxml v7.0.0a1)"><span class="pre">ElementBase</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree._Element" title="(in lxml v7.0.0a1)"><span class="pre">_Element</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">xpath_spec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XPath" title="(in lxml v7.0.0a1)"><span class="pre">XPath</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#eval_xpath"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.eval_xpath" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Equivalent of <code class="docutils literal notranslate"><span class="pre">element.xpath(xpath_str)</span></code> but compile <code class="docutils literal notranslate"><span class="pre">xpath_str</span></code> into
|
||||
a <a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XPath" title="(in lxml v7.0.0a1)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lxml.etree.XPath</span></code></a> object once for all. The return value of
|
||||
<code class="docutils literal notranslate"><span class="pre">xpath(..)</span></code> is complex, read <a class="reference external" href="https://lxml.de/xpathxslt.html#xpath-return-values">XPath return values</a> for more details.</p>
|
||||
<dl class="simple">
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">TypeError</span></code>:</dt><dd><p>Raised when <code class="docutils literal notranslate"><span class="pre">xpath_spec</span></code> is neither a <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">str</span></code></a> nor a
|
||||
<a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XPath" title="(in lxml v7.0.0a1)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lxml.etree.XPath</span></code></a>.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">SearxXPathSyntaxException</span></code>:</dt><dd><p>Raised when there is a syntax error in the <em>XPath</em> selector (<code class="docutils literal notranslate"><span class="pre">str</span></code>).</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">SearxEngineXPathException:</span></code></dt><dd><p>Raised when the XPath can’t be evaluated (masked
|
||||
<code class="xref py py-obj docutils literal notranslate"><span class="pre">lxml.etree..XPathError</span></code>).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.eval_xpath_list">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">eval_xpath_list</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">element</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.ElementBase" title="(in lxml v7.0.0a1)"><span class="pre">ElementBase</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree._Element" title="(in lxml v7.0.0a1)"><span class="pre">_Element</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">xpath_spec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XPath" title="(in lxml v7.0.0a1)"><span class="pre">XPath</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_len</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/searx/utils.html#eval_xpath_list"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.eval_xpath_list" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Same as <a class="reference internal" href="#searx.utils.eval_xpath" title="searx.utils.eval_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.utils.eval_xpath</span></code></a>, but additionally ensures the
|
||||
return value is a <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code></a>. The minimum length of the list is also
|
||||
checked (if <code class="docutils literal notranslate"><span class="pre">min_len</span></code> is set).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.eval_xpath_getindex">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">eval_xpath_getindex</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">element</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.ElementBase" title="(in lxml v7.0.0a1)"><span class="pre">ElementBase</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree._Element" title="(in lxml v7.0.0a1)"><span class="pre">_Element</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">xpath_spec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://lxml.de/apidoc/lxml.etree.html#lxml.etree.XPath" title="(in lxml v7.0.0a1)"><span class="pre">XPath</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre"><searx.utils._NotSetClass</span> <span class="pre">object></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#eval_xpath_getindex"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.eval_xpath_getindex" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Same as <a class="reference internal" href="#searx.utils.eval_xpath_list" title="searx.utils.eval_xpath_list"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.utils.eval_xpath_list</span></code></a>, but returns item on
|
||||
position <code class="docutils literal notranslate"><span class="pre">index</span></code> from the list (index starts with <code class="docutils literal notranslate"><span class="pre">0</span></code>).</p>
|
||||
<p>The exceptions known from <a class="reference internal" href="#searx.utils.eval_xpath" title="searx.utils.eval_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.utils.eval_xpath</span></code></a> are thrown. If a
|
||||
default is specified, this is returned if an element at position <code class="docutils literal notranslate"><span class="pre">index</span></code>
|
||||
could not be determined.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.get_embeded_stream_url">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">get_embeded_stream_url</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">url</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/utils.html#get_embeded_stream_url"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.get_embeded_stream_url" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Converts a standard video URL into its embed format. Supported services include Youtube,
|
||||
Facebook, Instagram, TikTok, Dailymotion, and Bilibili.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.js_obj_str_to_python">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">js_obj_str_to_python</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">js_obj_str</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.14)"><span class="pre">Any</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#js_obj_str_to_python"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.js_obj_str_to_python" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Convert a javascript variable into JSON and then load the value</p>
|
||||
<p>It does not deal with all cases, but it is good enough for now.
|
||||
chompjs has a better implementation.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.utils.parse_duration_string">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.utils.</span></span><span class="sig-name descname"><span class="pre">parse_duration_string</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">duration_str</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.timedelta" title="(in Python v3.14)"><span class="pre">timedelta</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/utils.html#parse_duration_string"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.utils.parse_duration_string" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Parse a time string in format MM:SS or HH:MM:SS and convert it to a <cite>timedelta</cite> object.</p>
|
||||
<p>Returns None if the provided string doesn’t match any of the formats.</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.valkeydb.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Valkey DB</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="searx.sqlitedb.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">SQLite DB</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Utility functions for the engines</a><ul>
|
||||
<li><a class="reference internal" href="#searx.utils.XPathSpecType"><code class="docutils literal notranslate"><span class="pre">XPathSpecType</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.searxng_useragent"><code class="docutils literal notranslate"><span class="pre">searxng_useragent()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.gen_useragent"><code class="docutils literal notranslate"><span class="pre">gen_useragent()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.gen_gsa_useragent"><code class="docutils literal notranslate"><span class="pre">gen_gsa_useragent()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.HTMLTextExtractor"><code class="docutils literal notranslate"><span class="pre">HTMLTextExtractor</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.html_to_text"><code class="docutils literal notranslate"><span class="pre">html_to_text()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.markdown_to_text"><code class="docutils literal notranslate"><span class="pre">markdown_to_text()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.extract_text"><code class="docutils literal notranslate"><span class="pre">extract_text()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.normalize_url"><code class="docutils literal notranslate"><span class="pre">normalize_url()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.extract_url"><code class="docutils literal notranslate"><span class="pre">extract_url()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.dict_subset"><code class="docutils literal notranslate"><span class="pre">dict_subset()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.humanize_bytes"><code class="docutils literal notranslate"><span class="pre">humanize_bytes()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.humanize_number"><code class="docutils literal notranslate"><span class="pre">humanize_number()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.convert_str_to_int"><code class="docutils literal notranslate"><span class="pre">convert_str_to_int()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.extr"><code class="docutils literal notranslate"><span class="pre">extr()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.int_or_zero"><code class="docutils literal notranslate"><span class="pre">int_or_zero()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.to_string"><code class="docutils literal notranslate"><span class="pre">to_string()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.ecma_unescape"><code class="docutils literal notranslate"><span class="pre">ecma_unescape()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.remove_pua_from_str"><code class="docutils literal notranslate"><span class="pre">remove_pua_from_str()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.get_engine_from_settings"><code class="docutils literal notranslate"><span class="pre">get_engine_from_settings()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.get_xpath"><code class="docutils literal notranslate"><span class="pre">get_xpath()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.eval_xpath"><code class="docutils literal notranslate"><span class="pre">eval_xpath()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.eval_xpath_list"><code class="docutils literal notranslate"><span class="pre">eval_xpath_list()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.eval_xpath_getindex"><code class="docutils literal notranslate"><span class="pre">eval_xpath_getindex()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.get_embeded_stream_url"><code class="docutils literal notranslate"><span class="pre">get_embeded_stream_url()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.js_obj_str_to_python"><code class="docutils literal notranslate"><span class="pre">js_obj_str_to_python()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.utils.parse_duration_string"><code class="docutils literal notranslate"><span class="pre">parse_duration_string()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,538 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Valkey Library" href="searx.valkeylib.html"><link rel="prev" title="Utility functions for the engines" href="searx.utils.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>Valkey DB - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Valkey DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeylib.html">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.valkeydb.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.valkeydb.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="valkey-db">
|
||||
<span id="id1"></span><h1>Valkey DB<a class="headerlink" href="#valkey-db" title="Link to this heading">¶</a></h1>
|
||||
<p id="module-searx.valkeydb">Implementation of the valkey client (<a class="reference external" href="https://github.com/valkey-io/valkey-py">valkey-py</a>).</p>
|
||||
<p>This implementation uses the <a class="reference internal" href="../admin/settings/settings_valkey.html#settings-valkey"><span class="std std-ref">valkey:</span></a> setup from <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>.
|
||||
A valkey DB connect can be tested by:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span><span class="w"> </span><span class="nn">searx</span><span class="w"> </span><span class="kn">import</span> <span class="n">valkeydb</span>
|
||||
<span class="gp">>>> </span><span class="n">valkeydb</span><span class="o">.</span><span class="n">initialize</span><span class="p">()</span>
|
||||
<span class="go">True</span>
|
||||
<span class="gp">>>> </span><span class="n">db</span> <span class="o">=</span> <span class="n">valkeydb</span><span class="o">.</span><span class="n">client</span><span class="p">()</span>
|
||||
<span class="gp">>>> </span><span class="n">db</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">"foo"</span><span class="p">,</span> <span class="s2">"bar"</span><span class="p">)</span>
|
||||
<span class="go">True</span>
|
||||
<span class="gp">>>> </span><span class="n">db</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"foo"</span><span class="p">)</span>
|
||||
<span class="go">b'bar'</span>
|
||||
<span class="gp">>>></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.valkeydb.client">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.valkeydb.</span></span><span class="sig-name descname"><span class="pre">client</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://valkey-py.readthedocs.io/en/stable/connections.html#valkey.Valkey" title="(in valkey-py v99.99.99)"><span class="pre">Valkey</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.14)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../_modules/searx/valkeydb.html#client"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.valkeydb.client" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns SearXNG’s global Valkey DB connector (Valkey client object).</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.valkeylib.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Valkey Library</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="searx.utils.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Utility functions for the engines</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Valkey DB</a><ul>
|
||||
<li><a class="reference internal" href="#searx.valkeydb.client"><code class="docutils literal notranslate"><span class="pre">client()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,670 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../genindex.html"><link rel="search" title="Search" href="../search.html"><link rel="next" title="Weather" href="searx.weather.html"><link rel="prev" title="Valkey DB" href="searx.valkeydb.html">
|
||||
<link rel="prefetch" href="../_static/searxng-wordmark.svg" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
|
||||
<title>Valkey Library - SearXNG Documentation (2026.5.31+7159b8aed)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=7bdb33bb" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=4b1b1f10" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">SearXNG Documentation (2026.5.31+7159b8aed)</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><div class="sidebar-scroll"><a class="sidebar-brand" href="../index.html">
|
||||
<div class="sidebar-logo-container">
|
||||
<img class="sidebar-logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">SearXNG Documentation (2026.5.31+7159b8aed)</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-tree">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../user/index.html">User information</a><input aria-label="Toggle navigation of User information" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/search-syntax.html">Search syntax</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/configured_engines.html">Configured Engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../user/about.html">About SearXNG</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../admin/index.html">Administrator documentation</a><input aria-label="Toggle navigation of Administrator documentation" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../admin/settings/index.html">Settings</a><input aria-label="Toggle navigation of Settings" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_engines.html"><code class="docutils literal notranslate"><span class="pre">engines:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_preferences.html"><code class="docutils literal notranslate"><span class="pre">preferences:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_valkey.html"><code class="docutils literal notranslate"><span class="pre">valkey:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../admin/settings/settings_plugins.html"><code class="docutils literal notranslate"><span class="pre">plugins:</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation.html">Installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-docker.html">Installation container</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-scripts.html">Installation Script</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-searxng.html">Step by step installation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-granian.html">Granian</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-uwsgi.html">uWSGI</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-nginx.html">NGINX</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/installation-apache.html">Apache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/update-searxng.html">SearXNG maintenance</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/answer-captcha.html">Answer CAPTCHA from server’s IP</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.favicons.html">Favicons</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/searx.limiter.html">Limiter</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/api.html">Administration API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/architecture.html">Architecture</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/plugins.html">List of plugins</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../admin/buildhosts.html">Buildhosts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../dev/index.html">Developer documentation</a><input aria-label="Toggle navigation of Developer documentation" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/quickstart.html">Development Quickstart</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/commits.html">Git Commits & Change Management</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/contribution_guide.html">How to contribute</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/extended_types.html">Extended Types</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/engines/index.html">Engine Implementations</a><input aria-label="Toggle navigation of Engine Implementations" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/enginelib.html">Engine Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engines.html">SearXNG’s engines loader</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/engine_overview.html">Engine Overview</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_online.html">Demo Online Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/xpath.html">XPath Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/mediawiki.html">MediaWiki Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/json_engine.html">JSON Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/500px.html">500px</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/adobe_stock.html">Adobe Stock</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/alpinelinux.html">Alpine Linux Packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/annas_archive.html">Anna’s Archive</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/aol.html">AOL</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/archlinux.html">Arch Linux</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/arxiv.html">arXiv</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/astrophysics_data_system.html">Astrophysics Data System (ADS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/azure.html">Azure Resources</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bing.html">Bing Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bpb.html">Bpb</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/brave.html">Brave Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/bt4g.html">BT4G</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/cara.html">Cara Images</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/chinaso.html">ChinaSo</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/core.html">CORE</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/crossref.html">Crossref</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/dailymotion.html">Dailymotion</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/discourse.html">Discourse Forums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/duckduckgo.html">DuckDuckGo Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/geizhals.html">Geizhals</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitea.html">Gitea</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/github_code.html">Github Code</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/gitlab.html">GitLab</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/google.html">Google Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/huggingface.html">Hugging Face</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/karmasearch.html">Karmasearch</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/lemmy.html">Lemmy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/loc.html">Library of Congress</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/marginalia.html">Marginalia Search</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mastodon.html">Mastodon</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/moviepilot.html">Moviepilot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mrs.html">Matrix Rooms Search (MRS)</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/mwmbl.html">Mwmbl Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/odysee.html">Odysee</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openalex.html">OpenAlex</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/openlibrary.html">Open Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/peertube.html">Peertube Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/piped.html">Piped</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/presearch.html">Presearch Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/pubmed.html">PubMed</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/qwant.html">Qwant</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/radio_browser.html">RadioBrowser</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/recoll.html">Recoll Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/repology.html">Repology</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/reuters.html">Reuters</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/semantic_scholar.html">Semantic Scholar</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/soundcloud.html">Soundcloud</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/sourcehut.html">Sourcehut</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/springer.html">Springer Nature</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/startpage.html">Startpage Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tagesschau.html">Tagesschau API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/torznab.html">Torznab WebAPI</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/tubearchivist.html">Tube Archivist</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/void.html">Void Linux binary packages</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wallhaven.html">Wallhaven</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/wikipedia.html">Wikimedia</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yacy.html">Yacy</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/yahoo.html">Yahoo Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online/zlibrary.html">Z-Library</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline_concept.html">Offline Concept</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/demo/demo_offline.html">Demo Offline Engine</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/command-line-engines.html">Command Line Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/nosql-engines.html">NoSQL databases</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/search-indexer-engines.html">Local Search APIs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/offline/sql-engines.html">SQL Engines</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/engines/online_url_search/tineye.html">Tineye</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/result_types/index.html">Result Types</a><input aria-label="Toggle navigation of Result Types" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/base_result.html">Result</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/result_types/main_result.html">Main Search Results</a><input aria-label="Toggle navigation of Main Search Results" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/mainresult.html">Main Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/keyvalue.html">Key-Value Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/code.html">Code Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/paper.html">Paper Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/file.html">File Results</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/result_types/main/image.html">Image Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/answer.html">Answer Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/correction.html">Correction Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/suggestion.html">Suggestion Results</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/result_types/infobox.html">Infobox Results</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/templates.html">Simple Theme Templates</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/search_api.html">Search API</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/plugins/index.html">Plugins</a><input aria-label="Toggle navigation of Plugins" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/plugins/development.html">Plugin Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/plugins/builtins.html">Built-in Plugins</a><input aria-label="Toggle navigation of Built-in Plugins" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/calculator.html">Calculator</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hash_plugin.html">Hash Values</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/hostnames.html">Hostnames</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/infinite_scroll.html">Infinite scroll</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/self_info.html">Self-Info</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/tor_check.html">Tor check</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/unit_converter.html">Unit Converter</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/plugins/time_zone.html">Time Zone</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/answerers/index.html">Answerers</a><input aria-label="Toggle navigation of Answerers" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/answerers/development.html">Answerer Development</a></li>
|
||||
<li class="toctree-l3 has-children"><a class="reference internal" href="../dev/answerers/builtins.html">Built-in Answerers</a><input aria-label="Toggle navigation of Built-in Answerers" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/random.html">Random</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="../dev/answerers/statistics.html">Statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/translation.html">Translation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../dev/reST.html">reST primer</a></li>
|
||||
<li class="toctree-l2 has-children"><a class="reference internal" href="../dev/searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><input aria-label="Toggle navigation of Tooling box searxng_extra" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="../dev/searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a><input aria-label="Toggle navigation of DevOps tooling box" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/searxng.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searxng.sh</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Source-Code</a><input aria-label="Toggle navigation of Source-Code" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.babel_extract.html">Custom message extractor (i18n)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.botdetection.html">Bot Detection</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.cache.html">Caches</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.exceptions.html">SearXNG Exceptions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons (source)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.infopage.html">Online <code class="docutils literal notranslate"><span class="pre">/info</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.locales.html">Locales</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.html">Search</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.search.processors.html">Search processors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.settings.html">Settings Loader</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.sqlitedb.html">SQLite DB</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.utils.html">Utility functions for the engines</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.valkeydb.html">Valkey DB</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Valkey Library</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="searx.weather.html">Weather</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/blob/master/docs/src/searx.valkeylib.rst?plain=true" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div><div class="edit-this-page">
|
||||
<a class="muted-link" href="https://github.com/searxng/searxng/edit/master/docs/src/searx.valkeylib.rst" rel="edit" title="Edit this page">
|
||||
<svg><use href="#svg-pencil"></use></svg>
|
||||
<span class="visually-hidden">Edit this page</span>
|
||||
</a>
|
||||
</div><div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-searx.valkeylib">
|
||||
<span id="valkey-library"></span><span id="searx-valkey"></span><h1>Valkey Library<a class="headerlink" href="#module-searx.valkeylib" title="Link to this heading">¶</a></h1>
|
||||
<p>A collection of convenient functions and valkey/lua scripts.</p>
|
||||
<p>This code was partial inspired by the <a class="reference external" href="https://redis.com/blog/bullet-proofing-lua-scripts-in-redispy/">Bullet-Proofing Lua Scripts in ValkeyPy</a>
|
||||
article.</p>
|
||||
<dl class="py data">
|
||||
<dt class="sig sig-object py" id="searx.valkeylib.LUA_SCRIPT_STORAGE">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.valkeylib.</span></span><span class="sig-name descname"><span class="pre">LUA_SCRIPT_STORAGE</span></span><span class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{}</span></span><a class="headerlink" href="#searx.valkeylib.LUA_SCRIPT_STORAGE" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>A global dictionary to cache client’s <code class="docutils literal notranslate"><span class="pre">Script</span></code> objects, used by
|
||||
<a class="reference internal" href="#searx.valkeylib.lua_script_storage" title="searx.valkeylib.lua_script_storage"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lua_script_storage</span></code></a></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.valkeylib.lua_script_storage">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.valkeylib.</span></span><span class="sig-name descname"><span class="pre">lua_script_storage</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">client</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">script</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/valkeylib.html#lua_script_storage"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.valkeylib.lua_script_storage" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a valkey <a class="reference external" href="https://valkey-py.readthedocs.io/en/stable/commands.html#valkey.commands.core.CoreCommands.register_script" title="(in valkey-py v99.99.99)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Script</span></code></a> instance.</p>
|
||||
<p>Due to performance reason the <code class="docutils literal notranslate"><span class="pre">Script</span></code> object is instantiated only once
|
||||
for a client (<code class="docutils literal notranslate"><span class="pre">client.register_script(..)</span></code>) and is cached in
|
||||
<a class="reference internal" href="#searx.valkeylib.LUA_SCRIPT_STORAGE" title="searx.valkeylib.LUA_SCRIPT_STORAGE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">LUA_SCRIPT_STORAGE</span></code></a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.valkeylib.purge_by_prefix">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.valkeylib.</span></span><span class="sig-name descname"><span class="pre">purge_by_prefix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">client</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prefix</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'SearXNG_'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/valkeylib.html#purge_by_prefix"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.valkeylib.purge_by_prefix" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Purge all keys with <code class="docutils literal notranslate"><span class="pre">prefix</span></code> from database.</p>
|
||||
<p>Queries all keys in the database by the given prefix and set expire time to
|
||||
zero. The default prefix will drop all keys which has been set by SearXNG
|
||||
(drops SearXNG schema entirely from database).</p>
|
||||
<p>The implementation is the lua script from string <code class="xref py py-obj docutils literal notranslate"><span class="pre">PURGE_BY_PREFIX</span></code>.
|
||||
The lua script uses <a class="reference external" href="https://valkey.io/commands/expire/">EXPIRE</a> instead of <a class="reference external" href="https://valkey.io/commands/del/">DEL</a>: if there are a lot keys to
|
||||
delete and/or their values are big, <cite>DEL</cite> could take more time and blocks
|
||||
the command loop while <cite>EXPIRE</cite> turns back immediate.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><p><strong>prefix</strong> – prefix of the key to delete (default: <code class="docutils literal notranslate"><span class="pre">SearXNG_</span></code>)</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.valkeylib.secret_hash">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.valkeylib.</span></span><span class="sig-name descname"><span class="pre">secret_hash</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/valkeylib.html#secret_hash"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.valkeylib.secret_hash" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Creates a hash of the <code class="docutils literal notranslate"><span class="pre">name</span></code>.</p>
|
||||
<p>Combines argument <code class="docutils literal notranslate"><span class="pre">name</span></code> with the <code class="docutils literal notranslate"><span class="pre">secret_key</span></code> from <a class="reference internal" href="../admin/settings/settings_server.html#settings-server"><span class="std std-ref">server:</span></a>. This function can be used to get a more anonymized name of a Valkey
|
||||
KEY.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – the name to create a secret hash for</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.valkeylib.incr_counter">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.valkeylib.</span></span><span class="sig-name descname"><span class="pre">incr_counter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">client</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">limit</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expire</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/valkeylib.html#incr_counter"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.valkeylib.incr_counter" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Increment a counter and return the new value.</p>
|
||||
<p>If counter with valkey key <code class="docutils literal notranslate"><span class="pre">SearXNG_counter_<name></span></code> does not exists it is
|
||||
created with initial value 1 returned. The replacement <code class="docutils literal notranslate"><span class="pre"><name></span></code> is a
|
||||
<em>secret hash</em> of the value from argument <code class="docutils literal notranslate"><span class="pre">name</span></code> (see
|
||||
<a class="reference internal" href="#searx.valkeylib.secret_hash" title="searx.valkeylib.secret_hash"><code class="xref py py-func docutils literal notranslate"><span class="pre">secret_hash()</span></code></a>).</p>
|
||||
<p>The implementation of the valkey counter is the lua script from string
|
||||
<code class="xref py py-obj docutils literal notranslate"><span class="pre">INCR_COUNTER</span></code>.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – name of the counter</p></li>
|
||||
<li><p><strong>expire</strong> (int / see <a class="reference external" href="https://valkey.io/commands/expire/">EXPIRE</a>) – live-time of the counter in seconds (default <code class="docutils literal notranslate"><span class="pre">None</span></code> means
|
||||
infinite).</p></li>
|
||||
<li><p><strong>limit</strong> (int / limit is 2^64 see <a class="reference external" href="https://valkey.io/commands/incr/">INCR</a>) – limit where the counter stops to increment (default <code class="docutils literal notranslate"><span class="pre">None</span></code>)</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||||
<dd class="field-even"><p>value of the incremented counter</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>A simple demo of a counter with expire time and limit:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">6</span><span class="p">):</span>
|
||||
<span class="gp">... </span> <span class="n">i</span><span class="p">,</span> <span class="n">incr_counter</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="s2">"foo"</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span> <span class="c1"># max 3, duration 5 sec</span>
|
||||
<span class="gp">... </span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="c1"># from the third call on max has been reached</span>
|
||||
<span class="gp">...</span>
|
||||
<span class="go">(0, 1)</span>
|
||||
<span class="go">(1, 2)</span>
|
||||
<span class="go">(2, 3)</span>
|
||||
<span class="go">(3, 3)</span>
|
||||
<span class="go">(4, 3)</span>
|
||||
<span class="go">(5, 1)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.valkeylib.drop_counter">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.valkeylib.</span></span><span class="sig-name descname"><span class="pre">drop_counter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">client</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/valkeylib.html#drop_counter"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.valkeylib.drop_counter" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Drop counter with valkey key <code class="docutils literal notranslate"><span class="pre">SearXNG_counter_<name></span></code></p>
|
||||
<p>The replacement <code class="docutils literal notranslate"><span class="pre"><name></span></code> is a <em>secret hash</em> of the value from argument
|
||||
<code class="docutils literal notranslate"><span class="pre">name</span></code> (see <a class="reference internal" href="#searx.valkeylib.incr_counter" title="searx.valkeylib.incr_counter"><code class="xref py py-func docutils literal notranslate"><span class="pre">incr_counter()</span></code></a> and <a class="reference internal" href="#searx.valkeylib.incr_sliding_window" title="searx.valkeylib.incr_sliding_window"><code class="xref py py-func docutils literal notranslate"><span class="pre">incr_sliding_window()</span></code></a>).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="searx.valkeylib.incr_sliding_window">
|
||||
<span class="sig-prename descclassname"><span class="pre">searx.valkeylib.</span></span><span class="sig-name descname"><span class="pre">incr_sliding_window</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">client</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/valkeylib.html#incr_sliding_window"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.valkeylib.incr_sliding_window" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Increment a sliding-window counter and return the new value.</p>
|
||||
<p>If counter with valkey key <code class="docutils literal notranslate"><span class="pre">SearXNG_counter_<name></span></code> does not exists it is
|
||||
created with initial value 1 returned. The replacement <code class="docutils literal notranslate"><span class="pre"><name></span></code> is a
|
||||
<em>secret hash</em> of the value from argument <code class="docutils literal notranslate"><span class="pre">name</span></code> (see
|
||||
<a class="reference internal" href="#searx.valkeylib.secret_hash" title="searx.valkeylib.secret_hash"><code class="xref py py-func docutils literal notranslate"><span class="pre">secret_hash()</span></code></a>).</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – name of the counter</p></li>
|
||||
<li><p><strong>duration</strong> – live-time of the sliding window in seconds</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Typeduration<span class="colon">:</span></dt>
|
||||
<dd class="field-even"><p>int</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Returns<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><p>value of the incremented counter</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>The implementation of the valkey counter is the lua script from string
|
||||
<code class="xref py py-obj docutils literal notranslate"><span class="pre">INCR_SLIDING_WINDOW</span></code>. The lua script uses <a class="reference external" href="https://valkey.com/ebook/part-1-getting-started/chapter-1-getting-to-know-valkey/1-2-what-valkey-data-structures-look-like/1-2-5-sorted-sets-in-valkey/">sorted sets in Valkey</a>
|
||||
to implement a sliding window for the valkey key <code class="docutils literal notranslate"><span class="pre">SearXNG_counter_<name></span></code>
|
||||
(<a class="reference external" href="https://valkey.io/commands/zadd/">ZADD</a>). The current <a class="reference external" href="https://valkey.io/commands/time/">TIME</a> is used to score the items in the sorted set and
|
||||
the time window is moved by removing items with a score lower current time
|
||||
minus <em>duration</em> time (<a class="reference external" href="https://valkey.io/commands/zremrangebyscore/">ZREMRANGEBYSCORE</a>).</p>
|
||||
<p>The <a class="reference external" href="https://valkey.io/commands/expire/">EXPIRE</a> time (the duration of the sliding window) is refreshed on each
|
||||
call (increment) and if there is no call in this duration, the sorted
|
||||
set expires from the valkey DB.</p>
|
||||
<p>The return value is the amount of items in the sorted set (<a class="reference external" href="https://valkey.io/commands/zcount/">ZCOUNT</a>), what
|
||||
means the number of calls in the sliding window.</p>
|
||||
<p>A simple demo of the sliding window:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">5</span><span class="p">):</span>
|
||||
<span class="gp">... </span> <span class="n">incr_sliding_window</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="s2">"foo"</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span> <span class="c1"># duration 3 sec</span>
|
||||
<span class="gp">... </span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="c1"># from the third call (second) on the window is moved</span>
|
||||
<span class="gp">...</span>
|
||||
<span class="go">1</span>
|
||||
<span class="go">2</span>
|
||||
<span class="go">3</span>
|
||||
<span class="go">3</span>
|
||||
<span class="go">3</span>
|
||||
<span class="gp">>>> </span><span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span> <span class="c1"># wait until expire</span>
|
||||
<span class="gp">>>> </span><span class="n">incr_sliding_window</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="s2">"foo"</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
|
||||
<span class="go">1</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="searx.weather.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Weather</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="searx.valkeydb.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">Valkey DB</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © SearXNG team
|
||||
</div>
|
||||
Made with
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
<a class="muted-link " href="https://github.com/searxng/searxng/" aria-label="GitHub">💾</a>
|
||||
<a class="muted-link " href="https://searx.space/" aria-label="searx.space">🌐</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">Valkey Library</a><ul>
|
||||
<li><a class="reference internal" href="#searx.valkeylib.LUA_SCRIPT_STORAGE"><code class="docutils literal notranslate"><span class="pre">LUA_SCRIPT_STORAGE</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.valkeylib.lua_script_storage"><code class="docutils literal notranslate"><span class="pre">lua_script_storage()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.valkeylib.purge_by_prefix"><code class="docutils literal notranslate"><span class="pre">purge_by_prefix()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.valkeylib.secret_hash"><code class="docutils literal notranslate"><span class="pre">secret_hash()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.valkeylib.incr_counter"><code class="docutils literal notranslate"><span class="pre">incr_counter()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.valkeylib.drop_counter"><code class="docutils literal notranslate"><span class="pre">drop_counter()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#searx.valkeylib.incr_sliding_window"><code class="docutils literal notranslate"><span class="pre">incr_sliding_window()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../_static/documentation_options.js?v=aa686c95"></script>
|
||||
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></script>
|
||||
<script src="../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user