build from commit 3535377c9a

This commit is contained in:
return42 2023-12-31 15:21:08 +00:00
commit 7e854ebaad
310 changed files with 70782 additions and 0 deletions

305
dev/contribution_guide.html Normal file
View file

@ -0,0 +1,305 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to contribute &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script src="../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Engine Implementations" href="engines/index.html" />
<link rel="prev" title="Runtime Management" href="rtm_asdf.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="engines/index.html" title="Engine Implementations"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="rtm_asdf.html" title="Runtime Management"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">How to contribute</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="how-to-contribute">
<span id="id1"></span><h1>How to contribute<a class="headerlink" href="#how-to-contribute" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#prime-directives-privacy-hackability" id="id3">Prime directives: Privacy, Hackability</a></p>
<ul>
<li><p><a class="reference internal" href="#privacy-by-design" id="id4">Privacy-by-design</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#code" id="id5">Code</a></p></li>
<li><p><a class="reference internal" href="#translation" id="id6">Translation</a></p></li>
<li><p><a class="reference internal" href="#documentation" id="id7">Documentation</a></p>
<ul>
<li><p><a class="reference internal" href="#live-build" id="id8">live build</a></p></li>
<li><p><a class="reference internal" href="#deploy-on-github-io" id="id9">deploy on github.io</a></p></li>
</ul>
</li>
</ul>
</nav>
<section id="prime-directives-privacy-hackability">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Prime directives: Privacy, Hackability</a><a class="headerlink" href="#prime-directives-privacy-hackability" title="Link to this heading"></a></h2>
<p>SearXNG has two prime directives, <strong>privacy-by-design and hackability</strong> . The
hackability comes in three levels:</p>
<ul class="simple">
<li><p>support of search engines</p></li>
<li><p>plugins to alter search behaviour</p></li>
<li><p>hacking SearXNG itself</p></li>
</ul>
<p>Note the lack of “world domination” among the directives. SearXNG has no
intention of wide mass-adoption, rounded corners, etc. The prime directive
“privacy” deserves a separate chapter, as its quite uncommon unfortunately.</p>
<section id="privacy-by-design">
<h3><a class="toc-backref" href="#id4" role="doc-backlink">Privacy-by-design</a><a class="headerlink" href="#privacy-by-design" title="Link to this heading"></a></h3>
<p>SearXNG was born out of the need for a <strong>privacy-respecting</strong> search tool which
can be extended easily to maximize both, its search and its privacy protecting
capabilities.</p>
<p>A few widely used features work differently or turned off by default or not
implemented at all <strong>as a consequence of privacy-by-design</strong>.</p>
<p>If a feature reduces the privacy preserving aspects of searx, it should be
switched off by default or should not implemented at all. There are plenty of
search engines already providing such features. If a feature reduces the
protection of searx, users must be informed about the effect of choosing to
enable it. Features that protect privacy but differ from the expectations of
the user should also be explained.</p>
<p>Also, if you think that something works weird with searx, its might be because
of the tool you use is designed in a way to interfere with the privacy respect.
Submitting a bugreport to the vendor of the tool that misbehaves might be a good
feedback to reconsider the disrespect to its customers (e.g. <code class="docutils literal notranslate"><span class="pre">GET</span></code> vs <code class="docutils literal notranslate"><span class="pre">POST</span></code>
requests in various browsers).</p>
<p>Remember the other prime directive of SearXNG is to be hackable, so if the above
privacy concerns do not fancy you, simply fork it.</p>
<blockquote>
<div><p><em>Happy hacking.</em></p>
</div></blockquote>
</section>
</section>
<section id="code">
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Code</a><a class="headerlink" href="#code" title="Link to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">Create good commits!</p>
<ul class="simple">
<li><p><a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes">Structural split of changes</a></p></li>
<li><p><a class="reference external" href="https://www.conventionalcommits.org/">Conventional Commits</a></p></li>
<li><p><a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages">Git Commit Good Practice</a></p></li>
<li><p>some like to use: <a class="reference external" href="https://gitmoji.carloscuesta.me/">gitmoji</a></p></li>
<li><p>not yet active: <a class="reference external" href="https://github.com/zeke/semantic-pull-requests">Semantic PR</a></p></li>
</ul>
</aside>
<p>In order to submit a patch, please follow the steps below:</p>
<ul>
<li><p>Follow coding conventions.</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.python.org/dev/peps/pep-0008/">PEP8</a> standards apply, except the convention of line length</p></li>
<li><p>Maximum line length is 120 characters</p></li>
</ul>
</li>
<li><p>The cardinal rule for creating good commits is to ensure there is only one
<em>logical change</em> per commit / read <a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes">Structural split of changes</a></p></li>
<li><p>Check if your code breaks existing tests. If so, update the tests or fix your
code.</p></li>
<li><p>If your code can be unit-tested, add unit tests.</p></li>
<li><p>Add yourself to the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/AUTHORS.rst">git://AUTHORS.rst</a> file.</p></li>
<li><p>Choose meaningful commit messages, read <a class="reference external" href="https://www.conventionalcommits.org/">Conventional Commits</a></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="nb">type</span><span class="o">&gt;</span><span class="p">[</span><span class="n">optional</span> <span class="n">scope</span><span class="p">]:</span> <span class="o">&lt;</span><span class="n">description</span><span class="o">&gt;</span>
<span class="p">[</span><span class="n">optional</span> <span class="n">body</span><span class="p">]</span>
<span class="p">[</span><span class="n">optional</span> <span class="n">footer</span><span class="p">(</span><span class="n">s</span><span class="p">)]</span>
</pre></div>
</div>
</li>
<li><p>Create a pull request.</p></li>
</ul>
<p>For more help on getting started with SearXNG development, see <a class="reference internal" href="quickstart.html#devquickstart"><span class="std std-ref">Development Quickstart</span></a>.</p>
</section>
<section id="translation">
<h2><a class="toc-backref" href="#id6" role="doc-backlink">Translation</a><a class="headerlink" href="#translation" title="Link to this heading"></a></h2>
<p>Translation currently takes place on <a class="reference internal" href="translation.html#translation"><span class="std std-ref">weblate</span></a>.</p>
</section>
<section id="documentation">
<span id="contrib-docs"></span><h2><a class="toc-backref" href="#id7" role="doc-backlink">Documentation</a><a class="headerlink" href="#documentation" title="Link to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">The reST sources</p>
<p>has been moved from <code class="docutils literal notranslate"><span class="pre">gh-branch</span></code> into <code class="docutils literal notranslate"><span class="pre">master</span></code> (<a class="reference external" href="https://github.com/searxng/searxng/blob/master/docs">git://docs</a>).</p>
</aside>
<p>The documentation is built using <a class="reference external" href="https://www.sphinx-doc.org">Sphinx</a>. So in order to be able to generate
the required files, you have to install it on your system. Much easier, use
our <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile &amp; ./manage</span></a>.</p>
<p>Here is an example which makes a complete rebuild:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docs.clean<span class="w"> </span>docs.html
...
The<span class="w"> </span>HTML<span class="w"> </span>pages<span class="w"> </span>are<span class="w"> </span><span class="k">in</span><span class="w"> </span>dist/docs.
</pre></div>
</div>
<section id="live-build">
<span id="make-docs-live"></span><h3><a class="toc-backref" href="#id8" role="doc-backlink">live build</a><a class="headerlink" href="#live-build" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">docs.clean</p>
<p>It is recommended to assert a complete rebuild before deploying (use
<code class="docutils literal notranslate"><span class="pre">docs.clean</span></code>).</p>
</aside>
<p>Live build is like WYSIWYG. If you want to edit the documentation, its
recommended to use. The Makefile target <code class="docutils literal notranslate"><span class="pre">docs.live</span></code> builds the docs, opens
URL in your favorite browser and rebuilds every time a reST file has been
changed (<a class="reference internal" href="makefile.html#make-docs-clean"><span class="std std-ref">make docs.clean docs.live</span></a>).</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docs.live
...
The<span class="w"> </span>HTML<span class="w"> </span>pages<span class="w"> </span>are<span class="w"> </span><span class="k">in</span><span class="w"> </span>dist/docs.
...<span class="w"> </span>Serving<span class="w"> </span>on<span class="w"> </span>http://0.0.0.0:8000
...<span class="w"> </span>Start<span class="w"> </span>watching<span class="w"> </span>changes
</pre></div>
</div>
<p>Live builds are implemented by <a class="reference external" href="https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md">sphinx-autobuild</a>. Use environment
<code class="docutils literal notranslate"><span class="pre">$(SPHINXOPTS)</span></code> to pass arguments to the <a class="reference external" href="https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md">sphinx-autobuild</a> command. Except
option <code class="docutils literal notranslate"><span class="pre">--host</span></code> (which is always set to <code class="docutils literal notranslate"><span class="pre">0.0.0.0</span></code>) you can pass any
argument. E.g to find and use a free port, use:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nv">SPHINXOPTS</span><span class="o">=</span><span class="s2">&quot;--port 0&quot;</span><span class="w"> </span>make<span class="w"> </span>docs.live
...
...<span class="w"> </span>Serving<span class="w"> </span>on<span class="w"> </span>http://0.0.0.0:50593
...
</pre></div>
</div>
</section>
<section id="deploy-on-github-io">
<span id="id2"></span><h3><a class="toc-backref" href="#id9" role="doc-backlink">deploy on github.io</a><a class="headerlink" href="#deploy-on-github-io" title="Link to this heading"></a></h3>
<p>To deploy documentation at <a class="reference external" href="https://docs.searxng.org//.">github.io</a> use Makefile target <a class="reference internal" href="makefile.html#make-docs-gh-pages"><span class="std std-ref">make docs.gh-pages</span></a>, which builds the documentation and runs all the needed git add,
commit and push:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docs.clean<span class="w"> </span>docs.gh-pages
</pre></div>
</div>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>If you are working in your own brand, dont forget to adjust your
<a class="reference internal" href="../admin/settings/settings_brand.html#settings-brand"><span class="std std-ref">brand:</span></a>.</p>
</div>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">How to contribute</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#prime-directives-privacy-hackability">Prime directives: Privacy, Hackability</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#privacy-by-design">Privacy-by-design</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#code">Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="#translation">Translation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#documentation">Documentation</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#live-build">live build</a></li>
<li class="toctree-l4"><a class="reference internal" href="#deploy-on-github-io">deploy on github.io</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="rtm_asdf.html" title="previous chapter">Runtime Management</a>
<li>Next: <a href="engines/index.html" title="next chapter">Engine Implementations</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/dev/contribution_guide.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,188 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo Offline Engine &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Command Line Engines" href="../offline/command-line-engines.html" />
<link rel="prev" title="Offline Concept" href="../offline_concept.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../offline/command-line-engines.html" title="Command Line Engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../offline_concept.html" title="Offline Concept"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Demo Offline Engine</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="demo-offline-engine">
<span id="id1"></span><h1>Demo Offline Engine<a class="headerlink" href="#demo-offline-engine" title="Link to this heading"></a></h1>
<p id="module-searx.engines.demo_offline">Within this module we implement a <em>demo offline engine</em>. Do not look to
close to the implementation, its just a simple example. To get in use of this
<em>demo</em> engine add the following entry to your engines list in <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my offline engine</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">demo_offline</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">demo</span>
<span class="w"> </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
</pre></div>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.demo_offline.init">
<span class="sig-prename descclassname"><span class="pre">searx.engines.demo_offline.</span></span><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">engine_settings</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/demo_offline.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.demo_offline.init" title="Link to this definition"></a></dt>
<dd><p>Initialization of the (offline) engine. The origin of this demo engine is a
simple json string which is loaded in this example while the engine is
initialized.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.demo_offline.search">
<span class="sig-prename descclassname"><span class="pre">searx.engines.demo_offline.</span></span><span class="sig-name descname"><span class="pre">search</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">request_params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/demo_offline.html#search"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.demo_offline.search" title="Link to this definition"></a></dt>
<dd><p>Query (offline) engine and return results. Assemble the list of results from
your local engine. In this demo engine we ignore the query term, usual
you would pass the query term to your local engine to filter out the
results.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../offline_concept.html">Offline Concept</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Demo Offline Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../offline/command-line-engines.html">Command Line Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="../offline/nosql-engines.html">NoSQL databases</a></li>
<li class="toctree-l5"><a class="reference internal" href="../offline/search-indexer-engines.html">Local Search APIs</a></li>
<li class="toctree-l5"><a class="reference internal" href="../offline/sql-engines.html">SQL Engines</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="../offline_concept.html" title="previous chapter">Offline Concept</a>
<li>Next: <a href="../offline/command-line-engines.html" title="next chapter">Command Line Engines</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/demo/demo_offline.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,222 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo Online Engine &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="XPath Engine" href="../xpath.html" />
<link rel="prev" title="Engine Overview" href="../engine_overview.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../xpath.html" title="XPath Engine"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../engine_overview.html" title="Engine Overview"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Demo Online Engine</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="demo-online-engine">
<span id="id1"></span><h1>Demo Online Engine<a class="headerlink" href="#demo-online-engine" title="Link to this heading"></a></h1>
<p id="module-searx.engines.demo_online">Within this module we implement a <em>demo online engine</em>. Do not look to
close to the implementation, its just a simple example which queries <a class="reference external" href="https://www.artic.edu">The Art
Institute of Chicago</a></p>
<p>To get in use of this <em>demo</em> engine add the following entry to your engines
list in <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my online engine</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">demo_online</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">demo</span>
<span class="w"> </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
</pre></div>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.demo_online.init">
<span class="sig-prename descclassname"><span class="pre">searx.engines.demo_online.</span></span><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">engine_settings</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/demo_online.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.demo_online.init" title="Link to this definition"></a></dt>
<dd><p>Initialization of the (online) engine. If no initialization is needed, drop
this init function.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.demo_online.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.demo_online.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/demo_online.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.demo_online.request" title="Link to this definition"></a></dt>
<dd><p>Build up the <code class="docutils literal notranslate"><span class="pre">params</span></code> for the online request. In this example we build a
URL to fetch images from <a class="reference external" href="https://artic.edu">artic.edu</a></p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.demo_online.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.demo_online.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/demo_online.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.demo_online.response" title="Link to this definition"></a></dt>
<dd><p>Parse out the result items from the response. In this example we parse the
response from <a class="reference external" href="https://artic.edu">api.artic.edu</a> and filter out all
images.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5 current"><a class="current reference internal" href="#">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../online/zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="../engine_overview.html" title="previous chapter">Engine Overview</a>
<li>Next: <a href="../xpath.html" title="next chapter">XPath Engine</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/demo/demo_online.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,851 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Engine Overview &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script src="../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Demo Online Engine" href="demo/demo_online.html" />
<link rel="prev" title="SearXNGs engines loader" href="engines.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="demo/demo_online.html" title="Demo Online Engine"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="engines.html" title="SearXNGs engines loader"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Engine Overview</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="engine-overview">
<span id="engines-dev"></span><h1>Engine Overview<a class="headerlink" href="#engine-overview" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#general-engine-configuration" id="id16">General Engine Configuration</a></p>
<ul>
<li><p><a class="reference internal" href="#engine-file" id="id17">Engine File</a></p></li>
<li><p><a class="reference internal" href="#engine-settings-yml" id="id18">Engine <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></p></li>
<li><p><a class="reference internal" href="#overrides" id="id19">Overrides</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#making-a-request" id="id20">Making a Request</a></p>
<ul>
<li><p><a class="reference internal" href="#passed-arguments-request" id="id21">Passed Arguments (request)</a></p></li>
<li><p><a class="reference internal" href="#specify-request" id="id22">Specify Request</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#result-types-template" id="id23">Result Types (<code class="docutils literal notranslate"><span class="pre">template</span></code>)</a></p>
<ul>
<li><p><a class="reference internal" href="#default" id="id24"><code class="docutils literal notranslate"><span class="pre">default</span></code></a></p></li>
<li><p><a class="reference internal" href="#images" id="id25"><code class="docutils literal notranslate"><span class="pre">images</span></code></a></p></li>
<li><p><a class="reference internal" href="#videos" id="id26"><code class="docutils literal notranslate"><span class="pre">videos</span></code></a></p></li>
<li><p><a class="reference internal" href="#torrent" id="id27"><code class="docutils literal notranslate"><span class="pre">torrent</span></code></a></p></li>
<li><p><a class="reference internal" href="#map" id="id28"><code class="docutils literal notranslate"><span class="pre">map</span></code></a></p></li>
<li><p><a class="reference internal" href="#paper" id="id29"><code class="docutils literal notranslate"><span class="pre">paper</span></code></a></p></li>
</ul>
</li>
</ul>
</nav>
<aside class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a></p></li>
<li><p><a class="reference internal" href="../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">engine:</span></a></p></li>
</ul>
</aside>
<p>SearXNG is a <a class="reference external" href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch-engine</a>, so it uses different search engines to provide
better results.</p>
<p>Because there is no general search API which could be used for every search
engine, an adapter has to be built between SearXNG and the external search
engines. Adapters are stored under the folder <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines">git://searx/engines</a>.</p>
<section id="general-engine-configuration">
<span id="id1"></span><h2><a class="toc-backref" href="#id16" role="doc-backlink">General Engine Configuration</a><a class="headerlink" href="#general-engine-configuration" title="Link to this heading"></a></h2>
<p>It is required to tell SearXNG the type of results the engine provides. The
arguments can be set in the engine file or in the settings file (normally
<code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>). The arguments in the settings file override the ones in the
engine file.</p>
<p>It does not matter if an option is stored in the engine file or in the settings.
However, the standard way is the following:</p>
<section id="engine-file">
<span id="id2"></span><h3><a class="toc-backref" href="#id17" role="doc-backlink">Engine File</a><a class="headerlink" href="#engine-file" title="Link to this heading"></a></h3>
<table class="docutils align-default" id="id3" style="width: 100%">
<caption><span class="caption-number">Table 2 </span><span class="caption-text">Common options in the engine module</span><a class="headerlink" href="#id3" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>categories</p></td>
<td><p>list</p></td>
<td><p>categories, in which the engine is working</p></td>
</tr>
<tr class="row-odd"><td><p>paging</p></td>
<td><p>boolean</p></td>
<td><p>support multiple pages</p></td>
</tr>
<tr class="row-even"><td><p>time_range_support</p></td>
<td><p>boolean</p></td>
<td><p>support search time range</p></td>
</tr>
<tr class="row-odd"><td><p>engine_type</p></td>
<td><p>str</p></td>
<td><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">online</span></code> <a class="reference internal" href="index.html#online-engines"><span class="std std-ref">[ref]</span></a> by
default, other possibles values are:</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">offline</span></code> <a class="reference internal" href="index.html#offline-engines"><span class="std std-ref">[ref]</span></a></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">online_dictionary</span></code> <a class="reference internal" href="index.html#online-dictionary"><span class="std std-ref">[ref]</span></a></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">online_currency</span></code> <a class="reference internal" href="index.html#online-currency"><span class="std std-ref">[ref]</span></a></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">online_url_search</span></code> <a class="reference internal" href="index.html#online-url-search"><span class="std std-ref">[ref]</span></a></p></li>
</ul>
</td>
</tr>
</tbody>
</table>
</section>
<section id="engine-settings-yml">
<span id="engine-settings"></span><h3><a class="toc-backref" href="#id18" role="doc-backlink">Engine <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a><a class="headerlink" href="#engine-settings-yml" title="Link to this heading"></a></h3>
<p>For a more detailed description, see <a class="reference internal" href="../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">engine:</span></a> in the <a class="reference internal" href="../../admin/settings/settings.html#settings-yml"><span class="std std-ref">settings.yml</span></a>.</p>
<table class="docutils align-default" id="id4" style="width: 100%">
<caption><span class="caption-number">Table 3 </span><span class="caption-text">Common options in the engine setup (<code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>)</span><a class="headerlink" href="#id4" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>name</p></td>
<td><p>string</p></td>
<td><p>name of search-engine</p></td>
</tr>
<tr class="row-odd"><td><p>engine</p></td>
<td><p>string</p></td>
<td><p>name of searxng-engine (file name without <code class="docutils literal notranslate"><span class="pre">.py</span></code>)</p></td>
</tr>
<tr class="row-even"><td><p>enable_http</p></td>
<td><p>bool</p></td>
<td><p>enable HTTP (by default only HTTPS is enabled).</p></td>
</tr>
<tr class="row-odd"><td><p>shortcut</p></td>
<td><p>string</p></td>
<td><p>shortcut of search-engine</p></td>
</tr>
<tr class="row-even"><td><p>timeout</p></td>
<td><p>string</p></td>
<td><p>specific timeout for search-engine</p></td>
</tr>
<tr class="row-odd"><td><p>display_error_messages</p></td>
<td><p>boolean</p></td>
<td><p>display error messages on the web UI</p></td>
</tr>
<tr class="row-even"><td><p>proxies</p></td>
<td><p>dict</p></td>
<td><p>set proxies for a specific engine
(e.g. <code class="docutils literal notranslate"><span class="pre">proxies</span> <span class="pre">:</span> <span class="pre">{http:</span> <span class="pre">socks5://proxy:port,</span>
<span class="pre">https:</span> <span class="pre">socks5://proxy:port}</span></code>)</p></td>
</tr>
</tbody>
</table>
</section>
<section id="overrides">
<span id="engine-overrides"></span><h3><a class="toc-backref" href="#id19" role="doc-backlink">Overrides</a><a class="headerlink" href="#overrides" title="Link to this heading"></a></h3>
<p>A few of the options have default values in the namespace of the engines python
module, but are often overwritten by the settings. If <code class="docutils literal notranslate"><span class="pre">None</span></code> is assigned to an
option in the engine file, it has to be redefined in the settings, otherwise
SearXNG will not start with that engine (global names with a leading underline can
be <code class="docutils literal notranslate"><span class="pre">None</span></code>).</p>
<p>Here is an very simple example of the global names in the namespace of engines
module:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># engine dependent config</span>
<span class="n">categories</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;general&#39;</span><span class="p">]</span>
<span class="n">paging</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">_non_overwritten_global</span> <span class="o">=</span> <span class="s1">&#39;foo&#39;</span>
</pre></div>
</div>
<table class="docutils align-default" id="id5" style="width: 100%">
<caption><span class="caption-number">Table 4 </span><span class="caption-text">The naming of overrides is arbitrary / recommended overrides are:</span><a class="headerlink" href="#id5" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>base_url</p></td>
<td><p>string</p></td>
<td><p>base-url, can be overwritten to use same
engine on other URL</p></td>
</tr>
<tr class="row-odd"><td><p>number_of_results</p></td>
<td><p>int</p></td>
<td><p>maximum number of results per request</p></td>
</tr>
<tr class="row-even"><td><p>language</p></td>
<td><p>string</p></td>
<td><p>ISO code of language and country like en_US</p></td>
</tr>
<tr class="row-odd"><td><p>api_key</p></td>
<td><p>string</p></td>
<td><p>api-key if required by engine</p></td>
</tr>
</tbody>
</table>
</section>
</section>
<section id="making-a-request">
<span id="engine-request"></span><h2><a class="toc-backref" href="#id20" role="doc-backlink">Making a Request</a><a class="headerlink" href="#making-a-request" title="Link to this heading"></a></h2>
<p>To perform a search an URL have to be specified. In addition to specifying an
URL, arguments can be passed to the query.</p>
<section id="passed-arguments-request">
<span id="engine-request-arguments"></span><h3><a class="toc-backref" href="#id21" role="doc-backlink">Passed Arguments (request)</a><a class="headerlink" href="#passed-arguments-request" title="Link to this heading"></a></h3>
<p>These arguments can be used to construct the search query. Furthermore,
parameters with default value can be redefined for special purposes.</p>
<span id="engine-request-online"></span><table class="docutils align-default" id="id6" style="width: 100%">
<caption><span class="caption-number">Table 5 </span><span class="caption-text">If the <code class="docutils literal notranslate"><span class="pre">engine_type</span></code> is <a class="reference internal" href="../../src/searx.search.processors.html#searx.search.processors.online.OnlineProcessor.get_params" title="searx.search.processors.online.OnlineProcessor.get_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">online</span></code></a></span><a class="headerlink" href="#id6" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>default-value, information</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>url</p></td>
<td><p>str</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">''</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>method</p></td>
<td><p>str</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">'GET'</span></code></p></td>
</tr>
<tr class="row-even"><td><p>headers</p></td>
<td><p>set</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">{}</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>data</p></td>
<td><p>set</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">{}</span></code></p></td>
</tr>
<tr class="row-even"><td><p>cookies</p></td>
<td><p>set</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">{}</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>verify</p></td>
<td><p>bool</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">True</span></code></p></td>
</tr>
<tr class="row-even"><td><p>headers.User-Agent</p></td>
<td><p>str</p></td>
<td><p>a random User-Agent</p></td>
</tr>
<tr class="row-odd"><td><p>category</p></td>
<td><p>str</p></td>
<td><p>current category, like <code class="docutils literal notranslate"><span class="pre">'general'</span></code></p></td>
</tr>
<tr class="row-even"><td><p>safesearch</p></td>
<td><p>int</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, between <code class="docutils literal notranslate"><span class="pre">0</span></code> and <code class="docutils literal notranslate"><span class="pre">2</span></code> (normal, moderate, strict)</p></td>
</tr>
<tr class="row-odd"><td><p>time_range</p></td>
<td><p>Optional[str]</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">None</span></code>, can be <code class="docutils literal notranslate"><span class="pre">day</span></code>, <code class="docutils literal notranslate"><span class="pre">week</span></code>, <code class="docutils literal notranslate"><span class="pre">month</span></code>, <code class="docutils literal notranslate"><span class="pre">year</span></code></p></td>
</tr>
<tr class="row-even"><td><p>pageno</p></td>
<td><p>int</p></td>
<td><p>current pagenumber</p></td>
</tr>
<tr class="row-odd"><td><p>searxng_locale</p></td>
<td><p>str</p></td>
<td><p>SearXNGs locale selected by user. Specific language code like
<code class="docutils literal notranslate"><span class="pre">'en'</span></code>, <code class="docutils literal notranslate"><span class="pre">'en-US'</span></code>, or <code class="docutils literal notranslate"><span class="pre">'all'</span></code> if unspecified.</p></td>
</tr>
</tbody>
</table>
<span id="engine-request-online-dictionary"></span><table class="docutils align-default" id="id7" style="width: 100%">
<caption><span class="caption-number">Table 6 </span><span class="caption-text">If the <code class="docutils literal notranslate"><span class="pre">engine_type</span></code> is <a class="reference internal" href="../../src/searx.search.processors.html#searx.search.processors.online_dictionary.OnlineDictionaryProcessor.get_params" title="searx.search.processors.online_dictionary.OnlineDictionaryProcessor.get_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">online_dictionary</span></code></a>,
in addition to the <a class="reference internal" href="#engine-request-online"><span class="std std-ref">online</span></a> arguments:</span><a class="headerlink" href="#id7" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>default-value, information</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>from_lang</p></td>
<td><p>str</p></td>
<td><p>specific language code like <code class="docutils literal notranslate"><span class="pre">'en_US'</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>to_lang</p></td>
<td><p>str</p></td>
<td><p>specific language code like <code class="docutils literal notranslate"><span class="pre">'en_US'</span></code></p></td>
</tr>
<tr class="row-even"><td><p>query</p></td>
<td><p>str</p></td>
<td><p>the text query without the languages</p></td>
</tr>
</tbody>
</table>
<span id="engine-request-online-currency"></span><table class="docutils align-default" id="id8" style="width: 100%">
<caption><span class="caption-number">Table 7 </span><span class="caption-text">If the <code class="docutils literal notranslate"><span class="pre">engine_type</span></code> is <a class="reference internal" href="../../src/searx.search.processors.html#searx.search.processors.online_currency.OnlineCurrencyProcessor.get_params" title="searx.search.processors.online_currency.OnlineCurrencyProcessor.get_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">online_currency</span></code></a>,
in addition to the <a class="reference internal" href="#engine-request-online"><span class="std std-ref">online</span></a> arguments:</span><a class="headerlink" href="#id8" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>default-value, information</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>amount</p></td>
<td><p>float</p></td>
<td><p>the amount to convert</p></td>
</tr>
<tr class="row-odd"><td><p>from</p></td>
<td><p>str</p></td>
<td><p>ISO 4217 code</p></td>
</tr>
<tr class="row-even"><td><p>to</p></td>
<td><p>str</p></td>
<td><p>ISO 4217 code</p></td>
</tr>
<tr class="row-odd"><td><p>from_name</p></td>
<td><p>str</p></td>
<td><p>currency name</p></td>
</tr>
<tr class="row-even"><td><p>to_name</p></td>
<td><p>str</p></td>
<td><p>currency name</p></td>
</tr>
</tbody>
</table>
<span id="engine-request-online-url-search"></span><table class="docutils align-default" id="id9" style="width: 100%">
<caption><span class="caption-number">Table 8 </span><span class="caption-text">If the <code class="docutils literal notranslate"><span class="pre">engine_type</span></code> is <a class="reference internal" href="../../src/searx.search.processors.html#searx.search.processors.online_url_search.OnlineUrlSearchProcessor.get_params" title="searx.search.processors.online_url_search.OnlineUrlSearchProcessor.get_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">online_url_search</span></code></a>,
in addition to the <a class="reference internal" href="#engine-request-online"><span class="std std-ref">online</span></a> arguments:</span><a class="headerlink" href="#id9" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>default-value, information</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>search_url</p></td>
<td><p>dict</p></td>
<td><p>URLs from the search query:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s1">&#39;http&#39;</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="s1">&#39;ftp&#39;</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="s1">&#39;data:image&#39;</span><span class="p">:</span> <span class="nb">str</span>
<span class="p">}</span>
</pre></div>
</div>
</td>
</tr>
</tbody>
</table>
</section>
<section id="specify-request">
<h3><a class="toc-backref" href="#id22" role="doc-backlink">Specify Request</a><a class="headerlink" href="#specify-request" title="Link to this heading"></a></h3>
<p>The function <a class="reference internal" href="demo/demo_online.html#searx.engines.demo_online.request" title="searx.engines.demo_online.request"><code class="xref py py-func docutils literal notranslate"><span class="pre">def</span> <span class="pre">request(query,</span> <span class="pre">params):</span></code></a> always returns the <code class="docutils literal notranslate"><span class="pre">params</span></code> variable, the
following parameters can be used to specify a search request:</p>
<table class="docutils align-default" style="width: 100%">
<thead>
<tr class="row-odd"><th class="head"><p>argument</p></th>
<th class="head"><p>type</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>url</p></td>
<td><p>str</p></td>
<td><p>requested url</p></td>
</tr>
<tr class="row-odd"><td><p>method</p></td>
<td><p>str</p></td>
<td><p>HTTP request method</p></td>
</tr>
<tr class="row-even"><td><p>headers</p></td>
<td><p>set</p></td>
<td><p>HTTP header information</p></td>
</tr>
<tr class="row-odd"><td><p>data</p></td>
<td><p>set</p></td>
<td><p>HTTP data information</p></td>
</tr>
<tr class="row-even"><td><p>cookies</p></td>
<td><p>set</p></td>
<td><p>HTTP cookies</p></td>
</tr>
<tr class="row-odd"><td><p>verify</p></td>
<td><p>bool</p></td>
<td><p>Performing SSL-Validity check</p></td>
</tr>
<tr class="row-even"><td><p>allow_redirects</p></td>
<td><p>bool</p></td>
<td><p>Follow redirects</p></td>
</tr>
<tr class="row-odd"><td><p>max_redirects</p></td>
<td><p>int</p></td>
<td><p>maximum redirects, hard limit</p></td>
</tr>
<tr class="row-even"><td><p>soft_max_redirects</p></td>
<td><p>int</p></td>
<td><p>maximum redirects, soft limit. Record an error but dont stop the engine</p></td>
</tr>
<tr class="row-odd"><td><p>raise_for_httperror</p></td>
<td><p>bool</p></td>
<td><p>True by default: raise an exception if the HTTP code of response is &gt;= 300</p></td>
</tr>
</tbody>
</table>
</section>
</section>
<section id="result-types-template">
<span id="engine-media-types"></span><span id="engine-results"></span><h2><a class="toc-backref" href="#id23" role="doc-backlink">Result Types (<code class="docutils literal notranslate"><span class="pre">template</span></code>)</a><a class="headerlink" href="#result-types-template" title="Link to this heading"></a></h2>
<p>Each result item of an engine can be of different media-types. Currently the
following media-types are supported. To set another media-type as
<a class="reference internal" href="#template-default"><span class="std std-ref">default</span></a>, the parameter <code class="docutils literal notranslate"><span class="pre">template</span></code> must be set to the desired
type.</p>
<section id="default">
<span id="template-default"></span><h3><a class="toc-backref" href="#id24" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">default</span></code></a><a class="headerlink" href="#default" title="Link to this heading"></a></h3>
<table class="docutils align-default" id="id10" style="width: 100%">
<caption><span class="caption-number">Table 9 </span><span class="caption-text">Parameter of the <strong>default</strong> media type:</span><a class="headerlink" href="#id10" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>information</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>url</p></td>
<td><p>string, url of the result</p></td>
</tr>
<tr class="row-odd"><td><p>title</p></td>
<td><p>string, title of the result</p></td>
</tr>
<tr class="row-even"><td><p>content</p></td>
<td><p>string, general result-text</p></td>
</tr>
<tr class="row-odd"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>, time of publish</p></td>
</tr>
</tbody>
</table>
</section>
<section id="images">
<span id="template-images"></span><h3><a class="toc-backref" href="#id25" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">images</span></code></a><a class="headerlink" href="#images" title="Link to this heading"></a></h3>
<table class="docutils align-default" id="id11" style="width: 100%">
<caption><span class="caption-number">Table 10 </span><span class="caption-text">Parameter of the <strong>images</strong> media type:</span><a class="headerlink" href="#id11" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>information</p></th>
</tr>
<tr class="row-even"><th class="head"><p>template</p></th>
<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">images.html</span></code></p></th>
</tr>
</thead>
<tbody>
<tr class="row-odd"><td><p>url</p></td>
<td><p>string, url to the result site</p></td>
</tr>
<tr class="row-even"><td><p>title</p></td>
<td><p>string, title of the result <em>(partly implemented)</em></p></td>
</tr>
<tr class="row-odd"><td><p>content</p></td>
<td><p><em>(partly implemented)</em></p></td>
</tr>
<tr class="row-even"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>,
time of publish <em>(partly implemented)</em></p></td>
</tr>
<tr class="row-odd"><td><p>img_src</p></td>
<td><p>string, url to the result image</p></td>
</tr>
<tr class="row-even"><td><p>thumbnail_src</p></td>
<td><p>string, url to a small-preview image</p></td>
</tr>
</tbody>
</table>
</section>
<section id="videos">
<span id="template-videos"></span><h3><a class="toc-backref" href="#id26" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">videos</span></code></a><a class="headerlink" href="#videos" title="Link to this heading"></a></h3>
<table class="docutils align-default" id="id12" style="width: 100%">
<caption><span class="caption-number">Table 11 </span><span class="caption-text">Parameter of the <strong>videos</strong> media type:</span><a class="headerlink" href="#id12" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>information</p></th>
</tr>
<tr class="row-even"><th class="head"><p>template</p></th>
<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">videos.html</span></code></p></th>
</tr>
</thead>
<tbody>
<tr class="row-odd"><td><p>url</p></td>
<td><p>string, url of the result</p></td>
</tr>
<tr class="row-even"><td><p>title</p></td>
<td><p>string, title of the result</p></td>
</tr>
<tr class="row-odd"><td><p>content</p></td>
<td><p><em>(not implemented yet)</em></p></td>
</tr>
<tr class="row-even"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>, time of publish</p></td>
</tr>
<tr class="row-odd"><td><p>thumbnail</p></td>
<td><p>string, url to a small-preview image</p></td>
</tr>
</tbody>
</table>
</section>
<section id="torrent">
<span id="template-torrent"></span><h3><a class="toc-backref" href="#id27" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">torrent</span></code></a><a class="headerlink" href="#torrent" title="Link to this heading"></a></h3>
<table class="docutils align-default" id="id13" style="width: 100%">
<caption><span class="caption-number">Table 12 </span><span class="caption-text">Parameter of the <strong>torrent</strong> media type:</span><a class="headerlink" href="#id13" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>information</p></th>
</tr>
<tr class="row-even"><th class="head"><p>template</p></th>
<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">torrent.html</span></code></p></th>
</tr>
</thead>
<tbody>
<tr class="row-odd"><td><p>url</p></td>
<td><p>string, url of the result</p></td>
</tr>
<tr class="row-even"><td><p>title</p></td>
<td><p>string, title of the result</p></td>
</tr>
<tr class="row-odd"><td><p>content</p></td>
<td><p>string, general result-text</p></td>
</tr>
<tr class="row-even"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>,
time of publish <em>(not implemented yet)</em></p></td>
</tr>
<tr class="row-odd"><td><p>seed</p></td>
<td><p>int, number of seeder</p></td>
</tr>
<tr class="row-even"><td><p>leech</p></td>
<td><p>int, number of leecher</p></td>
</tr>
<tr class="row-odd"><td><p>filesize</p></td>
<td><p>int, size of file in bytes</p></td>
</tr>
<tr class="row-even"><td><p>files</p></td>
<td><p>int, number of files</p></td>
</tr>
<tr class="row-odd"><td><p>magnetlink</p></td>
<td><p>string, <a class="reference external" href="https://en.wikipedia.org/wiki/Magnet_URI_scheme">magnetlink</a> of the result</p></td>
</tr>
<tr class="row-even"><td><p>torrentfile</p></td>
<td><p>string, torrentfile of the result</p></td>
</tr>
</tbody>
</table>
</section>
<section id="map">
<span id="template-map"></span><h3><a class="toc-backref" href="#id28" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">map</span></code></a><a class="headerlink" href="#map" title="Link to this heading"></a></h3>
<table class="docutils align-default" id="id14" style="width: 100%">
<caption><span class="caption-number">Table 13 </span><span class="caption-text">Parameter of the <strong>map</strong> media type:</span><a class="headerlink" href="#id14" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>information</p></th>
</tr>
<tr class="row-even"><th class="head"><p>template</p></th>
<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">map.html</span></code></p></th>
</tr>
</thead>
<tbody>
<tr class="row-odd"><td><p>url</p></td>
<td><p>string, url of the result</p></td>
</tr>
<tr class="row-even"><td><p>title</p></td>
<td><p>string, title of the result</p></td>
</tr>
<tr class="row-odd"><td><p>content</p></td>
<td><p>string, general result-text</p></td>
</tr>
<tr class="row-even"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>, time of publish</p></td>
</tr>
<tr class="row-odd"><td><p>latitude</p></td>
<td><p>latitude of result (in decimal format)</p></td>
</tr>
<tr class="row-even"><td><p>longitude</p></td>
<td><p>longitude of result (in decimal format)</p></td>
</tr>
<tr class="row-odd"><td><p>boundingbox</p></td>
<td><p>boundingbox of result (array of 4. values
<code class="docutils literal notranslate"><span class="pre">[lat-min,</span> <span class="pre">lat-max,</span> <span class="pre">lon-min,</span> <span class="pre">lon-max]</span></code>)</p></td>
</tr>
<tr class="row-even"><td><p>geojson</p></td>
<td><p>geojson of result (<a class="reference external" href="https://geojson.org/">https://geojson.org/</a>)</p></td>
</tr>
<tr class="row-odd"><td><p>osm.type</p></td>
<td><p>type of osm-object (if OSM-Result)</p></td>
</tr>
<tr class="row-even"><td><p>osm.id</p></td>
<td><p>id of osm-object (if OSM-Result)</p></td>
</tr>
<tr class="row-odd"><td><p>address.name</p></td>
<td><p>name of object</p></td>
</tr>
<tr class="row-even"><td><p>address.road</p></td>
<td><p>street name of object</p></td>
</tr>
<tr class="row-odd"><td><p>address.house_number</p></td>
<td><p>house number of object</p></td>
</tr>
<tr class="row-even"><td><p>address.locality</p></td>
<td><p>city, place of object</p></td>
</tr>
<tr class="row-odd"><td><p>address.postcode</p></td>
<td><p>postcode of object</p></td>
</tr>
<tr class="row-even"><td><p>address.country</p></td>
<td><p>country of object</p></td>
</tr>
</tbody>
</table>
</section>
<section id="paper">
<span id="template-paper"></span><h3><a class="toc-backref" href="#id29" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">paper</span></code></a><a class="headerlink" href="#paper" title="Link to this heading"></a></h3>
<table class="docutils align-default" id="id15" style="width: 100%">
<caption><span class="caption-number">Table 14 </span><span class="caption-text">Parameter of the <strong>paper</strong> media type /
see <a class="reference external" href="https://en.wikipedia.org/wiki/BibTeX#Field_types">BibTeX field types</a> and <a class="reference external" href="https://www.bibtex.com/g/bibtex-format/">BibTeX format</a></span><a class="headerlink" href="#id15" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>result-parameter</p></th>
<th class="head"><p>Python type</p></th>
<th class="head"><p>information</p></th>
</tr>
<tr class="row-even"><th class="head"><p>template</p></th>
<th class="head"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></th>
<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">paper.html</span></code></p></th>
</tr>
</thead>
<tbody>
<tr class="row-odd"><td><p>title</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>title of the result</p></td>
</tr>
<tr class="row-even"><td><p>content</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>abstract</p></td>
</tr>
<tr class="row-odd"><td><p>comments</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>free text display in italic below the content</p></td>
</tr>
<tr class="row-even"><td><p>tags</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</p></td>
<td><p>free tag list</p></td>
</tr>
<tr class="row-odd"><td><p>publishedDate</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime</span></code></a></p></td>
<td><p>last publication date</p></td>
</tr>
<tr class="row-even"><td><p>type</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>short description of medium type, e.g. <em>book</em>, <em>pdf</em> or <em>html</em></p></td>
</tr>
<tr class="row-odd"><td><p>authors</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</p></td>
<td><p>list of authors of the work (authors with a “s”)</p></td>
</tr>
<tr class="row-even"><td><p>editor</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>list of editors of a book</p></td>
</tr>
<tr class="row-odd"><td><p>publisher</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>name of the publisher</p></td>
</tr>
<tr class="row-even"><td><p>journal</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>name of the journal or magazine the article was
published in</p></td>
</tr>
<tr class="row-odd"><td><p>volume</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>volume number</p></td>
</tr>
<tr class="row-even"><td><p>pages</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>page range where the article is</p></td>
</tr>
<tr class="row-odd"><td><p>number</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>number of the report or the issue number for a journal article</p></td>
</tr>
<tr class="row-even"><td><p>doi</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>DOI number (like <code class="docutils literal notranslate"><span class="pre">10.1038/d41586-018-07848-2</span></code>)</p></td>
</tr>
<tr class="row-odd"><td><p>issn</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</p></td>
<td><p>ISSN number like <code class="docutils literal notranslate"><span class="pre">1476-4687</span></code></p></td>
</tr>
<tr class="row-even"><td><p>isbn</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</p></td>
<td><p>ISBN number like <code class="docutils literal notranslate"><span class="pre">9780201896831</span></code></p></td>
</tr>
<tr class="row-odd"><td><p>pdf_url</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>URL to the full article, the PDF version</p></td>
</tr>
<tr class="row-even"><td><p>html_url</p></td>
<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td>
<td><p>URL to full article, HTML version</p></td>
</tr>
</tbody>
</table>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">Engine Overview</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#general-engine-configuration">General Engine Configuration</a><ul>
<li class="toctree-l5"><a class="reference internal" href="#engine-file">Engine File</a></li>
<li class="toctree-l5"><a class="reference internal" href="#engine-settings-yml">Engine <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#overrides">Overrides</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#making-a-request">Making a Request</a><ul>
<li class="toctree-l5"><a class="reference internal" href="#passed-arguments-request">Passed Arguments (request)</a></li>
<li class="toctree-l5"><a class="reference internal" href="#specify-request">Specify Request</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#result-types-template">Result Types (<code class="docutils literal notranslate"><span class="pre">template</span></code>)</a><ul>
<li class="toctree-l5"><a class="reference internal" href="#default"><code class="docutils literal notranslate"><span class="pre">default</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#images"><code class="docutils literal notranslate"><span class="pre">images</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#videos"><code class="docutils literal notranslate"><span class="pre">videos</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#torrent"><code class="docutils literal notranslate"><span class="pre">torrent</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#map"><code class="docutils literal notranslate"><span class="pre">map</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#paper"><code class="docutils literal notranslate"><span class="pre">paper</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="index.html#engine-types">Engine Types</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../index.html">Overview</a>
<ul>
<li><a href="../index.html">Developer documentation</a>
<ul>
<li><a href="index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="engines.html" title="previous chapter">SearXNGs engines loader</a>
<li>Next: <a href="demo/demo_online.html" title="next chapter">Demo Online Engine</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/dev/engines/engine_overview.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

571
dev/engines/enginelib.html Normal file
View file

@ -0,0 +1,571 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Engine Library &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script src="../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="SearXNGs engines loader" href="engines.html" />
<link rel="prev" title="Engine Implementations" href="index.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="engines.html" title="SearXNGs engines loader"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Engine Implementations"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Engine Library</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="engine-library">
<span id="searx-enginelib"></span><h1>Engine Library<a class="headerlink" href="#engine-library" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#module-searx.enginelib.traits" id="id1">Engine traits</a></p></li>
</ul>
</nav>
<p id="module-searx.enginelib">Implementations of the framework for the SearXNG engines.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>The long term goal is to modularize all implementations of the engine
framework here in this Python package. ToDo:</p>
<ul class="simple">
<li><p>move implementations of the <a class="reference internal" href="engines.html#searx-engines-loader"><span class="std std-ref">SearXNGs engines loader</span></a> to a new module in
the <a class="reference internal" href="#module-searx.enginelib" title="searx.enginelib"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.enginelib</span></code></a> namespace.</p></li>
</ul>
</div>
<dl class="py class">
<dt class="sig sig-object py" id="searx.enginelib.Engine">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searx.enginelib.</span></span><span class="sig-name descname"><span class="pre">Engine</span></span><a class="reference internal" href="../../_modules/searx/enginelib.html#Engine"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.Engine" title="Link to this definition"></a></dt>
<dd><p>Class of engine instances build from YAML settings.</p>
<p>Further documentation see <a class="reference internal" href="engine_overview.html#general-engine-configuration"><span class="std std-ref">General Engine Configuration</span></a>.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>This class is currently never initialized and only used for type hinting.</p>
</div>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.about">
<span class="sig-name descname"><span class="pre">about</span></span><em 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.12)"><span class="pre">dict</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.about" title="Link to this definition"></a></dt>
<dd><p>Additional fields describing the engine.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">about</span><span class="p">:</span>
<span class="w"> </span><span class="nt">website</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://example.com</span>
<span class="w"> </span><span class="nt">wikidata_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Q306656</span>
<span class="w"> </span><span class="nt">official_api_documentation</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://example.com/api-doc</span>
<span class="w"> </span><span class="nt">use_official_api</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">require_api_key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">results</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">HTML</span>
</pre></div>
</div>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.categories">
<span class="sig-name descname"><span class="pre">categories</span></span><em 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.List" title="(in Python v3.12)"><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.12)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#searx.enginelib.Engine.categories" title="Link to this definition"></a></dt>
<dd><p>Specifies to which <a class="reference internal" href="../../admin/settings/settings_engine.html#engine-categories"><span class="std std-ref">categories</span></a> the engine should be added.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.disabled">
<span class="sig-name descname"><span class="pre">disabled</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.disabled" title="Link to this definition"></a></dt>
<dd><p>To disable by default the engine, but not deleting it. It will allow the
user to manually activate it in the settings.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.display_error_messages">
<span class="sig-name descname"><span class="pre">display_error_messages</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.display_error_messages" title="Link to this definition"></a></dt>
<dd><p>Display error messages on the web UI.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.enable_http">
<span class="sig-name descname"><span class="pre">enable_http</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.enable_http" title="Link to this definition"></a></dt>
<dd><p>Enable HTTP (by default only HTTPS is enabled).</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.engine">
<span class="sig-name descname"><span class="pre">engine</span></span><em 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.12)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.engine" title="Link to this definition"></a></dt>
<dd><p>Name of the python file used to handle requests and responses to and from
this search engine (file name from <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines">git://searx/engines</a> without
<code class="docutils literal notranslate"><span class="pre">.py</span></code>).</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.engine_type">
<span class="sig-name descname"><span class="pre">engine_type</span></span><em 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.12)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.engine_type" title="Link to this definition"></a></dt>
<dd><p>Type of the engine (<a class="reference internal" href="../../src/searx.search.processors.html#searx-search-processors"><span class="std std-ref">Search processors</span></a>)</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.fetch_traits">
<span class="sig-name descname"><span class="pre">fetch_traits</span></span><em 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.Callable" title="(in Python v3.12)"><span class="pre">Callable</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Function to to fetch engines traits from origin.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.inactive">
<span class="sig-name descname"><span class="pre">inactive</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.inactive" title="Link to this definition"></a></dt>
<dd><p>Remove the engine from the settings (<em>disabled &amp; removed</em>).</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.language">
<span class="sig-name descname"><span class="pre">language</span></span><em 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.12)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.language" title="Link to this definition"></a></dt>
<dd><p>For an engine, when there is <code class="docutils literal notranslate"><span class="pre">language:</span> <span class="pre">...</span></code> in the YAML settings the engine
does support only this one language:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">google french</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">google</span>
<span class="w"> </span><span class="nt">language</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fr</span>
</pre></div>
</div>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.language_support">
<span class="sig-name descname"><span class="pre">language_support</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.language_support" title="Link to this definition"></a></dt>
<dd><p>Engine supports languages (locales) search.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.name">
<span class="sig-name descname"><span class="pre">name</span></span><em 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.12)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.name" title="Link to this definition"></a></dt>
<dd><p>Name that will be used across SearXNG to define this engine. In settings, on
the result page ..</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.paging">
<span class="sig-name descname"><span class="pre">paging</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.paging" title="Link to this definition"></a></dt>
<dd><p>Engine supports multiple pages.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.proxies">
<span class="sig-name descname"><span class="pre">proxies</span></span><em 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.12)"><span class="pre">dict</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.proxies" title="Link to this definition"></a></dt>
<dd><p>Set proxies for a specific engine (YAML):</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">proxies </span><span class="p">:</span>
<span class="w"> </span><span class="nt">http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">socks5://proxy:port</span>
<span class="w"> </span><span class="nt">https</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">socks5://proxy:port</span>
</pre></div>
</div>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.region">
<span class="sig-name descname"><span class="pre">region</span></span><em 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.12)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.region" title="Link to this definition"></a></dt>
<dd><p>For an engine, when there is <code class="docutils literal notranslate"><span class="pre">region:</span> <span class="pre">...</span></code> in the YAML settings the engine
does support only this one region:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">..</span> <span class="n">code</span><span class="p">::</span> <span class="n">yaml</span>
</pre></div>
</div>
<blockquote>
<div><ul class="simple">
<li><p>name: google belgium
engine: google
region: fr-BE</p></li>
</ul>
</div></blockquote>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.safesearch">
<span class="sig-name descname"><span class="pre">safesearch</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.safesearch" title="Link to this definition"></a></dt>
<dd><p>Engine supports SafeSearch</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.send_accept_language_header">
<span class="sig-name descname"><span class="pre">send_accept_language_header</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.send_accept_language_header" title="Link to this definition"></a></dt>
<dd><p>When this option is activated, the language (locale) that is selected by
the user is used to build and send a <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header in the
request to the origin search engine.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.shortcut">
<span class="sig-name descname"><span class="pre">shortcut</span></span><em 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.12)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.shortcut" title="Link to this definition"></a></dt>
<dd><p>Code used to execute bang requests (<code class="docutils literal notranslate"><span class="pre">!foo</span></code>)</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.time_range_support">
<span class="sig-name descname"><span class="pre">time_range_support</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.time_range_support" title="Link to this definition"></a></dt>
<dd><p>Engine supports search time range.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.timeout">
<span class="sig-name descname"><span class="pre">timeout</span></span><em 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.12)"><span class="pre">float</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.timeout" title="Link to this definition"></a></dt>
<dd><p>Specific timeout for search-engine.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.tokens">
<span class="sig-name descname"><span class="pre">tokens</span></span><em 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.List" title="(in Python v3.12)"><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.12)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#searx.enginelib.Engine.tokens" title="Link to this definition"></a></dt>
<dd><p>A list of secret tokens to make this engine <em>private</em>, more details see
<a class="reference internal" href="../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.traits">
<span class="sig-name descname"><span class="pre">traits</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.traits" title="Link to this definition"></a></dt>
<dd><p>Traits of the engine.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.Engine.using_tor_proxy">
<span class="sig-name descname"><span class="pre">using_tor_proxy</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.using_tor_proxy" title="Link to this definition"></a></dt>
<dd><p>Using tor proxy (<code class="docutils literal notranslate"><span class="pre">true</span></code>) or not (<code class="docutils literal notranslate"><span class="pre">false</span></code>) for this engine.</p>
</dd></dl>
</dd></dl>
<section id="module-searx.enginelib.traits">
<span id="engine-traits"></span><span id="searx-enginelib-traits"></span><h2><a class="toc-backref" href="#id1" role="doc-backlink">Engine traits</a><a class="headerlink" href="#module-searx.enginelib.traits" title="Link to this heading"></a></h2>
<p>Engines traits are fetched from the origin engines and stored in a JSON file
in the <em>data folder</em>. Most often traits are languages and region codes and
their mapping from SearXNGs representation to the representation in the origin
search engine. For new traits new properties can be added to the class
<a class="reference internal" href="#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-class docutils literal notranslate"><span class="pre">EngineTraits</span></code></a>.</p>
<p>To load traits from the persistence <a class="reference internal" href="#searx.enginelib.traits.EngineTraitsMap.from_data" title="searx.enginelib.traits.EngineTraitsMap.from_data"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraitsMap.from_data</span></code></a> can be
used.</p>
<dl class="py class">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searx.enginelib.traits.</span></span><span class="sig-name descname"><span class="pre">EngineTraits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">regions:</span> <span class="pre">~typing.Dict[str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">str]</span> <span class="pre">=</span> <span class="pre">&lt;factory&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">languages:</span> <span class="pre">~typing.Dict[str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">str]</span> <span class="pre">=</span> <span class="pre">&lt;factory&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_locale:</span> <span class="pre">str</span> <span class="pre">|</span> <span class="pre">None</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data_type:</span> <span class="pre">typing_extensions.Literal[traits_v1]</span> <span class="pre">=</span> <span class="pre">'traits_v1'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">custom:</span> <span class="pre">~typing.Dict[str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">~typing.Dict[str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">~typing.Dict]</span> <span class="pre">|</span> <span class="pre">~typing.Iterable[str]]</span> <span class="pre">=</span> <span class="pre">&lt;factory&gt;</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits" title="Link to this definition"></a></dt>
<dd><p>The class is intended to be instantiated for each engine.</p>
<dl class="py method">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.copy">
<span class="sig-name descname"><span class="pre">copy</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.copy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.copy" title="Link to this definition"></a></dt>
<dd><p>Create a copy of the dataclass object.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.fetch_traits">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">fetch_traits</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="#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</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.12)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Call a function <code class="docutils literal notranslate"><span class="pre">fetch_traits(engine_traits)</span></code> from engines namespace to fetch
and set properties from the origin engine in the object <code class="docutils literal notranslate"><span class="pre">engine_traits</span></code>. If
function does not exists, <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.enginelib.traits.EngineTraits.get_language">
<span class="sig-name descname"><span class="pre">get_language</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.12)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.get_language"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.get_language" title="Link to this definition"></a></dt>
<dd><p>Return engines language string that <em>best fits</em> to SearXNGs locale.</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> SearXNGs internal representation of locale
selected by the user.</p></li>
<li><p><strong>default</strong> engines default language</p></li>
</ul>
</dd>
</dl>
<p>The <em>best fits</em> rules are implemented in
<a class="reference internal" href="../../src/searx.locales.html#searx.locales.get_engine_locale" title="searx.locales.get_engine_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.locales.get_engine_locale</span></code></a>. Except for the special value <code class="docutils literal notranslate"><span class="pre">all</span></code>
which is determined from <a class="reference internal" href="#searx.enginelib.traits.EngineTraits.all_locale" title="searx.enginelib.traits.EngineTraits.all_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraits.all_locale</span></code></a>.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.get_region">
<span class="sig-name descname"><span class="pre">get_region</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.12)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.get_region"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.get_region" title="Link to this definition"></a></dt>
<dd><p>Return engines region string that best fits to SearXNGs locale.</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> SearXNGs internal representation of locale
selected by the user.</p></li>
<li><p><strong>default</strong> engines default region</p></li>
</ul>
</dd>
</dl>
<p>The <em>best fits</em> rules are implemented in
<a class="reference internal" href="../../src/searx.locales.html#searx.locales.get_engine_locale" title="searx.locales.get_engine_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.locales.get_engine_locale</span></code></a>. Except for the special value <code class="docutils literal notranslate"><span class="pre">all</span></code>
which is determined from <a class="reference internal" href="#searx.enginelib.traits.EngineTraits.all_locale" title="searx.enginelib.traits.EngineTraits.all_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraits.all_locale</span></code></a>.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.is_locale_supported">
<span class="sig-name descname"><span class="pre">is_locale_supported</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.12)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.is_locale_supported"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.is_locale_supported" title="Link to this definition"></a></dt>
<dd><p>A <em>locale</em> (SearXNGs internal representation) is considered to be
supported by the engine if the <em>region</em> or the <em>language</em> is supported
by the engine.</p>
<p>For verification the functions <a class="reference internal" href="#searx.enginelib.traits.EngineTraits.get_region" title="searx.enginelib.traits.EngineTraits.get_region"><code class="xref py py-func docutils literal notranslate"><span class="pre">EngineTraits.get_region()</span></code></a> and
<a class="reference internal" href="#searx.enginelib.traits.EngineTraits.get_language" title="searx.enginelib.traits.EngineTraits.get_language"><code class="xref py py-func docutils literal notranslate"><span class="pre">EngineTraits.get_language()</span></code></a> are used.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.set_traits">
<span class="sig-name descname"><span class="pre">set_traits</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="#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.set_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.set_traits" title="Link to this definition"></a></dt>
<dd><p>Set traits from self object in a <a class="reference internal" href="#searx.enginelib.Engine" title="searx.enginelib.Engine"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Engine</span></code></a> namespace.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>engine</strong> engine instance build by <a class="reference internal" href="engines.html#searx.engines.load_engine" title="searx.engines.load_engine"><code class="xref py py-func docutils literal notranslate"><span class="pre">searx.engines.load_engine()</span></code></a></p>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.all_locale">
<span class="sig-name descname"><span class="pre">all_locale</span></span><em 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.12)"><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.12)"><span class="pre">None</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.all_locale" title="Link to this definition"></a></dt>
<dd><p>To which locale value SearXNGs <code class="docutils literal notranslate"><span class="pre">all</span></code> language is mapped (shown a “Default
language”).</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.custom">
<span class="sig-name descname"><span class="pre">custom</span></span><em 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.Dict" title="(in Python v3.12)"><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.12)"><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.Dict" title="(in Python v3.12)"><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.12)"><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.Dict" title="(in Python v3.12)"><span class="pre">Dict</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/typing.html#typing.Iterable" title="(in Python v3.12)"><span class="pre">Iterable</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.12)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.custom" title="Link to this definition"></a></dt>
<dd><p>A place to store engines custom traits, not related to the SearXNG core.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.data_type">
<span class="sig-name descname"><span class="pre">data_type</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">typing_extensions.Literal</span><span class="p"><span class="pre">[</span></span><span class="pre">traits_v1</span><span class="p"><span class="pre">]</span></span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'traits_v1'</span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.data_type" title="Link to this definition"></a></dt>
<dd><p>Data type, default is traits_v1.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.languages">
<span class="sig-name descname"><span class="pre">languages</span></span><em 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.Dict" title="(in Python v3.12)"><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.12)"><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.12)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.languages" title="Link to this definition"></a></dt>
<dd><p>Maps SearXNGs internal representation of a language to the one of the engine.</p>
<p>SearXNGs internal representation can be parsed by babel and the value is
send to the engine:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">languages</span> <span class="o">=</span> <span class="p">{</span>
<span class="s1">&#39;ca&#39;</span> <span class="p">:</span> <span class="o">&lt;</span><span class="n">engine</span><span class="s1">&#39;s language name&gt;,</span>
<span class="p">}</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">egnine_lang</span> <span class="ow">in</span> <span class="n">languages</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">searxng_lang</span> <span class="o">=</span> <span class="n">babel</span><span class="o">.</span><span class="n">Locale</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
<span class="o">...</span>
</pre></div>
</div>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.regions">
<span class="sig-name descname"><span class="pre">regions</span></span><em 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.Dict" title="(in Python v3.12)"><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.12)"><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.12)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.regions" title="Link to this definition"></a></dt>
<dd><p>Maps SearXNGs internal representation of a region to the one of the engine.</p>
<p>SearXNGs internal representation can be parsed by babel and the value is
send to the engine:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">regions</span> <span class="o">=</span><span class="p">{</span>
<span class="s1">&#39;fr-BE&#39;</span> <span class="p">:</span> <span class="o">&lt;</span><span class="n">engine</span><span class="s1">&#39;s region name&gt;,</span>
<span class="p">}</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">egnine_region</span> <span class="n">regions</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">searxng_region</span> <span class="o">=</span> <span class="n">babel</span><span class="o">.</span><span class="n">Locale</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s1">&#39;-&#39;</span><span class="p">)</span>
<span class="o">...</span>
</pre></div>
</div>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsEncoder">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searx.enginelib.traits.</span></span><span class="sig-name descname"><span class="pre">EngineTraitsEncoder</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">skipkeys</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ensure_ascii</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">check_circular</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allow_nan</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sort_keys</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">indent</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">separators</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsEncoder"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsEncoder" title="Link to this definition"></a></dt>
<dd><p>Encodes <a class="reference internal" href="#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-class docutils literal notranslate"><span class="pre">EngineTraits</span></code></a> to a serializable object, see
<a class="reference external" href="https://docs.python.org/3/library/json.html#json.JSONEncoder" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">json.JSONEncoder</span></code></a>.</p>
<dl class="py method">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsEncoder.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">o</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsEncoder.default"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsEncoder.default" title="Link to this definition"></a></dt>
<dd><p>Return dictionary of a <a class="reference internal" href="#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-class docutils literal notranslate"><span class="pre">EngineTraits</span></code></a> object.</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsMap">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searx.enginelib.traits.</span></span><span class="sig-name descname"><span class="pre">EngineTraitsMap</span></span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsMap"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsMap" title="Link to this definition"></a></dt>
<dd><p>A python dictionary to map <a class="reference internal" href="#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-class docutils literal notranslate"><span class="pre">EngineTraits</span></code></a> by engine name.</p>
<dl class="py method">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsMap.from_data">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_data</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsMap.from_data"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsMap.from_data" title="Link to this definition"></a></dt>
<dd><p>Instantiate <a class="reference internal" href="#searx.enginelib.traits.EngineTraitsMap" title="searx.enginelib.traits.EngineTraitsMap"><code class="xref py py-class docutils literal notranslate"><span class="pre">EngineTraitsMap</span></code></a> object from <code class="xref py py-obj docutils literal notranslate"><span class="pre">ENGINE_TRAITS</span></code></p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsMap.save_data">
<span class="sig-name descname"><span class="pre">save_data</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsMap.save_data"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsMap.save_data" title="Link to this definition"></a></dt>
<dd><p>Store EngineTraitsMap in in file <code class="xref py py-obj docutils literal notranslate"><span class="pre">self.ENGINE_TRAITS_FILE</span></code></p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsMap.set_traits">
<span class="sig-name descname"><span class="pre">set_traits</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="#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.12)"><span class="pre">types.ModuleType</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsMap.set_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsMap.set_traits" title="Link to this definition"></a></dt>
<dd><p>Set traits in a <code class="xref py py-obj docutils literal notranslate"><span class="pre">Engine</span></code> namespace.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>engine</strong> engine instance build by <a class="reference internal" href="engines.html#searx.engines.load_engine" title="searx.engines.load_engine"><code class="xref py py-func docutils literal notranslate"><span class="pre">searx.engines.load_engine()</span></code></a></p>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsMap.ENGINE_TRAITS_FILE">
<span class="sig-name descname"><span class="pre">ENGINE_TRAITS_FILE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">PosixPath('/home/runner/work/searxng/searxng/searx/data/engine_traits.json')</span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsMap.ENGINE_TRAITS_FILE" title="Link to this definition"></a></dt>
<dd><p>File with persistence of the <a class="reference internal" href="#searx.enginelib.traits.EngineTraitsMap" title="searx.enginelib.traits.EngineTraitsMap"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraitsMap</span></code></a>.</p>
</dd></dl>
</dd></dl>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#">Engine Library</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#searx.enginelib.Engine"><code class="docutils literal notranslate"><span class="pre">Engine</span></code></a><ul>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.about"><code class="docutils literal notranslate"><span class="pre">Engine.about</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.categories"><code class="docutils literal notranslate"><span class="pre">Engine.categories</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.disabled"><code class="docutils literal notranslate"><span class="pre">Engine.disabled</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.display_error_messages"><code class="docutils literal notranslate"><span class="pre">Engine.display_error_messages</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.enable_http"><code class="docutils literal notranslate"><span class="pre">Engine.enable_http</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.engine"><code class="docutils literal notranslate"><span class="pre">Engine.engine</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.engine_type"><code class="docutils literal notranslate"><span class="pre">Engine.engine_type</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.fetch_traits"><code class="docutils literal notranslate"><span class="pre">Engine.fetch_traits</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.inactive"><code class="docutils literal notranslate"><span class="pre">Engine.inactive</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.language"><code class="docutils literal notranslate"><span class="pre">Engine.language</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.language_support"><code class="docutils literal notranslate"><span class="pre">Engine.language_support</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.name"><code class="docutils literal notranslate"><span class="pre">Engine.name</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.paging"><code class="docutils literal notranslate"><span class="pre">Engine.paging</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.proxies"><code class="docutils literal notranslate"><span class="pre">Engine.proxies</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.region"><code class="docutils literal notranslate"><span class="pre">Engine.region</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.safesearch"><code class="docutils literal notranslate"><span class="pre">Engine.safesearch</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.send_accept_language_header"><code class="docutils literal notranslate"><span class="pre">Engine.send_accept_language_header</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.shortcut"><code class="docutils literal notranslate"><span class="pre">Engine.shortcut</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.time_range_support"><code class="docutils literal notranslate"><span class="pre">Engine.time_range_support</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.timeout"><code class="docutils literal notranslate"><span class="pre">Engine.timeout</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.tokens"><code class="docutils literal notranslate"><span class="pre">Engine.tokens</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.traits"><code class="docutils literal notranslate"><span class="pre">Engine.traits</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.using_tor_proxy"><code class="docutils literal notranslate"><span class="pre">Engine.using_tor_proxy</span></code></a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#module-searx.enginelib.traits">Engine traits</a><ul>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.traits.EngineTraits"><code class="docutils literal notranslate"><span class="pre">EngineTraits</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.traits.EngineTraitsEncoder"><code class="docutils literal notranslate"><span class="pre">EngineTraitsEncoder</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.traits.EngineTraitsMap"><code class="docutils literal notranslate"><span class="pre">EngineTraitsMap</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3"><a class="reference internal" href="index.html#engine-types">Engine Types</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../index.html">Overview</a>
<ul>
<li><a href="../index.html">Developer documentation</a>
<ul>
<li><a href="index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="index.html" title="previous chapter">Engine Implementations</a>
<li>Next: <a href="engines.html" title="next chapter">SearXNGs engines loader</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/dev/engines/enginelib.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

218
dev/engines/engines.html Normal file
View file

@ -0,0 +1,218 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SearXNGs engines loader &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script src="../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Engine Overview" href="engine_overview.html" />
<link rel="prev" title="Engine Library" href="enginelib.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="engine_overview.html" title="Engine Overview"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="enginelib.html" title="Engine Library"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">SearXNGs engines loader</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="module-searx.engines">
<span id="searxng-s-engines-loader"></span><span id="searx-engines-loader"></span><h1>SearXNGs engines loader<a class="headerlink" href="#module-searx.engines" title="Link to this heading"></a></h1>
<p>Load and initialize the <code class="docutils literal notranslate"><span class="pre">engines</span></code>, see <a class="reference internal" href="#searx.engines.load_engines" title="searx.engines.load_engines"><code class="xref py py-func docutils literal notranslate"><span class="pre">load_engines()</span></code></a> and register
<a class="reference internal" href="#searx.engines.engine_shortcuts" title="searx.engines.engine_shortcuts"><code class="xref py py-obj docutils literal notranslate"><span class="pre">engine_shortcuts</span></code></a>.</p>
<p>usage:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">load_engines</span><span class="p">(</span> <span class="n">settings</span><span class="p">[</span><span class="s1">&#39;engines&#39;</span><span class="p">]</span> <span class="p">)</span>
</pre></div>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.is_missing_required_attributes">
<span class="sig-prename descclassname"><span class="pre">searx.engines.</span></span><span class="sig-name descname"><span class="pre">is_missing_required_attributes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/engines.html#is_missing_required_attributes"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.is_missing_required_attributes" title="Link to this definition"></a></dt>
<dd><p>An attribute is required when its name doesnt start with <code class="docutils literal notranslate"><span class="pre">_</span></code> (underline).
Required attributes must not be <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.load_engine">
<span class="sig-prename descclassname"><span class="pre">searx.engines.</span></span><span class="sig-name descname"><span class="pre">load_engine</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_data</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.12)"><span class="pre">dict</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="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.12)"><span class="pre">types.ModuleType</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.12)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../_modules/searx/engines.html#load_engine"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.load_engine" title="Link to this definition"></a></dt>
<dd><p>Load engine from <code class="docutils literal notranslate"><span class="pre">engine_data</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>engine_data</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.12)"><em>dict</em></a>) Attributes from YAML <code class="docutils literal notranslate"><span class="pre">settings:engines/&lt;engine&gt;</span></code></p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>initialized namespace of the <code class="docutils literal notranslate"><span class="pre">&lt;engine&gt;</span></code>.</p>
</dd>
</dl>
<ol class="arabic simple">
<li><p>create a namespace and load module of the <code class="docutils literal notranslate"><span class="pre">&lt;engine&gt;</span></code></p></li>
<li><p>update namespace with the defaults from <code class="xref py py-obj docutils literal notranslate"><span class="pre">ENGINE_DEFAULT_ARGS</span></code></p></li>
<li><p>update namespace with values from <code class="docutils literal notranslate"><span class="pre">engine_data</span></code></p></li>
</ol>
<p>If engine <em>is active</em>, return namespace of the engine, otherwise return
<code class="docutils literal notranslate"><span class="pre">None</span></code>.</p>
<p>This function also returns <code class="docutils literal notranslate"><span class="pre">None</span></code> if initialization of the namespace fails
for one of the following reasons:</p>
<ul class="simple">
<li><p>engine name contains underscore</p></li>
<li><p>engine name is not lowercase</p></li>
<li><p>required attribute is not set <a class="reference internal" href="#searx.engines.is_missing_required_attributes" title="searx.engines.is_missing_required_attributes"><code class="xref py py-func docutils literal notranslate"><span class="pre">is_missing_required_attributes()</span></code></a></p></li>
</ul>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.load_engines">
<span class="sig-prename descclassname"><span class="pre">searx.engines.</span></span><span class="sig-name descname"><span class="pre">load_engines</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_list</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/engines.html#load_engines"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.load_engines" title="Link to this definition"></a></dt>
<dd><p>usage: <code class="docutils literal notranslate"><span class="pre">engine_list</span> <span class="pre">=</span> <span class="pre">settings['engines']</span></code></p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.using_tor_proxy">
<span class="sig-prename descclassname"><span class="pre">searx.engines.</span></span><span class="sig-name descname"><span class="pre">using_tor_proxy</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="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.12)"><span class="pre">types.ModuleType</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/engines.html#using_tor_proxy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.using_tor_proxy" title="Link to this definition"></a></dt>
<dd><p>Return True if the engine configuration declares to use Tor.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.engine_shortcuts">
<span class="sig-prename descclassname"><span class="pre">searx.engines.</span></span><span class="sig-name descname"><span class="pre">engine_shortcuts</span></span><a class="headerlink" href="#searx.engines.engine_shortcuts" title="Link to this definition"></a></dt>
<dd><p>Simple map of registered <em>shortcuts</em> to name of the engine (or <code class="docutils literal notranslate"><span class="pre">None</span></code>).</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">engine_shortcuts</span><span class="p">[</span><span class="n">engine</span><span class="o">.</span><span class="n">shortcut</span><span class="p">]</span> <span class="o">=</span> <span class="n">engine</span><span class="o">.</span><span class="n">name</span>
</pre></div>
</div>
<dl class="field-list simple">
</dl>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">SearXNGs engines loader</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#searx.engines.is_missing_required_attributes"><code class="docutils literal notranslate"><span class="pre">is_missing_required_attributes()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#searx.engines.load_engine"><code class="docutils literal notranslate"><span class="pre">load_engine()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#searx.engines.load_engines"><code class="docutils literal notranslate"><span class="pre">load_engines()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#searx.engines.using_tor_proxy"><code class="docutils literal notranslate"><span class="pre">using_tor_proxy()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#searx.engines.engine_shortcuts"><code class="docutils literal notranslate"><span class="pre">engine_shortcuts</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3"><a class="reference internal" href="index.html#engine-types">Engine Types</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../index.html">Overview</a>
<ul>
<li><a href="../index.html">Developer documentation</a>
<ul>
<li><a href="index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="enginelib.html" title="previous chapter">Engine Library</a>
<li>Next: <a href="engine_overview.html" title="next chapter">Engine Overview</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/dev/engines/engines.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

344
dev/engines/index.html Normal file
View file

@ -0,0 +1,344 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Engine Implementations &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script src="../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Engine Library" href="enginelib.html" />
<link rel="prev" title="How to contribute" href="../contribution_guide.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="enginelib.html" title="Engine Library"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../contribution_guide.html" title="How to contribute"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Engine Implementations</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="engine-implementations">
<span id="id1"></span><h1>Engine Implementations<a class="headerlink" href="#engine-implementations" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#engine-types" id="id7">Engine Types</a></p>
<ul>
<li><p><a class="reference internal" href="#online-engines" id="id8">Online Engines</a></p></li>
<li><p><a class="reference internal" href="#offline-engines" id="id9">Offline Engines</a></p></li>
<li><p><a class="reference internal" href="#online-url-search" id="id10">Online URL Search</a></p></li>
<li><p><a class="reference internal" href="#online-currency" id="id11">Online Currency</a></p></li>
<li><p><a class="reference internal" href="#online-dictionary" id="id12">Online Dictionary</a></p></li>
</ul>
</li>
</ul>
</nav>
<div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">Framework Components</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="enginelib.html">Engine Library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="enginelib.html#searx.enginelib.Engine"><code class="docutils literal notranslate"><span class="pre">Engine</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="enginelib.html#module-searx.enginelib.traits">Engine traits</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="engines.html">SearXNGs engines loader</a><ul>
<li class="toctree-l2"><a class="reference internal" href="engines.html#searx.engines.is_missing_required_attributes"><code class="docutils literal notranslate"><span class="pre">is_missing_required_attributes()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="engines.html#searx.engines.load_engine"><code class="docutils literal notranslate"><span class="pre">load_engine()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="engines.html#searx.engines.load_engines"><code class="docutils literal notranslate"><span class="pre">load_engines()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="engines.html#searx.engines.using_tor_proxy"><code class="docutils literal notranslate"><span class="pre">using_tor_proxy()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="engines.html#searx.engines.engine_shortcuts"><code class="docutils literal notranslate"><span class="pre">engine_shortcuts</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="engine_overview.html">Engine Overview</a><ul>
<li class="toctree-l2"><a class="reference internal" href="engine_overview.html#general-engine-configuration">General Engine Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="engine_overview.html#making-a-request">Making a Request</a></li>
<li class="toctree-l2"><a class="reference internal" href="engine_overview.html#result-types-template">Result Types (<code class="docutils literal notranslate"><span class="pre">template</span></code>)</a></li>
</ul>
</li>
</ul>
</div>
<section id="engine-types">
<h2><a class="toc-backref" href="#id7" role="doc-backlink">Engine Types</a><a class="headerlink" href="#engine-types" title="Link to this heading"></a></h2>
<p>The <a class="reference internal" href="enginelib.html#searx.enginelib.Engine.engine_type" title="searx.enginelib.Engine.engine_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">engine_type</span></code></a> of an engine
determines which <a class="reference internal" href="../../src/searx.search.processors.html#searx-search-processors"><span class="std std-ref">search processor</span></a> is used by
the engine.</p>
<p>In this section a list of the engines that are documented is given, a complete
list of the engines can be found in the source under: <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines">git://searx/engines</a>.</p>
<section id="online-engines">
<span id="id2"></span><h3><a class="toc-backref" href="#id8" role="doc-backlink">Online Engines</a><a class="headerlink" href="#online-engines" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.online" title="searx.search.processors.online"><code class="xref py py-obj docutils literal notranslate"><span class="pre">processors.online</span></code></a></p></li>
</ul>
</aside>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l1"><a class="reference internal" href="xpath.html">XPath Engine</a></li>
<li class="toctree-l1"><a class="reference internal" href="mediawiki.html">MediaWiki Engine</a></li>
</ul>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="online/annas_archive.html">Annas Archive</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/archlinux.html">Arch Linux</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/bing.html">Bing Engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/bpb.html">Bpb</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/brave.html">Brave Engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/bt4g.html">BT4G</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/dailymotion.html">Dailymotion</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/google.html">Google Engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/lemmy.html">Lemmy</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/loc.html">Library of Congress</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/mastodon.html">Mastodon</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/moviepilot.html">Moviepilot</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/odysee.html">Odysee</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/peertube.html">Peertube Engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/piped.html">Piped</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/qwant.html">Qwant</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/recoll.html">Recoll Engine</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/seekr.html">Seekr Engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/startpage.html">Startpage Engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/wallhaven.html">Wallhaven</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/wikipedia.html">Wikimedia</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/yacy.html">Yacy</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l1"><a class="reference internal" href="online/zlibrary.html">Z-Library</a></li>
</ul>
</div>
</section>
<section id="offline-engines">
<span id="id3"></span><h3><a class="toc-backref" href="#id9" role="doc-backlink">Offline Engines</a><a class="headerlink" href="#offline-engines" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.offline" title="searx.search.processors.offline"><code class="xref py py-obj docutils literal notranslate"><span class="pre">processors.offline</span></code></a></p></li>
</ul>
</aside>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="offline_concept.html">Offline Concept</a></li>
<li class="toctree-l1"><a class="reference internal" href="demo/demo_offline.html">Demo Offline Engine</a></li>
<li class="toctree-l1"><a class="reference internal" href="offline/command-line-engines.html">Command Line Engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="offline/nosql-engines.html">NoSQL databases</a></li>
<li class="toctree-l1"><a class="reference internal" href="offline/search-indexer-engines.html">Local Search APIs</a></li>
<li class="toctree-l1"><a class="reference internal" href="offline/sql-engines.html">SQL Engines</a></li>
</ul>
</div>
</section>
<section id="online-url-search">
<span id="id4"></span><h3><a class="toc-backref" href="#id10" role="doc-backlink">Online URL Search</a><a class="headerlink" href="#online-url-search" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.online_url_search" title="searx.search.processors.online_url_search"><code class="xref py py-obj docutils literal notranslate"><span class="pre">processors.online_url_search</span></code></a></p></li>
</ul>
</aside>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="online_url_search/tineye.html">Tineye</a></li>
</ul>
</div>
</section>
<section id="online-currency">
<span id="id5"></span><h3><a class="toc-backref" href="#id11" role="doc-backlink">Online Currency</a><a class="headerlink" href="#online-currency" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.online_currency" title="searx.search.processors.online_currency"><code class="xref py py-obj docutils literal notranslate"><span class="pre">processors.online_currency</span></code></a></p></li>
</ul>
</aside>
<p><em>no engine of this type is documented yet / comming soon</em></p>
</section>
<section id="online-dictionary">
<span id="id6"></span><h3><a class="toc-backref" href="#id12" role="doc-backlink">Online Dictionary</a><a class="headerlink" href="#online-dictionary" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.online_dictionary" title="searx.search.processors.online_dictionary"><code class="xref py py-obj docutils literal notranslate"><span class="pre">processors.online_dictionary</span></code></a></p></li>
</ul>
</aside>
<p><em>no engine of this type is documented yet / comming soon</em></p>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Engine Implementations</a><ul>
<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3"><a class="reference internal" href="#engine-types">Engine Types</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#online-engines">Online Engines</a><ul>
<li class="toctree-l5"><a class="reference internal" href="demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#offline-engines">Offline Engines</a><ul>
<li class="toctree-l5"><a class="reference internal" href="offline_concept.html">Offline Concept</a></li>
<li class="toctree-l5"><a class="reference internal" href="demo/demo_offline.html">Demo Offline Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="offline/command-line-engines.html">Command Line Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="offline/nosql-engines.html">NoSQL databases</a></li>
<li class="toctree-l5"><a class="reference internal" href="offline/search-indexer-engines.html">Local Search APIs</a></li>
<li class="toctree-l5"><a class="reference internal" href="offline/sql-engines.html">SQL Engines</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#online-url-search">Online URL Search</a><ul>
<li class="toctree-l5"><a class="reference internal" href="online_url_search/tineye.html">Tineye</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../index.html">Overview</a>
<ul>
<li><a href="../index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="../contribution_guide.html" title="previous chapter">How to contribute</a>
<li>Next: <a href="enginelib.html" title="next chapter">Engine Library</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/dev/engines/index.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

272
dev/engines/mediawiki.html Normal file
View file

@ -0,0 +1,272 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MediaWiki Engine &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script src="../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Annas Archive" href="online/annas_archive.html" />
<link rel="prev" title="XPath Engine" href="xpath.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="online/annas_archive.html" title="Annas Archive"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="xpath.html" title="XPath Engine"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">MediaWiki Engine</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="mediawiki-engine">
<span id="id1"></span><h1>MediaWiki Engine<a class="headerlink" href="#mediawiki-engine" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.mediawiki">The MediaWiki engine is a <em>generic</em> engine to <strong>query</strong> Wikimedia wikis by
the <a class="reference external" href="https://www.mediawiki.org/wiki/API:Main_page">MediaWiki Action API</a>. For a <a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&amp;modules=query">query action</a> all Wikimedia wikis have
endpoints that follow this pattern:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>https://{base_url}/w/api.php?action=query&amp;list=search&amp;format=json
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>In its actual state, this engine is implemented to parse JSON result
(<a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&amp;modules=json">format=json</a>) from a search query (<a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&amp;modules=query%2Bsearch">list=search</a>). If you need other
<code class="docutils literal notranslate"><span class="pre">action</span></code> and <code class="docutils literal notranslate"><span class="pre">list</span></code> types ask SearXNG developers to extend the
implementation according to your needs.</p>
</div>
<section id="configuration">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>Request:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.mediawiki.base_url" title="searx.engines.mediawiki.base_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.mediawiki.search_type" title="searx.engines.mediawiki.search_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_type</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.mediawiki.srenablerewrites" title="searx.engines.mediawiki.srenablerewrites"><code class="xref py py-obj docutils literal notranslate"><span class="pre">srenablerewrites</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.mediawiki.srsort" title="searx.engines.mediawiki.srsort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">srsort</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.mediawiki.srprop" title="searx.engines.mediawiki.srprop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">srprop</span></code></a></p></li>
</ul>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.mediawiki.base_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://{language}.wikipedia.org/'</span></em><a class="headerlink" href="#searx.engines.mediawiki.base_url" title="Link to this definition"></a></dt>
<dd><p>Base URL of the Wikimedia wiki.</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">{language}</span></code>:</dt><dd><p>ISO 639-1 language code (en, de, fr ..) of the search language.</p>
</dd>
</dl>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.mediawiki.search_type">
<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">search_type</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'nearmatch'</span></em><a class="headerlink" href="#searx.engines.mediawiki.search_type" title="Link to this definition"></a></dt>
<dd><p>Which type of search to perform. One of the following values: <code class="docutils literal notranslate"><span class="pre">nearmatch</span></code>,
<code class="docutils literal notranslate"><span class="pre">text</span></code> or <code class="docutils literal notranslate"><span class="pre">title</span></code>.</p>
<p>See <code class="docutils literal notranslate"><span class="pre">srwhat</span></code> argument in <a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&amp;modules=query%2Bsearch">list=search</a> documentation.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.mediawiki.srenablerewrites">
<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">srenablerewrites</span></span><em 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#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.mediawiki.srenablerewrites" title="Link to this definition"></a></dt>
<dd><p>Enable internal query rewriting (Type: boolean). Some search backends can
rewrite the query into another which is thought to provide better results, for
instance by correcting spelling errors.</p>
<p>See <code class="docutils literal notranslate"><span class="pre">srenablerewrites</span></code> argument in <a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&amp;modules=query%2Bsearch">list=search</a> documentation.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.mediawiki.srprop">
<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">srprop</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'sectiontitle|snippet|timestamp|categorysnippet'</span></em><a class="headerlink" href="#searx.engines.mediawiki.srprop" title="Link to this definition"></a></dt>
<dd><p>Which properties to return.</p>
<p>See <code class="docutils literal notranslate"><span class="pre">srprop</span></code> argument in <a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&amp;modules=query%2Bsearch">list=search</a> documentation.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.mediawiki.srsort">
<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">srsort</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'relevance'</span></em><a class="headerlink" href="#searx.engines.mediawiki.srsort" title="Link to this definition"></a></dt>
<dd><p>Set the sort order of returned results. One of the following values:
<code class="docutils literal notranslate"><span class="pre">create_timestamp_asc</span></code>, <code class="docutils literal notranslate"><span class="pre">create_timestamp_desc</span></code>, <code class="docutils literal notranslate"><span class="pre">incoming_links_asc</span></code>,
<code class="docutils literal notranslate"><span class="pre">incoming_links_desc</span></code>, <code class="docutils literal notranslate"><span class="pre">just_match</span></code>, <code class="docutils literal notranslate"><span class="pre">last_edit_asc</span></code>, <code class="docutils literal notranslate"><span class="pre">last_edit_desc</span></code>,
<code class="docutils literal notranslate"><span class="pre">none</span></code>, <code class="docutils literal notranslate"><span class="pre">random</span></code>, <code class="docutils literal notranslate"><span class="pre">relevance</span></code>, <code class="docutils literal notranslate"><span class="pre">user_random</span></code>.</p>
<p>See <code class="docutils literal notranslate"><span class="pre">srenablerewrites</span></code> argument in <a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&amp;modules=query%2Bsearch">list=search</a> documentation.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.mediawiki.timestamp_format">
<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">timestamp_format</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'%Y-%m-%dT%H:%M:%SZ'</span></em><a class="headerlink" href="#searx.engines.mediawiki.timestamp_format" title="Link to this definition"></a></dt>
<dd><p>The longhand version of MediaWiki time strings.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="xpath.html">XPath Engine</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../index.html">Overview</a>
<ul>
<li><a href="../index.html">Developer documentation</a>
<ul>
<li><a href="index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="xpath.html" title="previous chapter">XPath Engine</a>
<li>Next: <a href="online/annas_archive.html" title="next chapter">Annas Archive</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/dev/engines/mediawiki.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,252 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Command Line Engines &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="NoSQL databases" href="nosql-engines.html" />
<link rel="prev" title="Demo Offline Engine" href="../demo/demo_offline.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="nosql-engines.html" title="NoSQL databases"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../demo/demo_offline.html" title="Demo Offline Engine"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Command Line Engines</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="command-line-engines">
<span id="engine-command"></span><h1>Command Line Engines<a class="headerlink" href="#command-line-engines" title="Link to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/command.py">command.py</a></p></li>
<li><p><a class="reference internal" href="../index.html#offline-engines"><span class="std std-ref">Offline Engines</span></a></p></li>
</ul>
</aside>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li>
<li><p><a class="reference internal" href="#example" id="id2">Example</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li>
</ul>
</nav>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<p>Initial sponsored by <a class="reference external" href="https://nlnet.nl/discovery">Search and Discovery Fund</a> of <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
</aside>
<p id="module-searx.engines.command">With <em>command engines</em> administrators can run engines to integrate arbitrary
shell commands.</p>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>When creating and enabling a <code class="docutils literal notranslate"><span class="pre">command</span></code> engine on a public instance, you
must be careful to avoid leaking private data.</p>
</div>
<p>The easiest solution is to limit the access by setting <code class="docutils literal notranslate"><span class="pre">tokens</span></code> as described
in section <a class="reference internal" href="../../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>. The engine base is flexible. Only your
imagination can limit the power of this engine (and maybe security concerns).</p>
<section id="configuration">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The following options are available:</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">command</span></code>:</dt><dd><p>A comma separated list of the elements of the command. A special token
<code class="docutils literal notranslate"><span class="pre">{{QUERY}}</span></code> tells where to put the search terms of the user. Example:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">[</span><span class="s">&#39;ls&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;-l&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;-h&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;{{QUERY}}&#39;</span><span class="p p-Indicator">]</span>
</pre></div>
</div>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">delimiter</span></code>:</dt><dd><p>A mapping containing a delimiter <code class="docutils literal notranslate"><span class="pre">char</span></code> and the <em>titles</em> of each element in
<code class="docutils literal notranslate"><span class="pre">keys</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">parse_regex</span></code>:</dt><dd><p>A dict containing the regular expressions for each result key.</p>
</dd>
</dl>
<p><code class="docutils literal notranslate"><span class="pre">query_type</span></code>:</p>
<blockquote>
<div><p>The expected type of user search terms. Possible values: <code class="docutils literal notranslate"><span class="pre">path</span></code> and
<code class="docutils literal notranslate"><span class="pre">enum</span></code>.</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">path</span></code>:</dt><dd><p>Checks if the user provided path is inside the working directory. If not,
the query is not executed.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">enum</span></code>:</dt><dd><p>Is a list of allowed search terms. If the user submits something which is
not included in the list, the query returns an error.</p>
</dd>
</dl>
</div></blockquote>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">query_enum</span></code>:</dt><dd><p>A list containing allowed search terms if <code class="docutils literal notranslate"><span class="pre">query_type</span></code> is set to <code class="docutils literal notranslate"><span class="pre">enum</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">working_dir</span></code>:</dt><dd><p>The directory where the command has to be executed. Default: <code class="docutils literal notranslate"><span class="pre">./</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">result_separator</span></code>:</dt><dd><p>The character that separates results. Default: <code class="docutils literal notranslate"><span class="pre">\n</span></code>.</p>
</dd>
</dl>
</section>
<section id="example">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Example</a><a class="headerlink" href="#example" title="Link to this heading"></a></h2>
<p>The example engine below can be used to find files with a specific name in the
configured working directory:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">find</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">command</span>
<span class="w"> </span><span class="nt">command</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">&#39;find&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;.&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;-name&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;{{QUERY}}&#39;</span><span class="p p-Indicator">]</span>
<span class="w"> </span><span class="nt">query_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">path</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fnd</span>
<span class="w"> </span><span class="nt">delimiter</span><span class="p">:</span>
<span class="w"> </span><span class="nt">chars</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;</span><span class="nv"> </span><span class="s">&#39;</span>
<span class="w"> </span><span class="nt">keys</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">&#39;line&#39;</span><span class="p p-Indicator">]</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.command.check_parsing_options">
<span class="sig-prename descclassname"><span class="pre">searx.engines.command.</span></span><span class="sig-name descname"><span class="pre">check_parsing_options</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_settings</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/command.html#check_parsing_options"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.command.check_parsing_options" title="Link to this definition"></a></dt>
<dd><p>Checks if delimiter based parsing or regex parsing is configured correctly</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../offline_concept.html">Offline Concept</a></li>
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_offline.html">Demo Offline Engine</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Command Line Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="nosql-engines.html">NoSQL databases</a></li>
<li class="toctree-l5"><a class="reference internal" href="search-indexer-engines.html">Local Search APIs</a></li>
<li class="toctree-l5"><a class="reference internal" href="sql-engines.html">SQL Engines</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="../demo/demo_offline.html" title="previous chapter">Demo Offline Engine</a>
<li>Next: <a href="nosql-engines.html" title="next chapter">NoSQL databases</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/offline/command-line-engines.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,303 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>NoSQL databases &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Local Search APIs" href="search-indexer-engines.html" />
<link rel="prev" title="Command Line Engines" href="command-line-engines.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="search-indexer-engines.html" title="Local Search APIs"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="command-line-engines.html" title="Command Line Engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">NoSQL databases</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="nosql-databases">
<span id="nosql-engines"></span><h1>NoSQL databases<a class="headerlink" href="#nosql-databases" title="Link to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference external" href="https://en.wikipedia.org/wiki/NoSQL">NoSQL databases</a></p></li>
<li><p><a class="reference external" href="https://redis.io/">redis.io</a></p></li>
<li><p><a class="reference external" href="https://www.mongodb.com">MongoDB</a></p></li>
</ul>
</aside>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#extra-dependencies" id="id6">Extra Dependencies</a></p></li>
<li><p><a class="reference internal" href="#configure-the-engines" id="id7">Configure the engines</a></p>
<ul>
<li><p><a class="reference internal" href="#redis-server" id="id8">Redis Server</a></p></li>
<li><p><a class="reference internal" href="#engine-mongodb" id="id9">MongoDB</a></p></li>
</ul>
</li>
</ul>
</nav>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<p>Initial sponsored by <a class="reference external" href="https://nlnet.nl/discovery">Search and Discovery Fund</a> of <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
</aside>
<p>The following <a class="reference external" href="https://en.wikipedia.org/wiki/NoSQL">NoSQL databases</a> are supported:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#engine-redis-server"><span class="std std-ref">Redis Server</span></a></p></li>
<li><p><a class="reference internal" href="#engine-mongodb"><span class="std std-ref">MongoDB</span></a></p></li>
</ul>
<p>All of the engines above are just commented out in the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">settings.yml</a>, as you have to set various options and install
dependencies before using them.</p>
<p>By default, the engines use the <code class="docutils literal notranslate"><span class="pre">key-value</span></code> template for displaying results /
see <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/key-value.html">simple</a>
theme. If you are not satisfied with the original result layout, you can use
your own template, set <code class="docutils literal notranslate"><span class="pre">result_template</span></code> attribute to <code class="docutils literal notranslate"><span class="pre">{template_name}</span></code> and
place the templates at:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">searx</span><span class="o">/</span><span class="n">templates</span><span class="o">/</span><span class="p">{</span><span class="n">theme_name</span><span class="p">}</span><span class="o">/</span><span class="n">result_templates</span><span class="o">/</span><span class="p">{</span><span class="n">template_name</span><span class="p">}</span>
</pre></div>
</div>
<p>Furthermore, if you do not wish to expose these engines on a public instance, you
can still add them and limit the access by setting <code class="docutils literal notranslate"><span class="pre">tokens</span></code> as described in
section <a class="reference internal" href="../../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>.</p>
<section id="extra-dependencies">
<h2><a class="toc-backref" href="#id6" role="doc-backlink">Extra Dependencies</a><a class="headerlink" href="#extra-dependencies" title="Link to this heading"></a></h2>
<p>For using <a class="reference internal" href="#engine-redis-server"><span class="std std-ref">Redis Server</span></a> or <a class="reference internal" href="#engine-mongodb"><span class="std std-ref">MongoDB</span></a> you need to
install additional packages in Pythons Virtual Environment of your SearXNG
instance. To switch into the environment (<a class="reference internal" href="../../../admin/installation-searxng.html#searxng-src"><span class="std std-ref">Install SearXNG &amp; dependencies</span></a>) you can use
<a class="reference internal" href="../../../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo utils/searxng.sh instance cmd bash
(searxng-pyenv)$ pip install ...
</pre></div>
</div>
</section>
<section id="configure-the-engines">
<h2><a class="toc-backref" href="#id7" role="doc-backlink">Configure the engines</a><a class="headerlink" href="#configure-the-engines" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/NoSQL">NoSQL databases</a> are used for storing arbitrary data without first defining
their structure.</p>
<section id="redis-server">
<span id="engine-redis-server"></span><h3><a class="toc-backref" href="#id8" role="doc-backlink">Redis Server</a><a class="headerlink" href="#redis-server" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> <a class="reference external" href="https://github.com/andymccurdy/redis-py#installation">redis</a></p></li>
<li><p><a class="reference external" href="https://redis.io/">redis.io</a></p></li>
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/redis_server.py">redis_server.py</a></p></li>
</ul>
</aside>
<p id="module-searx.engines.redis_server">Redis is an open source (BSD licensed), in-memory data structure (key value
based) store. Before configuring the <code class="docutils literal notranslate"><span class="pre">redis_server</span></code> engine, you must install
the dependency <a class="reference external" href="https://github.com/andymccurdy/redis-py#installation">redis</a>.</p>
<section id="configuration">
<h4>Configuration<a class="headerlink" href="#configuration" title="Link to this heading"></a></h4>
<p>Select a database to search in and set its index in the option <code class="docutils literal notranslate"><span class="pre">db</span></code>. You can
either look for exact matches or use partial keywords to find what you are
looking for by configuring <code class="docutils literal notranslate"><span class="pre">exact_match_only</span></code>.</p>
</section>
<section id="example">
<h4>Example<a class="headerlink" href="#example" title="Link to this heading"></a></h4>
<p>Below is an example configuration:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># Required dependency: redis</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">myredis</span>
<span class="w"> </span><span class="nt">shortcut </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">rds</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">redis_server</span>
<span class="w"> </span><span class="nt">exact_match_only</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;127.0.0.1&#39;</span>
<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">6379</span>
<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;&#39;</span>
<span class="w"> </span><span class="nt">db</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h4>Implementations<a class="headerlink" href="#implementations" title="Link to this heading"></a></h4>
</section>
</section>
<section id="engine-mongodb">
<span id="id2"></span><h3><a class="toc-backref" href="#id9" role="doc-backlink">MongoDB</a><a class="headerlink" href="#engine-mongodb" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> <a class="reference external" href="https://github.com/mongodb/mongo-python-driver#installation">pymongo</a></p></li>
<li><p><a class="reference external" href="https://www.mongodb.com">MongoDB</a></p></li>
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/mongodb.py">mongodb.py</a></p></li>
</ul>
</aside>
<p id="module-searx.engines.mongodb"><a class="reference external" href="https://www.mongodb.com">MongoDB</a> is a document based database program that handles JSON like data.
Before configuring the <code class="docutils literal notranslate"><span class="pre">mongodb</span></code> engine, you must install the dependency
<a class="reference external" href="https://github.com/mongodb/mongo-python-driver#installation">pymongo</a>.</p>
<section id="id3">
<h4>Configuration<a class="headerlink" href="#id3" title="Link to this heading"></a></h4>
<p>In order to query <a class="reference external" href="https://www.mongodb.com">MongoDB</a>, you have to select a <code class="docutils literal notranslate"><span class="pre">database</span></code> and a
<code class="docutils literal notranslate"><span class="pre">collection</span></code>. Furthermore, you have to select a <code class="docutils literal notranslate"><span class="pre">key</span></code> that is going to be
searched. <a class="reference external" href="https://www.mongodb.com">MongoDB</a> also supports the option <code class="docutils literal notranslate"><span class="pre">exact_match_only</span></code>, so configure
it as you wish.</p>
</section>
<section id="id4">
<h4>Example<a class="headerlink" href="#id4" title="Link to this heading"></a></h4>
<p>Below is an example configuration for using a MongoDB collection:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># MongoDB engine</span>
<span class="c1"># Required dependency: pymongo</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mymongo</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mongodb</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">md</span>
<span class="w"> </span><span class="nt">exact_match_only</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;127.0.0.1&#39;</span>
<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">27017</span>
<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">results_per_page</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">20</span>
<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;business&#39;</span>
<span class="w"> </span><span class="nt">collection</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;reviews&#39;</span><span class="w"> </span><span class="c1"># name of the db collection</span>
<span class="w"> </span><span class="nt">key</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;name&#39;</span><span class="w"> </span><span class="c1"># key in the collection to search for</span>
</pre></div>
</div>
</section>
<section id="id5">
<h4>Implementations<a class="headerlink" href="#id5" title="Link to this heading"></a></h4>
</section>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../offline_concept.html">Offline Concept</a></li>
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_offline.html">Demo Offline Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="command-line-engines.html">Command Line Engines</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">NoSQL databases</a></li>
<li class="toctree-l5"><a class="reference internal" href="search-indexer-engines.html">Local Search APIs</a></li>
<li class="toctree-l5"><a class="reference internal" href="sql-engines.html">SQL Engines</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="command-line-engines.html" title="previous chapter">Command Line Engines</a>
<li>Next: <a href="search-indexer-engines.html" title="next chapter">Local Search APIs</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/offline/nosql-engines.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,292 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Local Search APIs &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="SQL Engines" href="sql-engines.html" />
<link rel="prev" title="NoSQL databases" href="nosql-engines.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="sql-engines.html" title="SQL Engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="nosql-engines.html" title="NoSQL databases"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Local Search APIs</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="local-search-apis">
<h1>Local Search APIs<a class="headerlink" href="#local-search-apis" title="Link to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference external" href="https://docs.meilisearch.com/learn/what_is_meilisearch/comparison_to_alternatives.html">Comparison to alternatives</a></p></li>
</ul>
</aside>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#module-searx.engines.meilisearch" id="id6">MeiliSearch</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.elasticsearch" id="id7">Elasticsearch</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.solr" id="id8">Solr</a></p></li>
</ul>
</nav>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<p>Initial sponsored by <a class="reference external" href="https://nlnet.nl/discovery">Search and Discovery Fund</a> of <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
</aside>
<p>Administrators might find themselves wanting to integrate locally running search
engines. The following ones are supported for now:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.elastic.co/elasticsearch/">Elasticsearch</a></p></li>
<li><p><a class="reference external" href="https://www.meilisearch.com">Meilisearch</a></p></li>
<li><p><a class="reference external" href="https://solr.apache.org">Solr</a></p></li>
</ul>
<p>Each search engine is powerful, capable of full-text search. All of the engines
above are added to <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code> just commented out, as you have to
<code class="docutils literal notranslate"><span class="pre">base_url</span></code> for all them.</p>
<p>Please note that if you are not using HTTPS to access these engines, you have to
enable HTTP requests by setting <code class="docutils literal notranslate"><span class="pre">enable_http</span></code> to <code class="docutils literal notranslate"><span class="pre">True</span></code>.</p>
<p>Furthermore, if you do not want to expose these engines on a public instance,
you can still add them and limit the access by setting <code class="docutils literal notranslate"><span class="pre">tokens</span></code> as described
in section <a class="reference internal" href="../../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>.</p>
<section id="module-searx.engines.meilisearch">
<span id="meilisearch"></span><span id="engine-meilisearch"></span><h2><a class="toc-backref" href="#id6" role="doc-backlink">MeiliSearch</a><a class="headerlink" href="#module-searx.engines.meilisearch" title="Link to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/meilisearch.py">meilisearch.py</a></p></li>
<li><p><a class="reference external" href="https://www.meilisearch.com">MeiliSearch</a></p></li>
<li><p><a class="reference external" href="https://docs.meilisearch.com/">MeiliSearch Documentation</a></p></li>
<li><p><a class="reference external" href="https://docs.meilisearch.com/learn/getting_started/installation.html">Install MeiliSearch</a></p></li>
</ul>
</aside>
<p><a class="reference external" href="https://www.meilisearch.com">MeiliSearch</a> is aimed at individuals and small companies. It is designed for
small-scale (less than 10 million documents) data collections. E.g. it is great
for storing web pages you have visited and searching in the contents later.</p>
<p>The engine supports faceted search, so you can search in a subset of documents
of the collection. Furthermore, you can search in <a class="reference external" href="https://www.meilisearch.com">MeiliSearch</a> instances that
require authentication by setting <code class="docutils literal notranslate"><span class="pre">auth_token</span></code>.</p>
<section id="example">
<h3>Example<a class="headerlink" href="#example" title="Link to this heading"></a></h3>
<p>Here is a simple example to query a Meilisearch instance:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">meilisearch</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">meilisearch</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mes</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://localhost:7700</span>
<span class="w"> </span><span class="nt">index</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my-index</span>
<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</pre></div>
</div>
</section>
</section>
<section id="module-searx.engines.elasticsearch">
<span id="elasticsearch"></span><span id="engine-elasticsearch"></span><h2><a class="toc-backref" href="#id7" role="doc-backlink">Elasticsearch</a><a class="headerlink" href="#module-searx.engines.elasticsearch" title="Link to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/elasticsearch.py">elasticsearch.py</a></p></li>
<li><p><a class="reference external" href="https://www.elastic.co/elasticsearch/">Elasticsearch</a></p></li>
<li><p><a class="reference external" href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html">Elasticsearch Guide</a></p></li>
<li><p><a class="reference external" href="https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html">Install Elasticsearch</a></p></li>
</ul>
</aside>
<p><a class="reference external" href="https://www.elastic.co/elasticsearch/">Elasticsearch</a> supports numerous ways to query the data it is storing. At the
moment the engine supports the most popular search methods (<code class="docutils literal notranslate"><span class="pre">query_type</span></code>):</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">match</span></code>,</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">simple_query_string</span></code>,</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">term</span></code> and</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">terms</span></code>.</p></li>
</ul>
<p>If none of the methods fit your use case, you can select <code class="docutils literal notranslate"><span class="pre">custom</span></code> query type
and provide the JSON payload to submit to Elasticsearch in
<code class="docutils literal notranslate"><span class="pre">custom_query_json</span></code>.</p>
<section id="id3">
<h3>Example<a class="headerlink" href="#id3" title="Link to this heading"></a></h3>
<p>The following is an example configuration for an <a class="reference external" href="https://www.elastic.co/elasticsearch/">Elasticsearch</a> instance with
authentication configured to read from <code class="docutils literal notranslate"><span class="pre">my-index</span></code> index.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">elasticsearch</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">es</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">elasticsearch</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://localhost:9200</span>
<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">elastic</span>
<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">changeme</span>
<span class="w"> </span><span class="nt">index</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my-index</span>
<span class="w"> </span><span class="nt">query_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">match</span>
<span class="w"> </span><span class="c1"># custom_query_json: &#39;{ ... }&#39;</span>
<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</pre></div>
</div>
</section>
</section>
<section id="module-searx.engines.solr">
<span id="solr"></span><span id="engine-solr"></span><h2><a class="toc-backref" href="#id8" role="doc-backlink">Solr</a><a class="headerlink" href="#module-searx.engines.solr" title="Link to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/solr.py">solr.py</a></p></li>
<li><p><a class="reference external" href="https://solr.apache.org">Solr</a></p></li>
<li><p><a class="reference external" href="https://solr.apache.org/resources.html">Solr Resources</a></p></li>
<li><p><a class="reference external" href="https://solr.apache.org/guide/installing-solr.html">Install Solr</a></p></li>
</ul>
</aside>
<p><a class="reference external" href="https://solr.apache.org">Solr</a> is a popular search engine based on Lucene, just like <a class="reference external" href="https://www.elastic.co/elasticsearch/">Elasticsearch</a>. But
instead of searching in indices, you can search in collections.</p>
<section id="id5">
<h3>Example<a class="headerlink" href="#id5" title="Link to this heading"></a></h3>
<p>This is an example configuration for searching in the collection
<code class="docutils literal notranslate"><span class="pre">my-collection</span></code> and get the results in ascending order.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">solr</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">solr</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">slr</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://localhost:8983</span>
<span class="w"> </span><span class="nt">collection</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my-collection</span>
<span class="w"> </span><span class="nt">sort</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">asc</span>
<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</pre></div>
</div>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../offline_concept.html">Offline Concept</a></li>
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_offline.html">Demo Offline Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="command-line-engines.html">Command Line Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="nosql-engines.html">NoSQL databases</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Local Search APIs</a></li>
<li class="toctree-l5"><a class="reference internal" href="sql-engines.html">SQL Engines</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="nosql-engines.html" title="previous chapter">NoSQL databases</a>
<li>Next: <a href="sql-engines.html" title="next chapter">SQL Engines</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/offline/search-indexer-engines.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,345 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SQL Engines &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Tineye" href="../online_url_search/tineye.html" />
<link rel="prev" title="Local Search APIs" href="search-indexer-engines.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../online_url_search/tineye.html" title="Tineye"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="search-indexer-engines.html" title="Local Search APIs"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">SQL Engines</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="sql-engines">
<span id="id1"></span><h1>SQL Engines<a class="headerlink" href="#sql-engines" title="Link to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.sqlite.org/index.html">SQLite</a></p></li>
<li><p><a class="reference external" href="https://www.postgresql.org">PostgreSQL</a></p></li>
<li><p><a class="reference external" href="https://www.mysql.com">MySQL</a></p></li>
</ul>
</aside>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#extra-dependencies" id="id9">Extra Dependencies</a></p></li>
<li><p><a class="reference internal" href="#configure-the-engines" id="id10">Configure the engines</a></p>
<ul>
<li><p><a class="reference internal" href="#engine-sqlite" id="id11">SQLite</a></p></li>
<li><p><a class="reference internal" href="#engine-postgresql" id="id12">PostgreSQL</a></p></li>
<li><p><a class="reference internal" href="#engine-mysql-server" id="id13">MySQL</a></p></li>
</ul>
</li>
</ul>
</nav>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<p>Initial sponsored by <a class="reference external" href="https://nlnet.nl/discovery">Search and Discovery Fund</a> of <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
</aside>
<p>With the <em>SQL engines</em> you can bind SQL databases into SearXNG. The following
Relational Database Management System (RDBMS) are supported:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#engine-sqlite"><span class="std std-ref">SQLite</span></a></p></li>
<li><p><a class="reference internal" href="#engine-postgresql"><span class="std std-ref">PostgreSQL</span></a></p></li>
<li><p><a class="reference internal" href="#engine-mysql-server"><span class="std std-ref">MySQL</span></a></p></li>
</ul>
<p>All of the engines above are just commented out in the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">settings.yml</a>, as you have to set the required attributes for the
engines, e.g. <code class="docutils literal notranslate"><span class="pre">database:</span></code></p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nv">sqlite|postgresql|mysql_server</span><span class="p p-Indicator">}</span>
<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="nt">result_template</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nv">template_name</span><span class="p p-Indicator">}</span>
<span class="w"> </span><span class="nt">query_str</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</pre></div>
</div>
<p>By default, the engines use the <code class="docutils literal notranslate"><span class="pre">key-value</span></code> template for displaying results /
see <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/key-value.html">simple</a>
theme. If you are not satisfied with the original result layout, you can use
your own template, set <code class="docutils literal notranslate"><span class="pre">result_template</span></code> attribute to <code class="docutils literal notranslate"><span class="pre">{template_name}</span></code> and
place the templates at:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">searx</span><span class="o">/</span><span class="n">templates</span><span class="o">/</span><span class="p">{</span><span class="n">theme_name</span><span class="p">}</span><span class="o">/</span><span class="n">result_templates</span><span class="o">/</span><span class="p">{</span><span class="n">template_name</span><span class="p">}</span>
</pre></div>
</div>
<p>If you do not wish to expose these engines on a public instance, you can still
add them and limit the access by setting <code class="docutils literal notranslate"><span class="pre">tokens</span></code> as described in section
<a class="reference internal" href="../../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>.</p>
<section id="extra-dependencies">
<h2><a class="toc-backref" href="#id9" role="doc-backlink">Extra Dependencies</a><a class="headerlink" href="#extra-dependencies" title="Link to this heading"></a></h2>
<p>For using <a class="reference internal" href="#engine-postgresql"><span class="std std-ref">PostgreSQL</span></a> or <a class="reference internal" href="#engine-mysql-server"><span class="std std-ref">MySQL</span></a> you need to
install additional packages in Pythons Virtual Environment of your SearXNG
instance. To switch into the environment (<a class="reference internal" href="../../../admin/installation-searxng.html#searxng-src"><span class="std std-ref">Install SearXNG &amp; dependencies</span></a>) you can use
<a class="reference internal" href="../../../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo utils/searxng.sh instance cmd bash
(searxng-pyenv)$ pip install ...
</pre></div>
</div>
</section>
<section id="configure-the-engines">
<h2><a class="toc-backref" href="#id10" role="doc-backlink">Configure the engines</a><a class="headerlink" href="#configure-the-engines" title="Link to this heading"></a></h2>
<p>The configuration of the new database engines are similar. You must put a valid
SQL-SELECT query in <code class="docutils literal notranslate"><span class="pre">query_str</span></code>. At the moment you can only bind at most one
parameter in your query. By setting the attribute <code class="docutils literal notranslate"><span class="pre">limit</span></code> you can define how
many results you want from the SQL server. Basically, it is the same as the
<code class="docutils literal notranslate"><span class="pre">LIMIT</span></code> keyword in SQL.</p>
<p>Please, do not include <code class="docutils literal notranslate"><span class="pre">LIMIT</span></code> or <code class="docutils literal notranslate"><span class="pre">OFFSET</span></code> in your SQL query as the engines
rely on these keywords during paging. If you want to configure the number of
returned results use the option <code class="docutils literal notranslate"><span class="pre">limit</span></code>.</p>
<section id="engine-sqlite">
<span id="id2"></span><h3><a class="toc-backref" href="#id11" role="doc-backlink">SQLite</a><a class="headerlink" href="#engine-sqlite" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/sqlite.py">sqlite.py</a></p></li>
</ul>
</aside>
<p id="module-searx.engines.sqlite">SQLite is a small, fast and reliable SQL database engine. It does not require
any extra dependency.</p>
<section id="example">
<h4>Example<a class="headerlink" href="#example" title="Link to this heading"></a></h4>
<p>To demonstrate the power of database engines, here is a more complex example
which reads from a <a class="reference external" href="https://mediathekview.de/">MediathekView</a> (DE) movie database. For this example of the
SQLite engine download the database:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://liste.mediathekview.de/filmliste-v2.db.bz2">https://liste.mediathekview.de/filmliste-v2.db.bz2</a></p></li>
</ul>
<p>and unpack into <code class="docutils literal notranslate"><span class="pre">searx/data/filmliste-v2.db</span></code>. To search the database use e.g
Query to test: <code class="docutils literal notranslate"><span class="pre">!mediathekview</span> <span class="pre">concert</span></code></p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mediathekview</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sqlite</span>
<span class="w"> </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">False</span>
<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">general</span>
<span class="w"> </span><span class="nt">result_template</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">default.html</span>
<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">searx/data/filmliste-v2.db</span>
<span class="w"> </span><span class="nt">query_str</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">&gt;-</span>
<span class="w"> </span><span class="no">SELECT title || &#39; (&#39; || time(duration, &#39;unixepoch&#39;) || &#39;)&#39; AS title,</span>
<span class="w"> </span><span class="no">COALESCE( NULLIF(url_video_hd,&#39;&#39;), NULLIF(url_video_sd,&#39;&#39;), url_video) AS url,</span>
<span class="w"> </span><span class="no">description AS content</span>
<span class="w"> </span><span class="no">FROM film</span>
<span class="w"> </span><span class="no">WHERE title LIKE :wildcard OR description LIKE :wildcard</span>
<span class="w"> </span><span class="no">ORDER BY duration DESC</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h4>Implementations<a class="headerlink" href="#implementations" title="Link to this heading"></a></h4>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.sqlite.sqlite_cursor">
<span class="sig-prename descclassname"><span class="pre">searx.engines.sqlite.</span></span><span class="sig-name descname"><span class="pre">sqlite_cursor</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/sqlite.html#sqlite_cursor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.sqlite.sqlite_cursor" title="Link to this definition"></a></dt>
<dd><p>Implements a <a class="reference external" href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" title="(in Python v3.12)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Context</span> <span class="pre">Manager</span></code></a> for a
<a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Cursor" title="(in Python v3.12)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sqlite3.Cursor</span></code></a>.</p>
<p>Open database in read only mode: if the database doesnt exist. The default
mode creates an empty file on the file system. See:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.connect">https://docs.python.org/3/library/sqlite3.html#sqlite3.connect</a></p></li>
<li><p><a class="reference external" href="https://www.sqlite.org/uri.html">https://www.sqlite.org/uri.html</a></p></li>
</ul>
</dd></dl>
</section>
<section id="engine-postgresql">
<span id="id3"></span><h3><a class="toc-backref" href="#id12" role="doc-backlink">PostgreSQL</a><a class="headerlink" href="#engine-postgresql" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/postgresql.py">postgresql.py</a></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> <a class="reference external" href="psycopg2">psycopg2-binary</a></p></li>
</ul>
</aside>
<p id="module-searx.engines.postgresql">PostgreSQL is a powerful and robust open source database. Before configuring
the PostgreSQL engine, you must install the dependency <code class="docutils literal notranslate"><span class="pre">psychopg2</span></code>.</p>
<section id="id4">
<h4>Example<a class="headerlink" href="#id4" title="Link to this heading"></a></h4>
<p>Below is an example configuration:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_database</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">postgresql</span>
<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_database</span>
<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">searxng</span>
<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">password</span>
<span class="w"> </span><span class="nt">query_str</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;SELECT</span><span class="nv"> </span><span class="s">*</span><span class="nv"> </span><span class="s">from</span><span class="nv"> </span><span class="s">my_table</span><span class="nv"> </span><span class="s">WHERE</span><span class="nv"> </span><span class="s">my_column</span><span class="nv"> </span><span class="s">=</span><span class="nv"> </span><span class="s">%(query)s&#39;</span>
</pre></div>
</div>
</section>
<section id="id5">
<h4>Implementations<a class="headerlink" href="#id5" title="Link to this heading"></a></h4>
</section>
</section>
<section id="engine-mysql-server">
<span id="id6"></span><h3><a class="toc-backref" href="#id13" role="doc-backlink">MySQL</a><a class="headerlink" href="#engine-mysql-server" title="Link to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/mysql_server.py">mysql_server.py</a></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> <a class="reference external" href="https://pypi.org/project/mysql-connector-python">mysql-connector-python</a></p></li>
</ul>
</aside>
<p id="module-searx.engines.mysql_server">MySQL is said to be the most popular open source database. Before enabling
MySQL engine, you must install the package <code class="docutils literal notranslate"><span class="pre">mysql-connector-python</span></code>.</p>
<p>The authentication plugin is configurable by setting <code class="docutils literal notranslate"><span class="pre">auth_plugin</span></code> in the
attributes. By default it is set to <code class="docutils literal notranslate"><span class="pre">caching_sha2_password</span></code>.</p>
<section id="id7">
<h4>Example<a class="headerlink" href="#id7" title="Link to this heading"></a></h4>
<p>This is an example configuration for querying a MySQL server:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_database</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mysql_server</span>
<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_database</span>
<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">searxng</span>
<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">password</span>
<span class="w"> </span><span class="nt">limit</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">5</span>
<span class="w"> </span><span class="nt">query_str</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;SELECT</span><span class="nv"> </span><span class="s">*</span><span class="nv"> </span><span class="s">from</span><span class="nv"> </span><span class="s">my_table</span><span class="nv"> </span><span class="s">WHERE</span><span class="nv"> </span><span class="s">my_column=%(query)s&#39;</span>
</pre></div>
</div>
</section>
<section id="id8">
<h4>Implementations<a class="headerlink" href="#id8" title="Link to this heading"></a></h4>
</section>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../offline_concept.html">Offline Concept</a></li>
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_offline.html">Demo Offline Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="command-line-engines.html">Command Line Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="nosql-engines.html">NoSQL databases</a></li>
<li class="toctree-l5"><a class="reference internal" href="search-indexer-engines.html">Local Search APIs</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">SQL Engines</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="search-indexer-engines.html" title="previous chapter">Local Search APIs</a>
<li>Next: <a href="../online_url_search/tineye.html" title="next chapter">Tineye</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/offline/sql-engines.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,218 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Offline Concept &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script src="../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Demo Offline Engine" href="demo/demo_offline.html" />
<link rel="prev" title="Z-Library" href="online/zlibrary.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="demo/demo_offline.html" title="Demo Offline Engine"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="online/zlibrary.html" title="Z-Library"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Offline Concept</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="offline-concept">
<h1>Offline Concept<a class="headerlink" href="#offline-concept" title="Link to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">offline engines</p>
<ul class="simple">
<li><p><a class="reference internal" href="demo/demo_offline.html#demo-offline-engine"><span class="std std-ref">Demo Offline Engine</span></a></p></li>
<li><p><a class="reference internal" href="offline/command-line-engines.html#engine-command"><span class="std std-ref">Command Line Engines</span></a></p></li>
<li><p><a class="reference internal" href="offline/sql-engines.html#sql-engines"><span class="std std-ref">SQL Engines</span></a></p></li>
<li><p><a class="reference internal" href="offline/nosql-engines.html#nosql-engines"><span class="std std-ref">NoSQL databases</span></a></p></li>
<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.offline" title="searx.search.processors.offline"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.search.processors.offline</span></code></a></p></li>
</ul>
</aside>
<p>To extend the functionality of SearXNG, offline engines are going to be
introduced. An offline engine is an engine which does not need Internet
connection to perform a search and does not use HTTP to communicate.</p>
<p>Offline engines can be configured, by adding those to the <cite>engines</cite> list of
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">settings.yml</a>. An example skeleton for offline
engines can be found in <a class="reference internal" href="demo/demo_offline.html#demo-offline-engine"><span class="std std-ref">Demo Offline Engine</span></a> (<a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/demo_offline.py">demo_offline.py</a>).</p>
<section id="programming-interface">
<h2>Programming Interface<a class="headerlink" href="#programming-interface" title="Link to this heading"></a></h2>
<dl>
<dt><a class="reference internal" href="demo/demo_offline.html#searx.engines.demo_offline.init" title="searx.engines.demo_offline.init"><code class="xref py py-func docutils literal notranslate"><span class="pre">init(engine_settings=None)</span></code></a></dt><dd><p>All offline engines can have their own init function to setup the engine before
accepting requests. The function gets the settings from settings.yml as a
parameter. This function can be omitted, if there is no need to setup anything
in advance.</p>
</dd>
<dt><code class="xref py py-func docutils literal notranslate"><span class="pre">search(query,</span> <span class="pre">params)</span></code></dt><dd><p>Each offline engine has a function named <code class="docutils literal notranslate"><span class="pre">search</span></code>. This function is
responsible to perform a search and return the results in a presentable
format. (Where <em>presentable</em> means presentable by the selected result
template.)</p>
<p>The return value is a list of results retrieved by the engine.</p>
</dd>
<dt>Engine representation in <code class="docutils literal notranslate"><span class="pre">/config</span></code></dt><dd><p>If an engine is offline, the attribute <code class="docutils literal notranslate"><span class="pre">offline</span></code> is set to <code class="docutils literal notranslate"><span class="pre">True</span></code>.</p>
</dd>
</dl>
</section>
<section id="extra-dependencies">
<span id="offline-requirements"></span><h2>Extra Dependencies<a class="headerlink" href="#extra-dependencies" title="Link to this heading"></a></h2>
<p>If an offline engine depends on an external tool, SearXNG does not install it by
default. When an administrator configures such engine and starts the instance,
the process returns an error with the list of missing dependencies. Also,
required dependencies will be added to the comment/description of the engine, so
admins can install packages in advance.</p>
<p>If there is a need to install additional packages in <em>Pythons Virtual
Environment</em> of your SearXNG instance you need to switch into the environment
(<a class="reference internal" href="../../admin/installation-searxng.html#searxng-src"><span class="std std-ref">Install SearXNG &amp; dependencies</span></a>) first, for this you can use <a class="reference internal" href="../../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo utils/searxng.sh instance cmd bash
(searxng-pyenv)$ pip install ...
</pre></div>
</div>
</section>
<section id="private-engines-security">
<h2>Private engines (Security)<a class="headerlink" href="#private-engines-security" title="Link to this heading"></a></h2>
<p>To limit the access to offline engines, if an instance is available publicly,
administrators can set token(s) for each of the <a class="reference internal" href="../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>. If a
query contains a valid token, then SearXNG performs the requested private
search. If not, requests from an offline engines return errors.</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="index.html#online-engines">Online Engines</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="index.html#offline-engines">Offline Engines</a><ul class="current">
<li class="toctree-l5 current"><a class="current reference internal" href="#">Offline Concept</a></li>
<li class="toctree-l5"><a class="reference internal" href="demo/demo_offline.html">Demo Offline Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="offline/command-line-engines.html">Command Line Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="offline/nosql-engines.html">NoSQL databases</a></li>
<li class="toctree-l5"><a class="reference internal" href="offline/search-indexer-engines.html">Local Search APIs</a></li>
<li class="toctree-l5"><a class="reference internal" href="offline/sql-engines.html">SQL Engines</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../index.html">Overview</a>
<ul>
<li><a href="../index.html">Developer documentation</a>
<ul>
<li><a href="index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="online/zlibrary.html" title="previous chapter">Z-Library</a>
<li>Next: <a href="demo/demo_offline.html" title="next chapter">Demo Offline Engine</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/dev/engines/offline_concept.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,266 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Annas Archive &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Arch Linux" href="archlinux.html" />
<link rel="prev" title="MediaWiki Engine" href="../mediawiki.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="archlinux.html" title="Arch Linux"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../mediawiki.html" title="MediaWiki Engine"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Annas Archive</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="anna-s-archive">
<span id="annas-archive-engine"></span><h1>Annas Archive<a class="headerlink" href="#anna-s-archive" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.annas_archive"><a class="reference external" href="https://annas-archive.org/">Annas Archive</a> is a free non-profit online shadow library metasearch
engine providing access to a variety of book resources (also via IPFS), created
by a team of anonymous archivists (<a class="reference external" href="https://annas-software.org/AnnaArchivist/annas-archive">AnnaArchivist</a>).</p>
<section id="configuration">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The engine has the following additional settings:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.annas_archive.aa_content" title="searx.engines.annas_archive.aa_content"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aa_content</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.annas_archive.aa_ext" title="searx.engines.annas_archive.aa_ext"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aa_ext</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.annas_archive.aa_sort" title="searx.engines.annas_archive.aa_sort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aa_sort</span></code></a></p></li>
</ul>
<p>With this options a SearXNG maintainer is able to configure <strong>additional</strong>
engines for specific searches in Annas Archive. For example a engine to search
for <em>newest</em> articles and journals (PDF) / by shortcut <code class="docutils literal notranslate"><span class="pre">!aaa</span> <span class="pre">&lt;search-term&gt;</span></code>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">annas articles</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">annas_archive</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">aaa</span>
<span class="w"> </span><span class="nt">aa_content</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;journal_article&#39;</span>
<span class="w"> </span><span class="nt">aa_ext</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;pdf&#39;</span>
<span class="w"> </span><span class="nt">aa_sort</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;newest&#39;</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.annas_archive.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.annas_archive.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/annas_archive.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.annas_archive.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages and other search arguments from Annas search form.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.annas_archive.init">
<span class="sig-prename descclassname"><span class="pre">searx.engines.annas_archive.</span></span><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">engine_settings</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/annas_archive.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.annas_archive.init" title="Link to this definition"></a></dt>
<dd><p>Check of engines settings.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.annas_archive.aa_content">
<span class="sig-prename descclassname"><span class="pre">searx.engines.annas_archive.</span></span><span class="sig-name descname"><span class="pre">aa_content</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.annas_archive.aa_content" title="Link to this definition"></a></dt>
<dd><p>Anans search form field <strong>Content</strong> / possible values:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">journal_article</span><span class="p">,</span> <span class="n">book_any</span><span class="p">,</span> <span class="n">book_fiction</span><span class="p">,</span> <span class="n">book_unknown</span><span class="p">,</span> <span class="n">book_nonfiction</span><span class="p">,</span>
<span class="n">book_comic</span><span class="p">,</span> <span class="n">magazine</span><span class="p">,</span> <span class="n">standards_document</span>
</pre></div>
</div>
<p>To not filter use an empty string (default).</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.annas_archive.aa_ext">
<span class="sig-prename descclassname"><span class="pre">searx.engines.annas_archive.</span></span><span class="sig-name descname"><span class="pre">aa_ext</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.annas_archive.aa_ext" title="Link to this definition"></a></dt>
<dd><p>Filter Annas results by a file ending. Common filters for example are
<code class="docutils literal notranslate"><span class="pre">pdf</span></code> and <code class="docutils literal notranslate"><span class="pre">epub</span></code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Annas Archive is a beta release: Filter results by file extension does not
really work on Annas Archive.</p>
</div>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.annas_archive.aa_sort">
<span class="sig-prename descclassname"><span class="pre">searx.engines.annas_archive.</span></span><span class="sig-name descname"><span class="pre">aa_sort</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.annas_archive.aa_sort" title="Link to this definition"></a></dt>
<dd><p>Sort Annas results, possible values:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">newest</span><span class="p">,</span> <span class="n">oldest</span><span class="p">,</span> <span class="n">largest</span><span class="p">,</span> <span class="n">smallest</span>
</pre></div>
</div>
<p>To sort by <em>most relevant</em> use an empty string (default).</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="../mediawiki.html" title="previous chapter">MediaWiki Engine</a>
<li>Next: <a href="archlinux.html" title="next chapter">Arch Linux</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/annas_archive.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,221 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Arch Linux &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Bing Engines" href="bing.html" />
<link rel="prev" title="Annas Archive" href="annas_archive.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="bing.html" title="Bing Engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="annas_archive.html" title="Annas Archive"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Arch Linux</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="arch-linux">
<span id="archlinux-engine"></span><h1>Arch Linux<a class="headerlink" href="#arch-linux" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#arch-linux-wiki" id="id1">Arch Linux Wiki</a></p></li>
</ul>
</nav>
<section id="arch-linux-wiki">
<span id="module-searx.engines.archlinux"></span><h2><a class="toc-backref" href="#id1" role="doc-backlink">Arch Linux Wiki</a><a class="headerlink" href="#arch-linux-wiki" title="Link to this heading"></a></h2>
<p>This implementation does not use a official API: Mediawiki provides API, but
Arch Wiki blocks access to it.</p>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.archlinux.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.archlinux.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/archlinux.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.archlinux.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages from Archlinux-Wiki. The location of the Wiki address of a
language is mapped in a <a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits.custom" title="searx.enginelib.traits.EngineTraits.custom"><code class="xref py py-obj docutils literal notranslate"><span class="pre">custom</span> <span class="pre">field</span></code></a> (<code class="docutils literal notranslate"><span class="pre">wiki_netloc</span></code>). Depending
on the location, the <code class="docutils literal notranslate"><span class="pre">title</span></code> argument in the request is translated.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;custom&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;wiki_netloc&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;de&quot;</span><span class="p">:</span> <span class="s2">&quot;wiki.archlinux.de&quot;</span><span class="p">,</span>
<span class="c1"># ...</span>
<span class="s2">&quot;zh&quot;</span><span class="p">:</span> <span class="s2">&quot;wiki.archlinuxcn.org&quot;</span>
<span class="p">}</span>
<span class="s2">&quot;title&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;de&quot;</span><span class="p">:</span> <span class="s2">&quot;Spezial:Suche&quot;</span><span class="p">,</span>
<span class="c1"># ...</span>
<span class="s2">&quot;zh&quot;</span><span class="p">:</span> <span class="s2">&quot;Special:搜索&quot;</span>
<span class="p">},</span>
<span class="p">},</span>
</pre></div>
</div>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="annas_archive.html" title="previous chapter">Annas Archive</a>
<li>Next: <a href="bing.html" title="next chapter">Bing Engines</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/archlinux.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,340 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bing Engines &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Bpb" href="bpb.html" />
<link rel="prev" title="Arch Linux" href="archlinux.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="bpb.html" title="Bpb"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="archlinux.html" title="Arch Linux"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Bing Engines</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="bing-engines">
<span id="id1"></span><h1>Bing Engines<a class="headerlink" href="#bing-engines" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#module-searx.engines.bing" id="id2">Bing WEB</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.bing_images" id="id3">Bing Images</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.bing_videos" id="id4">Bing Videos</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.bing_news" id="id5">Bing News</a></p></li>
</ul>
</nav>
<section id="module-searx.engines.bing">
<span id="bing-web"></span><span id="bing-web-engine"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Bing WEB</a><a class="headerlink" href="#module-searx.engines.bing" title="Link to this heading"></a></h2>
<p>This is the implementation of the Bing-WEB engine. Some of this
implementations are shared by other engines:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#bing-images-engine"><span class="std std-ref">Bing Images</span></a></p></li>
<li><p><a class="reference internal" href="#bing-news-engine"><span class="std std-ref">Bing News</span></a></p></li>
<li><p><a class="reference internal" href="#bing-videos-engine"><span class="std std-ref">Bing Videos</span></a></p></li>
</ul>
<p>On the <a class="reference external" href="https://www.bing.com/account/general">preference page</a> Bing offers a lot of languages an regions (see section
LANGUAGE and COUNTRY/REGION). The Language is the language of the UI, we need
in SearXNG to get the translations of data such as <em>“published last week”</em>.</p>
<p>There is a description of the offical <a class="reference external" href="https://learn.microsoft.com/en-us/bing/search-apis/">search-APIs</a>, unfortunately this is not
the API we can use or that bing itself would use. You can look up some things
in the API to get a better picture of bing, but the value specifications like
the market codes are usually outdated or at least no longer used by bing itself.</p>
<p>The market codes have been harmonized and are identical for web, video and
images. The news area has also been harmonized with the other categories. Only
political adjustments still seem to be made for example, there is no news
category for the Chinese market.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.bing.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages and regions from Bing-Web.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.bing.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing.request" title="Link to this definition"></a></dt>
<dd><p>Assemble a Bing-Web request.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.bing.base_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://www.bing.com/search'</span></em><a class="headerlink" href="#searx.engines.bing.base_url" title="Link to this definition"></a></dt>
<dd><p>Bing (Web) search URL</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.bing.max_page">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing.</span></span><span class="sig-name descname"><span class="pre">max_page</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">200</span></em><a class="headerlink" href="#searx.engines.bing.max_page" title="Link to this definition"></a></dt>
<dd><p>200 pages maximum (<code class="docutils literal notranslate"><span class="pre">&amp;first=1991</span></code>)</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.bing.safesearch">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing.</span></span><span class="sig-name descname"><span class="pre">safesearch</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.bing.safesearch" title="Link to this definition"></a></dt>
<dd><p>Bing results are always SFW. To get NSFW links from bing some age
verification by a cookie is needed / thats not possible in SearXNG.</p>
</dd></dl>
</section>
<section id="module-searx.engines.bing_images">
<span id="bing-images"></span><span id="bing-images-engine"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Bing Images</a><a class="headerlink" href="#module-searx.engines.bing_images" title="Link to this heading"></a></h2>
<p>Bing-Images: description see <a class="reference internal" href="#module-searx.engines.bing" title="searx.engines.bing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.engines.bing</span></code></a>.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.bing_images.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_images.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_images.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_images.request" title="Link to this definition"></a></dt>
<dd><p>Assemble a Bing-Image request.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.bing_images.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_images.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_images.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_images.response" title="Link to this definition"></a></dt>
<dd><p>Get response from Bing-Images</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.bing_images.base_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_images.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://www.bing.com/images/async'</span></em><a class="headerlink" href="#searx.engines.bing_images.base_url" title="Link to this definition"></a></dt>
<dd><p>Bing (Images) search URL</p>
</dd></dl>
</section>
<section id="module-searx.engines.bing_videos">
<span id="bing-videos"></span><span id="bing-videos-engine"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Bing Videos</a><a class="headerlink" href="#module-searx.engines.bing_videos" title="Link to this heading"></a></h2>
<p>Bing-Videos: description see <a class="reference internal" href="#module-searx.engines.bing" title="searx.engines.bing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.engines.bing</span></code></a>.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.bing_videos.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_videos.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_videos.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_videos.request" title="Link to this definition"></a></dt>
<dd><p>Assemble a Bing-Video request.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.bing_videos.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_videos.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_videos.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_videos.response" title="Link to this definition"></a></dt>
<dd><p>Get response from Bing-Video</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.bing_videos.base_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_videos.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://www.bing.com/videos/asyncv2'</span></em><a class="headerlink" href="#searx.engines.bing_videos.base_url" title="Link to this definition"></a></dt>
<dd><p>Bing (Videos) async search URL.</p>
</dd></dl>
</section>
<section id="module-searx.engines.bing_news">
<span id="bing-news"></span><span id="bing-news-engine"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">Bing News</a><a class="headerlink" href="#module-searx.engines.bing_news" title="Link to this heading"></a></h2>
<p>Bing-News: description see <a class="reference internal" href="#module-searx.engines.bing" title="searx.engines.bing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.engines.bing</span></code></a>.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>Bing News is <em>different</em> in some ways!</p>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.bing_news.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_news.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_news.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages and regions from Bing-News.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.bing_news.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_news.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_news.request" title="Link to this definition"></a></dt>
<dd><p>Assemble a Bing-News request.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.bing_news.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_news.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_news.response" title="Link to this definition"></a></dt>
<dd><p>Get response from Bing-Video</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.bing_news.base_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://www.bing.com/news/infinitescrollajax'</span></em><a class="headerlink" href="#searx.engines.bing_news.base_url" title="Link to this definition"></a></dt>
<dd><p>Bing (News) search URL</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.bing_news.paging">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">paging</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.bing_news.paging" title="Link to this definition"></a></dt>
<dd><p>If go through the pages and there are actually no new results for another
page, then bing returns the results from the last page again.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.bing_news.time_map">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">time_map</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'day':</span> <span class="pre">'interval=&quot;4&quot;',</span> <span class="pre">'month':</span> <span class="pre">'interval=&quot;9&quot;',</span> <span class="pre">'week':</span> <span class="pre">'interval=&quot;7&quot;'}</span></em><a class="headerlink" href="#searx.engines.bing_news.time_map" title="Link to this definition"></a></dt>
<dd><p>A string 4 means <em>last hour</em>. We use <em>last hour</em> for <code class="docutils literal notranslate"><span class="pre">day</span></code> here since the
difference of <em>last day</em> and <em>last week</em> in the result list is just marginally.
Bing does not have news range <code class="docutils literal notranslate"><span class="pre">year</span></code> / we use <code class="docutils literal notranslate"><span class="pre">month</span></code> instead.</p>
</dd></dl>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="archlinux.html" title="previous chapter">Arch Linux</a>
<li>Next: <a href="bpb.html" title="next chapter">Bpb</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/bing.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

192
dev/engines/online/bpb.html Normal file
View file

@ -0,0 +1,192 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bpb &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Brave Engines" href="brave.html" />
<link rel="prev" title="Bing Engines" href="bing.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="brave.html" title="Brave Engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="bing.html" title="Bing Engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Bpb</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="bpb">
<span id="bpb-engine"></span><h1>Bpb<a class="headerlink" href="#bpb" title="Link to this heading"></a></h1>
<p id="module-searx.engines.bpb">BPB refers to <code class="docutils literal notranslate"><span class="pre">Bundeszentrale</span> <span class="pre">für</span> <span class="pre">poltische</span> <span class="pre">Bildung</span></code>, which is a German
governmental institution aiming to reduce misinformation by providing resources
about politics and history.</p>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="bing.html" title="previous chapter">Bing Engines</a>
<li>Next: <a href="brave.html" title="next chapter">Brave Engines</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/bpb.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,321 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Brave Engines &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="BT4G" href="bt4g.html" />
<link rel="prev" title="Bpb" href="bpb.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="bt4g.html" title="BT4G"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="bpb.html" title="Bpb"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Brave Engines</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="brave-engines">
<span id="brave-engine"></span><h1>Brave Engines<a class="headerlink" href="#brave-engines" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#brave-regions" id="id3">Brave regions</a></p></li>
<li><p><a class="reference internal" href="#brave-languages" id="id4">Brave languages</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id5">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.brave">Brave supports the categories listed in <a class="reference internal" href="#searx.engines.brave.brave_category" title="searx.engines.brave.brave_category"><code class="xref py py-obj docutils literal notranslate"><span class="pre">brave_category</span></code></a> (General,
news, videos, images). The support of <a class="reference internal" href="#searx.engines.brave.paging" title="searx.engines.brave.paging"><code class="xref py py-obj docutils literal notranslate"><span class="pre">paging</span></code></a> and <a class="reference internal" href="#searx.engines.brave.time_range_support" title="searx.engines.brave.time_range_support"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time</span> <span class="pre">range</span></code></a> is limited (see remarks).</p>
<p>Configured <code class="docutils literal notranslate"><span class="pre">brave</span></code> engines:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="nt">brave_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">search</span>
<span class="w"> </span><span class="nt">time_range_support</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">paging</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave.images</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="nt">brave_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">images</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave.videos</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="nt">brave_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">videos</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave.news</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="nt">brave_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">news</span>
</pre></div>
</div>
<section id="brave-regions">
<span id="id1"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Brave regions</a><a class="headerlink" href="#brave-regions" title="Link to this heading"></a></h2>
<p>Brave uses two-digit tags for the regions like <code class="docutils literal notranslate"><span class="pre">ca</span></code> while SearXNG deals with
locales. To get a mapping, all <em>officiat de-facto</em> languages of the Brave
region are mapped to regions in SearXNG (see <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</span></code></a>):</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;regions&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="o">..</span>
<span class="s2">&quot;en-CA&quot;</span><span class="p">:</span> <span class="s2">&quot;ca&quot;</span><span class="p">,</span>
<span class="s2">&quot;fr-CA&quot;</span><span class="p">:</span> <span class="s2">&quot;ca&quot;</span><span class="p">,</span>
<span class="o">..</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The language (aka region) support of Braves index is limited to very basic
languages. The search results for languages like Chinese or Arabic are of
low quality.</p>
</div>
</section>
<section id="brave-languages">
<span id="id2"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Brave languages</a><a class="headerlink" href="#brave-languages" title="Link to this heading"></a></h2>
<p>Braves language support is limited to the UI (menus, area local notations,
etc). Braves index only seems to support a locale, but it does not seem to
support any languages in its index. The choice of available languages is very
small (and its not clear to me where the difference in UI is when switching
from en-us to en-ca or en-gb).</p>
<p>In the <a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraits</span> <span class="pre">object</span></code></a> the
UI languages are stored in a custom field named <code class="docutils literal notranslate"><span class="pre">ui_lang</span></code>:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;custom&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;ui_lang&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;ca&quot;</span><span class="p">:</span> <span class="s2">&quot;ca&quot;</span><span class="p">,</span>
<span class="s2">&quot;de-DE&quot;</span><span class="p">:</span> <span class="s2">&quot;de-de&quot;</span><span class="p">,</span>
<span class="s2">&quot;en-CA&quot;</span><span class="p">:</span> <span class="s2">&quot;en-ca&quot;</span><span class="p">,</span>
<span class="s2">&quot;en-GB&quot;</span><span class="p">:</span> <span class="s2">&quot;en-gb&quot;</span><span class="p">,</span>
<span class="s2">&quot;en-US&quot;</span><span class="p">:</span> <span class="s2">&quot;en-us&quot;</span><span class="p">,</span>
<span class="s2">&quot;es&quot;</span><span class="p">:</span> <span class="s2">&quot;es&quot;</span><span class="p">,</span>
<span class="s2">&quot;fr-CA&quot;</span><span class="p">:</span> <span class="s2">&quot;fr-ca&quot;</span><span class="p">,</span>
<span class="s2">&quot;fr-FR&quot;</span><span class="p">:</span> <span class="s2">&quot;fr-fr&quot;</span><span class="p">,</span>
<span class="s2">&quot;ja-JP&quot;</span><span class="p">:</span> <span class="s2">&quot;ja-jp&quot;</span><span class="p">,</span>
<span class="s2">&quot;pt-BR&quot;</span><span class="p">:</span> <span class="s2">&quot;pt-br&quot;</span><span class="p">,</span>
<span class="s2">&quot;sq-AL&quot;</span><span class="p">:</span> <span class="s2">&quot;sq-al&quot;</span>
<span class="p">}</span>
<span class="p">},</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.brave.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/brave.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.brave.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch <a class="reference internal" href="#brave-languages"><span class="std std-ref">languages</span></a> and <a class="reference internal" href="#brave-regions"><span class="std std-ref">regions</span></a> from Brave.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.brave.brave_category">
<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">brave_category</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'search'</span></em><a class="headerlink" href="#searx.engines.brave.brave_category" title="Link to this definition"></a></dt>
<dd><p>Brave supports common web-search, video search, image and video search.</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">search</span></code>: Common WEB search</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">videos</span></code>: search for videos</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">images</span></code>: search for images</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">news</span></code>: search for news</p></li>
</ul>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.brave.brave_spellcheck">
<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">brave_spellcheck</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.brave.brave_spellcheck" title="Link to this definition"></a></dt>
<dd><p>Brave supports some kind of spell checking. When activated, Brave tries to
fix typos, e.g. it searches for <code class="docutils literal notranslate"><span class="pre">food</span></code> when the user queries for <code class="docutils literal notranslate"><span class="pre">fooh</span></code>. In
the UI of Brave the user gets warned about this, since we can not warn the user
in SearXNG, the spellchecking is disabled by default.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.brave.max_page">
<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">max_page</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">10</span></em><a class="headerlink" href="#searx.engines.brave.max_page" title="Link to this definition"></a></dt>
<dd><p>Tested 9 pages maximum (<code class="docutils literal notranslate"><span class="pre">&amp;offset=8</span></code>), to be save max is set to 10. Trying
to do more wont return any result and you will most likely be flagged as a bot.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.brave.paging">
<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">paging</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.brave.paging" title="Link to this definition"></a></dt>
<dd><p>Brave only supports paging in <a class="reference internal" href="#searx.engines.brave.brave_category" title="searx.engines.brave.brave_category"><code class="xref py py-obj docutils literal notranslate"><span class="pre">brave_category</span></code></a> <code class="docutils literal notranslate"><span class="pre">search</span></code> (UI
category All).</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.brave.time_range_support">
<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">time_range_support</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.brave.time_range_support" title="Link to this definition"></a></dt>
<dd><p>Brave only supports time-range in <a class="reference internal" href="#searx.engines.brave.brave_category" title="searx.engines.brave.brave_category"><code class="xref py py-obj docutils literal notranslate"><span class="pre">brave_category</span></code></a> <code class="docutils literal notranslate"><span class="pre">search</span></code> (UI
category All).</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="bpb.html" title="previous chapter">Bpb</a>
<li>Next: <a href="bt4g.html" title="next chapter">BT4G</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/brave.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,243 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BT4G &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Dailymotion" href="dailymotion.html" />
<link rel="prev" title="Brave Engines" href="brave.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="dailymotion.html" title="Dailymotion"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="brave.html" title="Brave Engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">BT4G</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="bt4g">
<span id="bt4g-engine"></span><h1>BT4G<a class="headerlink" href="#bt4g" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.bt4g"><a class="reference external" href="https://bt4g.com/">BT4G</a> (bt4g.com) is not a tracker and doesnt store any content and only
collects torrent metadata (such as file names and file sizes) and a magnet link
(torrent identifier).</p>
<p>This engine does not parse the HTML page because there is an API in XML (RSS).
The RSS feed provides fewer data like amount of seeders/leechers and the files
in the torrent file. Its a tradeoff for a “stable” engine as the XML from RSS
content will change way less than the HTML page.</p>
<section id="configuration">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The engine has the following additional settings:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.bt4g.bt4g_order_by" title="searx.engines.bt4g.bt4g_order_by"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bt4g_order_by</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.bt4g.bt4g_category" title="searx.engines.bt4g.bt4g_category"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bt4g_category</span></code></a></p></li>
</ul>
<p>With this options a SearXNG maintainer is able to configure <strong>additional</strong>
engines for specific torrent searches. For example a engine to search only for
Movies and sort the result list by the count of seeders.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">bt4g.movie</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">bt4g</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">bt4gv</span>
<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">video</span>
<span class="w"> </span><span class="nt">bt4g_order_by</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">seeders</span>
<span class="w"> </span><span class="nt">bt4g_category</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;movie&#39;</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.bt4g.bt4g_category">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bt4g.</span></span><span class="sig-name descname"><span class="pre">bt4g_category</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'all'</span></em><a class="headerlink" href="#searx.engines.bt4g.bt4g_category" title="Link to this definition"></a></dt>
<dd><p>BT$G offers categories: <code class="docutils literal notranslate"><span class="pre">all</span></code> (default), <code class="docutils literal notranslate"><span class="pre">audio</span></code>, <code class="docutils literal notranslate"><span class="pre">movie</span></code>, <code class="docutils literal notranslate"><span class="pre">doc</span></code>,
<code class="docutils literal notranslate"><span class="pre">app</span></code> and `` other``.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.bt4g.bt4g_order_by">
<span class="sig-prename descclassname"><span class="pre">searx.engines.bt4g.</span></span><span class="sig-name descname"><span class="pre">bt4g_order_by</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'relevance'</span></em><a class="headerlink" href="#searx.engines.bt4g.bt4g_order_by" title="Link to this definition"></a></dt>
<dd><p>Result list can be ordered by <code class="docutils literal notranslate"><span class="pre">relevance</span></code> (default), <code class="docutils literal notranslate"><span class="pre">size</span></code>, <code class="docutils literal notranslate"><span class="pre">seeders</span></code>
or <code class="docutils literal notranslate"><span class="pre">time</span></code>.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>When <em>time_range</em> is activate, the results always ordered by <code class="docutils literal notranslate"><span class="pre">time</span></code>.</p>
</div>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="brave.html" title="previous chapter">Brave Engines</a>
<li>Next: <a href="dailymotion.html" title="next chapter">Dailymotion</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/bt4g.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,253 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dailymotion &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="DuckDuckGo Engines" href="duckduckgo.html" />
<link rel="prev" title="BT4G" href="bt4g.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="duckduckgo.html" title="DuckDuckGo Engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="bt4g.html" title="BT4G"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Dailymotion</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="dailymotion">
<span id="dailymotion-engine"></span><h1>Dailymotion<a class="headerlink" href="#dailymotion" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#dailymotion-videos" id="id1">Dailymotion (Videos)</a></p></li>
</ul>
</nav>
<section id="dailymotion-videos">
<span id="module-searx.engines.dailymotion"></span><h2><a class="toc-backref" href="#id1" role="doc-backlink">Dailymotion (Videos)</a><a class="headerlink" href="#dailymotion-videos" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.dailymotion.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/dailymotion.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.dailymotion.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch locales &amp; languages from dailymotion.</p>
<p>Locales fetched from <a class="reference external" href="https://api.dailymotion.com/locales">api/locales</a>.
There are duplications in the locale codes returned from Dailymotion which
can be ignored:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">en_EN</span> <span class="o">--&gt;</span> <span class="n">en_GB</span><span class="p">,</span> <span class="n">en_US</span>
<span class="n">ar_AA</span> <span class="o">--&gt;</span> <span class="n">ar_EG</span><span class="p">,</span> <span class="n">ar_AE</span><span class="p">,</span> <span class="n">ar_SA</span>
</pre></div>
</div>
<p>The language list <a class="reference external" href="https://api.dailymotion.com/languages">api/languages</a>
contains over 7000 <em>languages</em> codes (see <a class="reference external" href="https://github.com/searxng/searxng/pull/1071">PR1071</a>). We use only those
language codes that are used in the locales.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.dailymotion.family_filter_map">
<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">family_filter_map</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{0:</span> <span class="pre">'false',</span> <span class="pre">1:</span> <span class="pre">'true',</span> <span class="pre">2:</span> <span class="pre">'true'}</span></em><a class="headerlink" href="#searx.engines.dailymotion.family_filter_map" title="Link to this definition"></a></dt>
<dd><p>By default, the family filter is turned on. Setting this parameter to
<code class="docutils literal notranslate"><span class="pre">false</span></code> will stop filtering-out explicit content from searches and global
contexts (<code class="docutils literal notranslate"><span class="pre">family_filter</span></code> in <a class="reference external" href="https://developers.dailymotion.com/api/#global-parameters">Global API Parameters</a> ).</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.dailymotion.iframe_src">
<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">iframe_src</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://www.dailymotion.com/embed/video/{video_id}'</span></em><a class="headerlink" href="#searx.engines.dailymotion.iframe_src" title="Link to this definition"></a></dt>
<dd><p>URL template to embed video in SearXNGs result list.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.dailymotion.result_fields">
<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">result_fields</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['allow_embed',</span> <span class="pre">'description',</span> <span class="pre">'title',</span> <span class="pre">'created_time',</span> <span class="pre">'duration',</span> <span class="pre">'url',</span> <span class="pre">'thumbnail_360_url',</span> <span class="pre">'id']</span></em><a class="headerlink" href="#searx.engines.dailymotion.result_fields" title="Link to this definition"></a></dt>
<dd><p><a class="reference external" href="https://developers.dailymotion.com/api/#fields-selection">Fields selection</a>, by default, a few fields are returned. To request more
specific fields, the <code class="docutils literal notranslate"><span class="pre">fields</span></code> parameter is used with the list of fields
SearXNG needs in the response to build a video result list.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.dailymotion.safesearch_params">
<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">safesearch_params</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{0:</span> <span class="pre">{},</span> <span class="pre">1:</span> <span class="pre">{'is_created_for_kids':</span> <span class="pre">'true'},</span> <span class="pre">2:</span> <span class="pre">{'is_created_for_kids':</span> <span class="pre">'true'}}</span></em><a class="headerlink" href="#searx.engines.dailymotion.safesearch_params" title="Link to this definition"></a></dt>
<dd><p>True if this video is “Created for Kids” / intends to target an audience
under the age of 16 (<code class="docutils literal notranslate"><span class="pre">is_created_for_kids</span></code> in <a class="reference external" href="https://developers.dailymotion.com/api/#video-filters">Video filters API</a> )</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.dailymotion.search_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">search_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://api.dailymotion.com/videos?'</span></em><a class="headerlink" href="#searx.engines.dailymotion.search_url" title="Link to this definition"></a></dt>
<dd><p>URL to retrieve a list of videos.</p>
<ul class="simple">
<li><p><a class="reference external" href="https://developers.dailymotion.com/tools/">REST GET</a></p></li>
<li><p><a class="reference external" href="https://developers.dailymotion.com/api/#global-parameters">Global API Parameters</a></p></li>
<li><p><a class="reference external" href="https://developers.dailymotion.com/api/#video-filters">Video filters API</a></p></li>
</ul>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="bt4g.html" title="previous chapter">BT4G</a>
<li>Next: <a href="duckduckgo.html" title="next chapter">DuckDuckGo Engines</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/dailymotion.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,332 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>DuckDuckGo Engines &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Google Engines" href="google.html" />
<link rel="prev" title="Dailymotion" href="dailymotion.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="google.html" title="Google Engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="dailymotion.html" title="Dailymotion"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">DuckDuckGo Engines</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="duckduckgo-engines">
<span id="id1"></span><h1>DuckDuckGo Engines<a class="headerlink" href="#duckduckgo-engines" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#duckduckgo-lite" id="id2">DuckDuckGo Lite</a></p></li>
<li><p><a class="reference internal" href="#duckduckgo-extra-images-videos-news" id="id3">DuckDuckGo Extra (images, videos, news)</a></p></li>
<li><p><a class="reference internal" href="#duckduckgo-instant-answer-api" id="id4">DuckDuckGo Instant Answer API</a></p></li>
<li><p><a class="reference internal" href="#duckduckgo-weather" id="id5">DuckDuckGo Weather</a></p></li>
</ul>
</nav>
<section id="duckduckgo-lite">
<span id="module-searx.engines.duckduckgo"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">DuckDuckGo Lite</a><a class="headerlink" href="#duckduckgo-lite" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.duckduckgo.cache_vqd">
<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">cache_vqd</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo.html#cache_vqd"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo.cache_vqd" title="Link to this definition"></a></dt>
<dd><p>Caches a <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value from a query.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.duckduckgo.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages &amp; regions from DuckDuckGo.</p>
<p>SearXNGs <code class="docutils literal notranslate"><span class="pre">all</span></code> locale maps DuckDuckGos “Alle regions” (<code class="docutils literal notranslate"><span class="pre">wt-wt</span></code>).
DuckDuckGos language “Browsers prefered language” (<code class="docutils literal notranslate"><span class="pre">wt_WT</span></code>) makes no
sense in a SearXNG request since SearXNGs <code class="docutils literal notranslate"><span class="pre">all</span></code> will not add a
<code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> HTTP header. The value in <code class="docutils literal notranslate"><span class="pre">engine_traits.all_locale</span></code>
is <code class="docutils literal notranslate"><span class="pre">wt-wt</span></code> (the region).</p>
<p>Beside regions DuckDuckGo also defines its languages by region codes. By
example these are the english languages in DuckDuckGo:</p>
<ul class="simple">
<li><p>en_US</p></li>
<li><p>en_AU</p></li>
<li><p>en_CA</p></li>
<li><p>en_GB</p></li>
</ul>
<p>The function <a class="reference internal" href="#searx.engines.duckduckgo.get_ddg_lang" title="searx.engines.duckduckgo.get_ddg_lang"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_ddg_lang</span></code></a> evaluates DuckDuckGos language from
SearXNGs locale.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.duckduckgo.get_ddg_lang">
<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">get_ddg_lang</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">eng_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">sxng_locale</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'en_US'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo.html#get_ddg_lang"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo.get_ddg_lang" title="Link to this definition"></a></dt>
<dd><p>Get DuckDuckGos language identifier from SearXNGs locale.</p>
<p>DuckDuckGo defines its languages by region codes (see
<a class="reference internal" href="#searx.engines.duckduckgo.fetch_traits" title="searx.engines.duckduckgo.fetch_traits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fetch_traits</span></code></a>).</p>
<p>To get region and language of a DDG service use:</p>
<p>It might confuse, but the <code class="docutils literal notranslate"><span class="pre">l</span></code> value of the cookie is what SearXNG calls
the <em>region</em>:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># !ddi paris :es-AR --&gt; {&#39;ad&#39;: &#39;es_AR&#39;, &#39;ah&#39;: &#39;ar-es&#39;, &#39;l&#39;: &#39;ar-es&#39;}</span>
<span class="n">params</span><span class="p">[</span><span class="s1">&#39;cookies&#39;</span><span class="p">][</span><span class="s1">&#39;ad&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">eng_lang</span>
<span class="n">params</span><span class="p">[</span><span class="s1">&#39;cookies&#39;</span><span class="p">][</span><span class="s1">&#39;ah&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">eng_region</span>
<span class="n">params</span><span class="p">[</span><span class="s1">&#39;cookies&#39;</span><span class="p">][</span><span class="s1">&#39;l&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">eng_region</span>
</pre></div>
</div>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p><a class="reference external" href="https://lite.duckduckgo.com/lite">DDG-lite</a> does not offer a language
selection to the user, only a region can be selected by the user
(<code class="docutils literal notranslate"><span class="pre">eng_region</span></code> from the example above). DDG-lite stores the selected
region in a cookie:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;cookies&#39;</span><span class="p">][</span><span class="s1">&#39;kl&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">eng_region</span> <span class="c1"># &#39;ar-es&#39;</span>
</pre></div>
</div>
</div>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.duckduckgo.get_vqd">
<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">get_vqd</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo.html#get_vqd"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo.get_vqd" title="Link to this definition"></a></dt>
<dd><p>Returns the <code class="docutils literal notranslate"><span class="pre">vqd</span></code> that fits to the <em>query</em>. If there is no <code class="docutils literal notranslate"><span class="pre">vqd</span></code> cached
(<a class="reference internal" href="#searx.engines.duckduckgo.cache_vqd" title="searx.engines.duckduckgo.cache_vqd"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cache_vqd</span></code></a>) the query is sent to DDG to get a vqd value from the
response.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>If an empty string is returned there are no results for the <code class="docutils literal notranslate"><span class="pre">query</span></code> and
therefore no <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value.</p>
</div>
<p>DDGs bot detection is sensitive to the <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value. For some search terms
(such as extremely long search terms that are often sent by bots), no <code class="docutils literal notranslate"><span class="pre">vqd</span></code>
value can be determined.</p>
<p>If SearXNG cannot determine a <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value, then no request should go out
to DDG:</p>
<blockquote>
<div><p>A request with a wrong <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value leads to DDG temporarily putting
SearXNGs IP on a block list.</p>
<p>Requests from IPs in this block list run into timeouts.</p>
</div></blockquote>
<p>Not sure, but it seems the block list is a sliding window: to get my IP rid
from the bot list I had to cool down my IP for 1h (send no requests from
that IP to DDG).</p>
<p>TL;DR; the <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value is needed to pass DDGs bot protection and is used
by all request to DDG:</p>
<ul class="simple">
<li><p>DuckDuckGo Lite: <code class="docutils literal notranslate"><span class="pre">https://lite.duckduckgo.com/lite</span></code> (POST form data)</p></li>
<li><p>DuckDuckGo Web: <code class="docutils literal notranslate"><span class="pre">https://links.duckduckgo.com/d.js?q=...&amp;vqd=...</span></code></p></li>
<li><p>DuckDuckGo Images: <code class="docutils literal notranslate"><span class="pre">https://duckduckgo.com/i.js??q=...&amp;vqd=...</span></code></p></li>
<li><p>DuckDuckGo Videos: <code class="docutils literal notranslate"><span class="pre">https://duckduckgo.com/v.js??q=...&amp;vqd=...</span></code></p></li>
<li><p>DuckDuckGo News: <code class="docutils literal notranslate"><span class="pre">https://duckduckgo.com/news.js??q=...&amp;vqd=...</span></code></p></li>
</ul>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.duckduckgo.send_accept_language_header">
<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">send_accept_language_header</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.duckduckgo.send_accept_language_header" title="Link to this definition"></a></dt>
<dd><p>DuckDuckGo-Lite tries to guess users prefered language from the HTTP
<code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code>. Optional the user can select a region filter (but not a
language).</p>
</dd></dl>
<section id="duckduckgo-extra-images-videos-news">
<span id="module-searx.engines.duckduckgo_extra"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">DuckDuckGo Extra (images, videos, news)</a><a class="headerlink" href="#duckduckgo-extra-images-videos-news" title="Link to this heading"></a></h2>
</section>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.duckduckgo_extra.ddg_category">
<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo_extra.</span></span><span class="sig-name descname"><span class="pre">ddg_category</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'images'</span></em><a class="headerlink" href="#searx.engines.duckduckgo_extra.ddg_category" title="Link to this definition"></a></dt>
<dd><p>The category must be any of <code class="docutils literal notranslate"><span class="pre">images</span></code>, <code class="docutils literal notranslate"><span class="pre">videos</span></code> and <code class="docutils literal notranslate"><span class="pre">news</span></code></p>
</dd></dl>
<section id="duckduckgo-instant-answer-api">
<span id="module-searx.engines.duckduckgo_definitions"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">DuckDuckGo Instant Answer API</a><a class="headerlink" href="#duckduckgo-instant-answer-api" title="Link to this heading"></a></h2>
<p>The <a class="reference external" href="https://duckduckgo.com/api">DDG-API</a> is no longer documented but from
reverse engineering we can see that some services (e.g. instant answers) still
in use from the DDG search engine.</p>
<p>As far we can say the <em>instant answers</em> API does not support languages, or at
least we could not find out how language support should work. It seems that
most of the features are based on English terms.</p>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.duckduckgo_definitions.area_to_str">
<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo_definitions.</span></span><span class="sig-name descname"><span class="pre">area_to_str</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">area</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo_definitions.html#area_to_str"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo_definitions.area_to_str" title="Link to this definition"></a></dt>
<dd><p>parse <code class="docutils literal notranslate"><span class="pre">{'unit':</span> <span class="pre">'https://www.wikidata.org/entity/Q712226',</span> <span class="pre">'amount':</span> <span class="pre">'+20.99'}</span></code></p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.duckduckgo_definitions.is_broken_text">
<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo_definitions.</span></span><span class="sig-name descname"><span class="pre">is_broken_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo_definitions.html#is_broken_text"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo_definitions.is_broken_text" title="Link to this definition"></a></dt>
<dd><p>duckduckgo may return something like <code class="docutils literal notranslate"><span class="pre">&lt;a</span> <span class="pre">href=&quot;xxxx&quot;&gt;http://somewhere</span> <span class="pre">Related</span> <span class="pre">website&lt;a/&gt;</span></code></p>
<p>The href URL is broken, the “Related website” may contains some HTML.</p>
<p>The best solution seems to ignore these results.</p>
</dd></dl>
<section id="duckduckgo-weather">
<span id="module-searx.engines.duckduckgo_weather"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">DuckDuckGo Weather</a><a class="headerlink" href="#duckduckgo-weather" title="Link to this heading"></a></h2>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="dailymotion.html" title="previous chapter">Dailymotion</a>
<li>Next: <a href="google.html" title="next chapter">Google Engines</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/duckduckgo.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,462 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Google Engines &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Lemmy" href="lemmy.html" />
<link rel="prev" title="DuckDuckGo Engines" href="duckduckgo.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="lemmy.html" title="Lemmy"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="duckduckgo.html" title="DuckDuckGo Engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Google Engines</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="google-engines">
<span id="id1"></span><h1>Google Engines<a class="headerlink" href="#google-engines" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#google-api" id="id4">Google API</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.google" id="id5">Google WEB</a></p></li>
<li><p><a class="reference internal" href="#google-autocomplete" id="id6">Google Autocomplete</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.google_images" id="id7">Google Images</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.google_videos" id="id8">Google Videos</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.google_news" id="id9">Google News</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.google_scholar" id="id10">Google Scholar</a></p></li>
</ul>
</nav>
<section id="google-api">
<span id="id2"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Google API</a><a class="headerlink" href="#google-api" title="Link to this heading"></a></h2>
<p>SearXNGs implementation of the Google API is mainly done in
<a class="reference internal" href="#searx.engines.google.get_google_info" title="searx.engines.google.get_google_info"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_google_info</span></code></a>.</p>
<p>For detailed description of the <em>REST-full</em> API see: <a class="reference external" href="https://developers.google.com/custom-search/docs/xml_results#WebSearch_Query_Parameter_Definitions">Query Parameter
Definitions</a>. The linked API documentation can sometimes be helpful during
reverse engineering. However, we cannot use it in the freely accessible WEB
services; not all parameters can be applied and some engines are more <em>special</em>
than other (e.g. <a class="reference internal" href="#google-news-engine"><span class="std std-ref">Google News</span></a>).</p>
</section>
<section id="module-searx.engines.google">
<span id="google-web"></span><span id="google-web-engine"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">Google WEB</a><a class="headerlink" href="#module-searx.engines.google" title="Link to this heading"></a></h2>
<p>This is the implementation of the Google WEB engine. Some of this
implementations (manly the <a class="reference internal" href="#searx.engines.google.get_google_info" title="searx.engines.google.get_google_info"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_google_info</span></code></a>) are shared by other
engines:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#google-images-engine"><span class="std std-ref">Google Images</span></a></p></li>
<li><p><a class="reference internal" href="#google-news-engine"><span class="std std-ref">Google News</span></a></p></li>
<li><p><a class="reference internal" href="#google-videos-engine"><span class="std std-ref">Google Videos</span></a></p></li>
<li><p><a class="reference internal" href="#google-scholar-engine"><span class="std std-ref">Google Scholar</span></a></p></li>
<li><p><a class="reference internal" href="#google-autocomplete"><span class="std std-ref">Google Autocomplete</span></a></p></li>
</ul>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">add_domains</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.12)"><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><a class="reference internal" href="../../../_modules/searx/engines/google.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages from Google.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google.get_google_info">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google.</span></span><span class="sig-name descname"><span class="pre">get_google_info</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">params</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eng_traits</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google.html#get_google_info"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google.get_google_info" title="Link to this definition"></a></dt>
<dd><p>Composing various (language) properties for the google engines (<a class="reference internal" href="#google-api"><span class="std std-ref">Google API</span></a>).</p>
<p>This function is called by the various google engines (<a class="reference internal" href="#google-web-engine"><span class="std std-ref">Google WEB</span></a>, <a class="reference internal" href="#google-images-engine"><span class="std std-ref">Google Images</span></a>, <a class="reference internal" href="#google-news-engine"><span class="std std-ref">Google News</span></a> and
<a class="reference internal" href="#google-videos-engine"><span class="std std-ref">Google Videos</span></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>param</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.12)"><em>dict</em></a>) Request parameters of the engine. At least
a <code class="docutils literal notranslate"><span class="pre">searxng_locale</span></code> key should be in the dictionary.</p></li>
<li><p><strong>eng_traits</strong> Engines traits fetched from google preferences
(<a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.enginelib.traits.EngineTraits</span></code></a>)</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.12)">dict</a></p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p><p>Py-Dictionary with the key/value pairs:</p>
<dl class="simple">
<dt>language:</dt><dd><p>The language code that is used by google (e.g. <code class="docutils literal notranslate"><span class="pre">lang_en</span></code> or
<code class="docutils literal notranslate"><span class="pre">lang_zh-TW</span></code>)</p>
</dd>
<dt>country:</dt><dd><p>The country code that is used by google (e.g. <code class="docutils literal notranslate"><span class="pre">US</span></code> or <code class="docutils literal notranslate"><span class="pre">TW</span></code>)</p>
</dd>
<dt>locale:</dt><dd><p>A instance of <a class="reference external" href="https://babel.readthedocs.io/en/latest/api/core.html#babel.core.Locale" title="(in Babel v2.2)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">babel.core.Locale</span></code></a> build from the
<code class="docutils literal notranslate"><span class="pre">searxng_locale</span></code> value.</p>
</dd>
<dt>subdomain:</dt><dd><p>Google subdomain <code class="xref py py-obj docutils literal notranslate"><span class="pre">google_domains</span></code> that fits to the country
code.</p>
</dd>
<dt>params:</dt><dd><p>Py-Dictionary with additional request arguments (can be passed to
<a class="reference external" href="https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlencode" title="(in Python v3.12)"><code class="xref py py-func docutils literal notranslate"><span class="pre">urllib.parse.urlencode()</span></code></a>).</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">hl</span></code> parameter: specifies the interface language of user interface.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">lr</span></code> parameter: restricts search results to documents written in
a particular language.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cr</span></code> parameter: restricts search results to documents
originating in a particular country.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">ie</span></code> parameter: sets the character encoding scheme that should
be used to interpret the query string (utf8).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">oe</span></code> parameter: sets the character encoding scheme that should
be used to decode the XML result (utf8).</p></li>
</ul>
</dd>
<dt>headers:</dt><dd><p>Py-Dictionary with additional HTTP headers (can be passed to
requests headers)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">Accept:</span> <span class="pre">'*/*</span></code></p></li>
</ul>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google.request" title="Link to this definition"></a></dt>
<dd><p>Google search request</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google.response" title="Link to this definition"></a></dt>
<dd><p>Get response from googles search request</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.google.UI_ASYNC">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google.</span></span><span class="sig-name descname"><span class="pre">UI_ASYNC</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'use_ac:true,_fmt:prog'</span></em><a class="headerlink" href="#searx.engines.google.UI_ASYNC" title="Link to this definition"></a></dt>
<dd><p>Format of the response from UIs async request.</p>
</dd></dl>
</section>
<section id="google-autocomplete">
<span id="id3"></span><h2><a class="toc-backref" href="#id6" role="doc-backlink">Google Autocomplete</a><a class="headerlink" href="#google-autocomplete" title="Link to this heading"></a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="searx.autocomplete.google_complete">
<span class="sig-prename descclassname"><span class="pre">searx.autocomplete.</span></span><span class="sig-name descname"><span class="pre">google_complete</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sxng_locale</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/autocomplete.html#google_complete"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.autocomplete.google_complete" title="Link to this definition"></a></dt>
<dd><p>Autocomplete from Google. Supports Googles languages and subdomains
(<a class="reference internal" href="#searx.engines.google.get_google_info" title="searx.engines.google.get_google_info"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.engines.google.get_google_info</span></code></a>) by using the async REST
API:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>https://{subdomain}/complete/search?{args}
</pre></div>
</div>
</dd></dl>
</section>
<section id="module-searx.engines.google_images">
<span id="google-images"></span><span id="google-images-engine"></span><h2><a class="toc-backref" href="#id7" role="doc-backlink">Google Images</a><a class="headerlink" href="#module-searx.engines.google_images" title="Link to this heading"></a></h2>
<p>This is the implementation of the Google Images engine using the internal
Google API used by the Google Go Android app.</p>
<p>This internal API offer results in</p>
<ul class="simple">
<li><p>JSON (<code class="docutils literal notranslate"><span class="pre">_fmt:json</span></code>)</p></li>
<li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Protocol_Buffers">Protobuf</a> (<code class="docutils literal notranslate"><span class="pre">_fmt:pb</span></code>)</p></li>
<li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Protocol_Buffers">Protobuf</a> compressed? (<code class="docutils literal notranslate"><span class="pre">_fmt:pc</span></code>)</p></li>
<li><p>HTML (<code class="docutils literal notranslate"><span class="pre">_fmt:html</span></code>)</p></li>
<li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Protocol_Buffers">Protobuf</a> encoded in JSON (<code class="docutils literal notranslate"><span class="pre">_fmt:jspb</span></code>).</p></li>
</ul>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_images.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_images.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_images.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_images.request" title="Link to this definition"></a></dt>
<dd><p>Google-Image search request</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_images.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_images.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_images.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_images.response" title="Link to this definition"></a></dt>
<dd><p>Get response from googles search request</p>
</dd></dl>
</section>
<section id="module-searx.engines.google_videos">
<span id="google-videos"></span><span id="google-videos-engine"></span><h2><a class="toc-backref" href="#id8" role="doc-backlink">Google Videos</a><a class="headerlink" href="#module-searx.engines.google_videos" title="Link to this heading"></a></h2>
<p>This is the implementation of the Google Videos engine.</p>
<div class="admonition-content-security-policy-csp admonition">
<p class="admonition-title">Content-Security-Policy (CSP)</p>
<p>This engine needs to allow images from the <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs">data URLs</a> (prefixed with the
<code class="docutils literal notranslate"><span class="pre">data:</span></code> scheme):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Header</span> <span class="nb">set</span> <span class="n">Content</span><span class="o">-</span><span class="n">Security</span><span class="o">-</span><span class="n">Policy</span> <span class="s2">&quot;img-src &#39;self&#39; data: ;&quot;</span>
</pre></div>
</div>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_videos.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_videos.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_videos.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_videos.request" title="Link to this definition"></a></dt>
<dd><p>Google-Video search request</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_videos.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_videos.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_videos.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_videos.response" title="Link to this definition"></a></dt>
<dd><p>Get response from googles search request</p>
</dd></dl>
</section>
<section id="module-searx.engines.google_news">
<span id="google-news"></span><span id="google-news-engine"></span><h2><a class="toc-backref" href="#id9" role="doc-backlink">Google News</a><a class="headerlink" href="#module-searx.engines.google_news" title="Link to this heading"></a></h2>
<p>This is the implementation of the Google News engine.</p>
<p>Google News has a different region handling compared to Google WEB.</p>
<ul class="simple">
<li><p>the <code class="docutils literal notranslate"><span class="pre">ceid</span></code> argument has to be set (<a class="reference internal" href="#searx.engines.google_news.ceid_list" title="searx.engines.google_news.ceid_list"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceid_list</span></code></a>)</p></li>
<li><p>the <a class="reference external" href="https://developers.google.com/custom-search/docs/xml_results#hlsp">hl</a> argument has to be set correctly (and different to Google WEB)</p></li>
<li><p>the <a class="reference external" href="https://developers.google.com/custom-search/docs/xml_results#glsp">gl</a> argument is mandatory</p></li>
</ul>
<p>If one of this argument is not set correctly, the request is redirected to
CONSENT dialog:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>https://consent.google.com/m?continue=
</pre></div>
</div>
<p>The google news API ignores some parameters from the common <a class="reference internal" href="#google-api"><span class="std std-ref">Google API</span></a>:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://developers.google.com/custom-search/docs/xml_results#numsp">num</a> : the number of search results is ignored / there is no paging all
results for a query term are in the first response.</p></li>
<li><p><a class="reference external" href="https://developers.google.com/custom-search/docs/xml_results#safesp">save</a> : is ignored / Google-News results are always <em>SafeSearch</em></p></li>
</ul>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_news.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_news.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_news.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_news.request" title="Link to this definition"></a></dt>
<dd><p>Google-News search request</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_news.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_news.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_news.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_news.response" title="Link to this definition"></a></dt>
<dd><p>Get response from googles search request</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.google_news.ceid_list">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_news.</span></span><span class="sig-name descname"><span class="pre">ceid_list</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['AE:ar',</span> <span class="pre">'AR:es-419',</span> <span class="pre">'AT:de',</span> <span class="pre">'AU:en',</span> <span class="pre">'BD:bn',</span> <span class="pre">'BE:fr',</span> <span class="pre">'BE:nl',</span> <span class="pre">'BG:bg',</span> <span class="pre">'BR:pt-419',</span> <span class="pre">'BW:en',</span> <span class="pre">'CA:en',</span> <span class="pre">'CA:fr',</span> <span class="pre">'CH:de',</span> <span class="pre">'CH:fr',</span> <span class="pre">'CL:es-419',</span> <span class="pre">'CN:zh-Hans',</span> <span class="pre">'CO:es-419',</span> <span class="pre">'CU:es-419',</span> <span class="pre">'CZ:cs',</span> <span class="pre">'DE:de',</span> <span class="pre">'EG:ar',</span> <span class="pre">'ES:es',</span> <span class="pre">'ET:en',</span> <span class="pre">'FR:fr',</span> <span class="pre">'GB:en',</span> <span class="pre">'GH:en',</span> <span class="pre">'GR:el',</span> <span class="pre">'HK:zh-Hant',</span> <span class="pre">'HU:hu',</span> <span class="pre">'ID:en',</span> <span class="pre">'ID:id',</span> <span class="pre">'IE:en',</span> <span class="pre">'IL:en',</span> <span class="pre">'IL:he',</span> <span class="pre">'IN:bn',</span> <span class="pre">'IN:en',</span> <span class="pre">'IN:hi',</span> <span class="pre">'IN:ml',</span> <span class="pre">'IN:mr',</span> <span class="pre">'IN:ta',</span> <span class="pre">'IN:te',</span> <span class="pre">'IT:it',</span> <span class="pre">'JP:ja',</span> <span class="pre">'KE:en',</span> <span class="pre">'KR:ko',</span> <span class="pre">'LB:ar',</span> <span class="pre">'LT:lt',</span> <span class="pre">'LV:en',</span> <span class="pre">'LV:lv',</span> <span class="pre">'MA:fr',</span> <span class="pre">'MX:es-419',</span> <span class="pre">'MY:en',</span> <span class="pre">'NA:en',</span> <span class="pre">'NG:en',</span> <span class="pre">'NL:nl',</span> <span class="pre">'NO:no',</span> <span class="pre">'NZ:en',</span> <span class="pre">'PE:es-419',</span> <span class="pre">'PH:en',</span> <span class="pre">'PK:en',</span> <span class="pre">'PL:pl',</span> <span class="pre">'PT:pt-150',</span> <span class="pre">'RO:ro',</span> <span class="pre">'RS:sr',</span> <span class="pre">'RU:ru',</span> <span class="pre">'SA:ar',</span> <span class="pre">'SE:sv',</span> <span class="pre">'SG:en',</span> <span class="pre">'SI:sl',</span> <span class="pre">'SK:sk',</span> <span class="pre">'SN:fr',</span> <span class="pre">'TH:th',</span> <span class="pre">'TR:tr',</span> <span class="pre">'TW:zh-Hant',</span> <span class="pre">'TZ:en',</span> <span class="pre">'UA:ru',</span> <span class="pre">'UA:uk',</span> <span class="pre">'UG:en',</span> <span class="pre">'US:en',</span> <span class="pre">'US:es-419',</span> <span class="pre">'VE:es-419',</span> <span class="pre">'VN:vi',</span> <span class="pre">'ZA:en',</span> <span class="pre">'ZW:en']</span></em><a class="headerlink" href="#searx.engines.google_news.ceid_list" title="Link to this definition"></a></dt>
<dd><p>List of region/language combinations supported by Google News. Values of the
<code class="docutils literal notranslate"><span class="pre">ceid</span></code> argument of the Google News REST API.</p>
</dd></dl>
</section>
<section id="module-searx.engines.google_scholar">
<span id="google-scholar"></span><span id="google-scholar-engine"></span><h2><a class="toc-backref" href="#id10" role="doc-backlink">Google Scholar</a><a class="headerlink" href="#module-searx.engines.google_scholar" title="Link to this heading"></a></h2>
<p>This is the implementation of the Google Scholar engine.</p>
<p>Compared to other Google services the Scholar engine has a simple GET REST-API
and there does not exists <cite>async</cite> API. Even though the API slightly vintage we
can make use of the <a class="reference internal" href="#google-api"><span class="std std-ref">Google API</span></a> to assemble the arguments of the GET
request.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_scholar.detect_google_captcha">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_scholar.</span></span><span class="sig-name descname"><span class="pre">detect_google_captcha</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dom</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_scholar.html#detect_google_captcha"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_scholar.detect_google_captcha" title="Link to this definition"></a></dt>
<dd><p>In case of CAPTCHA Google Scholar open its own <em>not a Robot</em> dialog and is
not redirected to <code class="docutils literal notranslate"><span class="pre">sorry.google.com</span></code>.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_scholar.parse_gs_a">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_scholar.</span></span><span class="sig-name descname"><span class="pre">parse_gs_a</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</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.12)"><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.12)"><span class="pre">None</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_scholar.html#parse_gs_a"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_scholar.parse_gs_a" title="Link to this definition"></a></dt>
<dd><p>Parse the text written in green.</p>
<p>Possible formats:
* “{authors} - {journal}, {year} - {publisher}”
* “{authors} - {year} - {publisher}”
* “{authors} - {publisher}”</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_scholar.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_scholar.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_scholar.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_scholar.request" title="Link to this definition"></a></dt>
<dd><p>Google-Scholar search request</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_scholar.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_scholar.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_scholar.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_scholar.response" title="Link to this definition"></a></dt>
<dd><p>Parse response from Google Scholar</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.google_scholar.time_range_args">
<span class="sig-prename descclassname"><span class="pre">searx.engines.google_scholar.</span></span><span class="sig-name descname"><span class="pre">time_range_args</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_scholar.html#time_range_args"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_scholar.time_range_args" title="Link to this definition"></a></dt>
<dd><p>Returns a dictionary with a time range arguments based on
<code class="docutils literal notranslate"><span class="pre">params['time_range']</span></code>.</p>
<p>Google Scholar supports a detailed search by year. Searching by <em>last
month</em> or <em>last week</em> (as offered by SearXNG) is uncommon for scientific
publications and is not supported by Google Scholar.</p>
<p>To limit the result list when the users selects a range, all the SearXNG
ranges (<em>day</em>, <em>week</em>, <em>month</em>, <em>year</em>) are mapped to <em>year</em>. If no range
is set an empty dictionary of arguments is returned. Example; when
user selects a time range (current year minus one in 2022):</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> <span class="s1">&#39;as_ylo&#39;</span> <span class="p">:</span> <span class="mi">2021</span> <span class="p">}</span>
</pre></div>
</div>
</dd></dl>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="duckduckgo.html" title="previous chapter">DuckDuckGo Engines</a>
<li>Next: <a href="lemmy.html" title="next chapter">Lemmy</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/google.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,239 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Lemmy &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Library of Congress" href="loc.html" />
<link rel="prev" title="Google Engines" href="google.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="loc.html" title="Library of Congress"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="google.html" title="Google Engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Lemmy</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="lemmy">
<span id="lemmy-engine"></span><h1>Lemmy<a class="headerlink" href="#lemmy" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id2">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.lemmy">This engine uses the Lemmy API (<a class="reference external" href="https://lemmy.ml/api/v3/search">https://lemmy.ml/api/v3/search</a>), which is
documented at <a class="reference external" href="https://join-lemmy.org/api/modules.html">lemmy-js-client</a> / <a class="reference external" href="https://join-lemmy.org/api/interfaces/Search.html">Interface Search</a>. Since Lemmy is
federated, results are from many different, independent lemmy instances, and not
only the official one.</p>
<section id="configuration">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The engine has the following additional settings:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.lemmy.base_url" title="searx.engines.lemmy.base_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.lemmy.lemmy_type" title="searx.engines.lemmy.lemmy_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lemmy_type</span></code></a></p></li>
</ul>
<p>This implementation is used by different lemmy engines in the <a class="reference internal" href="../../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">settings.yml</span></a>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">lemmy communities</span>
<span class="w"> </span><span class="nt">lemmy_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Communities</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">lemmy users</span>
<span class="w"> </span><span class="nt">lemmy_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Users</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">lemmy posts</span>
<span class="w"> </span><span class="nt">lemmy_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Posts</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">lemmy comments</span>
<span class="w"> </span><span class="nt">lemmy_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Comments</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.lemmy.base_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.lemmy.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://lemmy.ml/'</span></em><a class="headerlink" href="#searx.engines.lemmy.base_url" title="Link to this definition"></a></dt>
<dd><p>By default, <a class="reference external" href="https://lemmy.ml">https://lemmy.ml</a> is used for providing the results. If you want
to use a different lemmy instance, you can specify <code class="docutils literal notranslate"><span class="pre">base_url</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.lemmy.lemmy_type">
<span class="sig-prename descclassname"><span class="pre">searx.engines.lemmy.</span></span><span class="sig-name descname"><span class="pre">lemmy_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'Communities'</span></em><a class="headerlink" href="#searx.engines.lemmy.lemmy_type" title="Link to this definition"></a></dt>
<dd><p>Any of <code class="docutils literal notranslate"><span class="pre">Communities</span></code>, <code class="docutils literal notranslate"><span class="pre">Users</span></code>, <code class="docutils literal notranslate"><span class="pre">Posts</span></code>, <code class="docutils literal notranslate"><span class="pre">Comments</span></code></p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="google.html" title="previous chapter">Google Engines</a>
<li>Next: <a href="loc.html" title="next chapter">Library of Congress</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/lemmy.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

196
dev/engines/online/loc.html Normal file
View file

@ -0,0 +1,196 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Library of Congress &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Mastodon" href="mastodon.html" />
<link rel="prev" title="Lemmy" href="lemmy.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="mastodon.html" title="Mastodon"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="lemmy.html" title="Lemmy"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Library of Congress</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="library-of-congress">
<span id="loc-engine"></span><h1>Library of Congress<a class="headerlink" href="#library-of-congress" title="Link to this heading"></a></h1>
<p id="module-searx.engines.loc">Library of Congress: query Photo, Print and Drawing from API <a class="reference external" href="https://www.loc.gov/apis/json-and-yaml/requests/endpoints/">endpoint</a>
<code class="docutils literal notranslate"><span class="pre">photos</span></code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Beside the <code class="docutils literal notranslate"><span class="pre">photos</span></code> <a class="reference external" href="https://www.loc.gov/apis/json-and-yaml/requests/endpoints/">endpoint</a> there are more endpoints available / we are
looking forward for contributions implementing more endpoints.</p>
</div>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="lemmy.html" title="previous chapter">Lemmy</a>
<li>Next: <a href="mastodon.html" title="next chapter">Mastodon</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/loc.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,197 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mastodon &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Moviepilot" href="moviepilot.html" />
<link rel="prev" title="Library of Congress" href="loc.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="moviepilot.html" title="Moviepilot"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="loc.html" title="Library of Congress"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Mastodon</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="mastodon">
<span id="mastodon-engine"></span><h1>Mastodon<a class="headerlink" href="#mastodon" title="Link to this heading"></a></h1>
<p id="module-searx.engines.mastodon"><a class="reference external" href="https://mastodon.social">Mastodon</a> is an open source alternative to large social media platforms like
Twitter/X, Facebook, …</p>
<p>Since its federated and self-hostable, theres a large amount of available
instances, which can be chosen instead by modifying <code class="docutils literal notranslate"><span class="pre">base_url</span></code>.</p>
<p>We use their official <a class="reference external" href="https://docs.joinmastodon.org/api/">API</a> for searching, but unfortunately, their Search <a class="reference external" href="https://docs.joinmastodon.org/api/">API</a>
forbids pagination without OAuth.</p>
<p>Thats why we use tootfinder.ch for finding posts, which doesnt support searching
for users, accounts or other types of content on Mastodon however.</p>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="loc.html" title="previous chapter">Library of Congress</a>
<li>Next: <a href="moviepilot.html" title="next chapter">Moviepilot</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/mastodon.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,212 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Moviepilot &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Matrix Rooms Search (MRS)" href="mrs.html" />
<link rel="prev" title="Mastodon" href="mastodon.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="mrs.html" title="Matrix Rooms Search (MRS)"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="mastodon.html" title="Mastodon"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Moviepilot</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="moviepilot">
<span id="moviepilot-engine"></span><h1>Moviepilot<a class="headerlink" href="#moviepilot" title="Link to this heading"></a></h1>
<p id="module-searx.engines.moviepilot">Moviepilot is a German movie database, similar to IMDB or TMDB. It doesnt
have any official API, but it uses JSON requests internally to fetch search
results and suggestions, thats being used in this implementation.</p>
<p>Moviepilot additionally allows to discover movies by certain categories
or filters, hence we provide the following syntax:</p>
<ul class="simple">
<li><p>Any normal search query -&gt; Fetch search results by the query</p></li>
<li><p>A query containing one of the category identifiers <code class="docutils literal notranslate"><span class="pre">fsk</span></code>, <code class="docutils literal notranslate"><span class="pre">genre</span></code>,
<code class="docutils literal notranslate"><span class="pre">jahr</span></code>, <code class="docutils literal notranslate"><span class="pre">jahrzent</span></code>, <code class="docutils literal notranslate"><span class="pre">land</span></code>, <code class="docutils literal notranslate"><span class="pre">online</span></code>, <code class="docutils literal notranslate"><span class="pre">stimmung</span></code> will be used to
search trending items by the provided filters, which are appended to the
filter category after a <code class="docutils literal notranslate"><span class="pre">-</span></code>.</p></li>
</ul>
<p>Search examples:</p>
<ul class="simple">
<li><p>Normal: <code class="docutils literal notranslate"><span class="pre">!mp</span> <span class="pre">Tom</span> <span class="pre">Cruise</span></code></p></li>
<li><p>By filter: <code class="docutils literal notranslate"><span class="pre">!mp</span> <span class="pre">person-Ryan-Gosling</span></code></p></li>
<li><p>By filter: <code class="docutils literal notranslate"><span class="pre">!mp</span> <span class="pre">fsk-0</span> <span class="pre">land-deutschland</span> <span class="pre">genre-actionfilm</span></code></p></li>
<li><p>By filter: <code class="docutils literal notranslate"><span class="pre">!mp</span> <span class="pre">jahrzehnt-2020er</span> <span class="pre">online-netflix</span></code></p></li>
</ul>
<p>For a list of all public filters, observe the url path when browsing</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.moviepilot.de/filme/beste">https://www.moviepilot.de/filme/beste</a>.</p></li>
</ul>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="mastodon.html" title="previous chapter">Mastodon</a>
<li>Next: <a href="mrs.html" title="next chapter">Matrix Rooms Search (MRS)</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/moviepilot.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

220
dev/engines/online/mrs.html Normal file
View file

@ -0,0 +1,220 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Matrix Rooms Search (MRS) &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Mwmbl Engine" href="mwmbl.html" />
<link rel="prev" title="Moviepilot" href="moviepilot.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="mwmbl.html" title="Mwmbl Engine"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="moviepilot.html" title="Moviepilot"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Matrix Rooms Search (MRS)</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="matrix-rooms-search-mrs">
<span id="mrs-engine"></span><h1>Matrix Rooms Search (MRS)<a class="headerlink" href="#matrix-rooms-search-mrs" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li>
<li><p><a class="reference internal" href="#implementation" id="id2">Implementation</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.mrs">Matrix Rooms Search - a fully-featured, standalone, matrix rooms search service.</p>
<section id="configuration">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The engine has the following mandatory settings:</p>
<ul class="simple">
<li><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></p></li>
</ul>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">MRS</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mrs</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://mrs-host</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</pre></div>
</div>
</section>
<section id="implementation">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Implementation</a><a class="headerlink" href="#implementation" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.mrs.init">
<span class="sig-prename descclassname"><span class="pre">searx.engines.mrs.</span></span><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">engine_settings</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/mrs.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.mrs.init" title="Link to this definition"></a></dt>
<dd><p>The <code class="docutils literal notranslate"><span class="pre">base_url</span></code> must be set in the configuration, if <code class="docutils literal notranslate"><span class="pre">base_url</span></code> is not
set, a <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.12)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ValueError</span></code></a> is raised during initialization.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="moviepilot.html" title="previous chapter">Moviepilot</a>
<li>Next: <a href="mwmbl.html" title="next chapter">Mwmbl Engine</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/mrs.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,216 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mwmbl Engine &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Odysee" href="odysee.html" />
<link rel="prev" title="Matrix Rooms Search (MRS)" href="mrs.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="odysee.html" title="Odysee"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="mrs.html" title="Matrix Rooms Search (MRS)"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Mwmbl Engine</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="mwmbl-engine">
<span id="id1"></span><h1>Mwmbl Engine<a class="headerlink" href="#mwmbl-engine" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#module-searx.engines.mwmbl" id="id3">Mwmbl WEB</a></p></li>
<li><p><a class="reference internal" href="#mwmbl-autocomplete" id="id4">Mwmbl Autocomplete</a></p></li>
</ul>
</nav>
<section id="module-searx.engines.mwmbl">
<span id="mwmbl-web"></span><span id="mwmbl-web-engine"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Mwmbl WEB</a><a class="headerlink" href="#module-searx.engines.mwmbl" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/mwmbl/mwmbl">Mwmbl</a> is a non-profit, ad-free, free-libre and free-lunch search engine with
a focus on useability and speed.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>At the moment it is little more than an idea together with a proof of concept
implementation of the web front-end and search technology on a small index.
<a class="reference external" href="https://github.com/mwmbl/mwmbl">Mwmbl</a> does not support regions, languages, safe-search or time range.
search.</p>
</div>
</section>
<section id="mwmbl-autocomplete">
<span id="id2"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Mwmbl Autocomplete</a><a class="headerlink" href="#mwmbl-autocomplete" title="Link to this heading"></a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="searx.autocomplete.mwmbl">
<span class="sig-prename descclassname"><span class="pre">searx.autocomplete.</span></span><span class="sig-name descname"><span class="pre">mwmbl</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">_lang</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/autocomplete.html#mwmbl"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.autocomplete.mwmbl" title="Link to this definition"></a></dt>
<dd><p>Autocomplete from <a class="reference external" href="https://github.com/mwmbl/mwmbl">Mwmbl</a>.</p>
</dd></dl>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="mrs.html" title="previous chapter">Matrix Rooms Search (MRS)</a>
<li>Next: <a href="odysee.html" title="next chapter">Odysee</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/mwmbl.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,196 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Odysee &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Peertube Engines" href="peertube.html" />
<link rel="prev" title="Mwmbl Engine" href="mwmbl.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="peertube.html" title="Peertube Engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="mwmbl.html" title="Mwmbl Engine"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Odysee</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="odysee">
<span id="odysee-engine"></span><h1>Odysee<a class="headerlink" href="#odysee" title="Link to this heading"></a></h1>
<p id="module-searx.engines.odysee"><a class="reference external" href="https://github.com/OdyseeTeam/odysee-frontend">Odysee</a> is a decentralized video hosting platform.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.odysee.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.odysee.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/odysee.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.odysee.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages from Odysees source code.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="mwmbl.html" title="previous chapter">Mwmbl Engine</a>
<li>Next: <a href="peertube.html" title="next chapter">Peertube Engines</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/odysee.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,239 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Peertube Engines &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Piped" href="piped.html" />
<link rel="prev" title="Odysee" href="odysee.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="piped.html" title="Piped"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="odysee.html" title="Odysee"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Peertube Engines</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="peertube-engines">
<span id="id1"></span><h1>Peertube Engines<a class="headerlink" href="#peertube-engines" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#module-searx.engines.peertube" id="id2">Peertube Video</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.sepiasearch" id="id3">SepiaSearch</a></p></li>
</ul>
</nav>
<section id="module-searx.engines.peertube">
<span id="peertube-video"></span><span id="peertube-video-engine"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Peertube Video</a><a class="headerlink" href="#module-searx.engines.peertube" title="Link to this heading"></a></h2>
<p>Peertube and <a class="reference internal" href="#module-searx.engines.sepiasearch" title="searx.engines.sepiasearch"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SepiaSearch</span></code></a> do share
(more or less) the same REST API and the schema of the JSON result is identical.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.peertube.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.peertube.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/peertube.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.peertube.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages from peertubes search-index source code.</p>
<p>See <a class="reference external" href="https://framagit.org/framasoft/peertube/search-index/-/commit/8ed5c729#3d8747f9a60695c367c70bb64efba8f403721fad_0_291">videoLanguages</a> in commit <a class="reference external" href="https://framagit.org/framasoft/peertube/search-index/-/commit/8ed5c729">8ed5c729 - Refactor and redesign client</a></p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.peertube.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.peertube.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/peertube.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.peertube.request" title="Link to this definition"></a></dt>
<dd><p>Assemble request for the Peertube API</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.peertube.video_response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.peertube.</span></span><span class="sig-name descname"><span class="pre">video_response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/peertube.html#video_response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.peertube.video_response" title="Link to this definition"></a></dt>
<dd><p>Parse video response from SepiaSearch and Peertube instances.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.peertube.base_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.peertube.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://peer.tube'</span></em><a class="headerlink" href="#searx.engines.peertube.base_url" title="Link to this definition"></a></dt>
<dd><p>Base URL of the Peertube instance. A list of instances is available at:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://instances.joinpeertube.org/instances">https://instances.joinpeertube.org/instances</a></p></li>
</ul>
</dd></dl>
</section>
<section id="module-searx.engines.sepiasearch">
<span id="sepiasearch"></span><span id="sepiasearch-engine"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">SepiaSearch</a><a class="headerlink" href="#module-searx.engines.sepiasearch" title="Link to this heading"></a></h2>
<p>SepiaSearch uses the same languages as <a class="reference internal" href="#module-searx.engines.peertube" title="searx.engines.peertube"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Peertube</span></code></a> and the response is identical to the response from the
peertube engines.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.sepiasearch.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.sepiasearch.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/sepiasearch.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.sepiasearch.request" title="Link to this definition"></a></dt>
<dd><p>Assemble request for the SepiaSearch API</p>
</dd></dl>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="odysee.html" title="previous chapter">Odysee</a>
<li>Next: <a href="piped.html" title="next chapter">Piped</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/peertube.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,257 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Piped &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Qwant" href="qwant.html" />
<link rel="prev" title="Peertube Engines" href="peertube.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="qwant.html" title="Qwant"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="peertube.html" title="Peertube Engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Piped</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="piped">
<span id="piped-engine"></span><h1>Piped<a class="headerlink" href="#piped" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li>
<li><p><a class="reference internal" href="#known-quirks" id="id2">Known Quirks</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.piped">An alternative privacy-friendly YouTube frontend which is efficient by
design. <a class="reference external" href="https://docs.piped.video/docs/architecture/">Pipeds architecture</a> consists of 3 components:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.piped.backend_url" title="searx.engines.piped.backend_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">backend</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.piped.frontend_url" title="searx.engines.piped.frontend_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">frontend</span></code></a></p></li>
<li><p>proxy</p></li>
</ul>
<section id="configuration">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The <a class="reference internal" href="#searx.engines.piped.backend_url" title="searx.engines.piped.backend_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">backend_url</span></code></a> and <a class="reference internal" href="#searx.engines.piped.frontend_url" title="searx.engines.piped.frontend_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">frontend_url</span></code></a> has to be set in the engine
named <cite>piped</cite> and are used by all piped engines</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">piped</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">piped</span>
<span class="w"> </span><span class="nt">piped_filter</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">videos</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="nt">frontend_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://..</span>
<span class="w"> </span><span class="nt">backend_url</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://..</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://..</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">piped.music</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">piped</span>
<span class="w"> </span><span class="nt">network</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">piped</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ppdm</span>
<span class="w"> </span><span class="nt">piped_filter</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">music_songs</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</pre></div>
</div>
</section>
<section id="known-quirks">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Known Quirks</a><a class="headerlink" href="#known-quirks" title="Link to this heading"></a></h2>
<p>The implementation to support <a class="reference internal" href="../enginelib.html#searx.enginelib.Engine.paging" title="searx.enginelib.Engine.paging"><code class="xref py py-obj docutils literal notranslate"><span class="pre">paging</span></code></a>
is based on the <em>nextpage</em> method of Pipeds REST API / the <a class="reference internal" href="#searx.engines.piped.frontend_url" title="searx.engines.piped.frontend_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">frontend</span>
<span class="pre">API</span></code></a>. This feature is <em>next page driven</em> and plays well with the
<a class="reference internal" href="../../../admin/settings/settings_ui.html#settings-ui"><span class="std std-ref">infinite_scroll</span></a> setting in SearXNG but it does not really
fit into SearXNGs UI to select a page by number.</p>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.piped.backend_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.piped.</span></span><span class="sig-name descname"><span class="pre">backend_url</span></span><em 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.12)"><span class="pre">list</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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://pipedapi.kavin.rocks'</span></em><a class="headerlink" href="#searx.engines.piped.backend_url" title="Link to this definition"></a></dt>
<dd><p><a class="reference external" href="https://github.com/TeamPiped/Piped-Backend">Piped-Backend</a>: The core component behind Piped. The value is an URL or a
list of URLs. In the latter case instance will be selected randomly. For a
complete list of official instances see Piped-Instances (<a class="reference external" href="https://piped-instances.kavin.rocks/">JSON</a>)</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.piped.frontend_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.piped.</span></span><span class="sig-name descname"><span class="pre">frontend_url</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://piped.video'</span></em><a class="headerlink" href="#searx.engines.piped.frontend_url" title="Link to this definition"></a></dt>
<dd><p><a class="reference external" href="https://github.com/TeamPiped/Piped">Piped-Frontend</a>: URL to use as link and for embeds.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.piped.piped_filter">
<span class="sig-prename descclassname"><span class="pre">searx.engines.piped.</span></span><span class="sig-name descname"><span class="pre">piped_filter</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'all'</span></em><a class="headerlink" href="#searx.engines.piped.piped_filter" title="Link to this definition"></a></dt>
<dd><p>Content filter <code class="docutils literal notranslate"><span class="pre">music_songs</span></code> or <code class="docutils literal notranslate"><span class="pre">videos</span></code></p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="peertube.html" title="previous chapter">Peertube Engines</a>
<li>Next: <a href="qwant.html" title="next chapter">Qwant</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/piped.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,272 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Qwant &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="RadioBrowser" href="radio_browser.html" />
<link rel="prev" title="Piped" href="piped.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="radio_browser.html" title="RadioBrowser"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="piped.html" title="Piped"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Qwant</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="qwant">
<span id="qwant-engine"></span><h1>Qwant<a class="headerlink" href="#qwant" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id2">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.qwant">This engine uses the Qwant API (<a class="reference external" href="https://api.qwant.com/v3">https://api.qwant.com/v3</a>) to implement Qwant
-Web, -News, -Images and -Videos. The API is undocumented but can be reverse
engineered by reading the network log of <a class="reference external" href="https://www.qwant.com/">https://www.qwant.com/</a> queries.</p>
<p>For Qwants <em>web-search</em> two alternatives are implemented:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">web</span></code>: uses the <a class="reference internal" href="#searx.engines.qwant.api_url" title="searx.engines.qwant.api_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_url</span></code></a> which returns a JSON structure</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">web-lite</span></code>: uses the <a class="reference internal" href="#searx.engines.qwant.web_lite_url" title="searx.engines.qwant.web_lite_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">web_lite_url</span></code></a> which returns a HTML page</p></li>
</ul>
<section id="configuration">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The engine has the following additional settings:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.qwant.qwant_categ" title="searx.engines.qwant.qwant_categ"><code class="xref py py-obj docutils literal notranslate"><span class="pre">qwant_categ</span></code></a></p></li>
</ul>
<p>This implementation is used by different qwant engines in the <a class="reference internal" href="../../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">settings.yml</span></a>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant</span>
<span class="w"> </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">web-lite</span><span class="w"> </span><span class="c1"># alternatively use &#39;web&#39;</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant news</span>
<span class="w"> </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">news</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant images</span>
<span class="w"> </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">images</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant videos</span>
<span class="w"> </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">videos</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.qwant.parse_web_api">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">parse_web_api</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/qwant.html#parse_web_api"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.qwant.parse_web_api" title="Link to this definition"></a></dt>
<dd><p>Parse results from Qwants API</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.qwant.parse_web_lite">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">parse_web_lite</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/qwant.html#parse_web_lite"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.qwant.parse_web_lite" title="Link to this definition"></a></dt>
<dd><p>Parse results from Qwant-Lite</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.qwant.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/qwant.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.qwant.request" title="Link to this definition"></a></dt>
<dd><p>Qwant search request</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.qwant.api_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">api_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://api.qwant.com/v3/search/'</span></em><a class="headerlink" href="#searx.engines.qwant.api_url" title="Link to this definition"></a></dt>
<dd><p>URL of Qwants API (JSON)</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.qwant.max_page">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">max_page</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">5</span></em><a class="headerlink" href="#searx.engines.qwant.max_page" title="Link to this definition"></a></dt>
<dd><p>5 pages maximum (<code class="docutils literal notranslate"><span class="pre">&amp;p=5</span></code>): Trying to do more just results in an improper
redirect</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.qwant.qwant_categ">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">qwant_categ</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.qwant.qwant_categ" title="Link to this definition"></a></dt>
<dd><p>One of <code class="docutils literal notranslate"><span class="pre">web-lite</span></code> (or <code class="docutils literal notranslate"><span class="pre">web</span></code>), <code class="docutils literal notranslate"><span class="pre">news</span></code>, <code class="docutils literal notranslate"><span class="pre">images</span></code> or <code class="docutils literal notranslate"><span class="pre">videos</span></code></p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.qwant.web_lite_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">web_lite_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://lite.qwant.com/'</span></em><a class="headerlink" href="#searx.engines.qwant.web_lite_url" title="Link to this definition"></a></dt>
<dd><p>URL of Qwant-Lite (HTML)</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="piped.html" title="previous chapter">Piped</a>
<li>Next: <a href="radio_browser.html" title="next chapter">RadioBrowser</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/qwant.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,222 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>RadioBrowser &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Recoll Engine" href="recoll.html" />
<link rel="prev" title="Qwant" href="qwant.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="recoll.html" title="Recoll Engine"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="qwant.html" title="Qwant"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">RadioBrowser</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="radiobrowser">
<span id="radiobrowser-engine"></span><h1>RadioBrowser<a class="headerlink" href="#radiobrowser" title="Link to this heading"></a></h1>
<p id="module-searx.engines.radio_browser">Search radio stations from RadioBrowser by <a class="reference external" href="https://de1.api.radio-browser.info/#Advanced_station_search">Advanced station search API</a>.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.radio_browser.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.radio_browser.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/radio_browser.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.radio_browser.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages and countrycodes from RadioBrowser</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">traits.languages</span></code>: <a class="reference external" href="https://de1.api.radio-browser.info/#List_of_languages">list of languages API</a></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">traits.custom['countrycodes']</span></code>: <a class="reference external" href="https://de1.api.radio-browser.info/#List_of_countries">list of countries API</a></p></li>
</ul>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.radio_browser.station_filters">
<span class="sig-prename descclassname"><span class="pre">searx.engines.radio_browser.</span></span><span class="sig-name descname"><span class="pre">station_filters</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">[]</span></em><a class="headerlink" href="#searx.engines.radio_browser.station_filters" title="Link to this definition"></a></dt>
<dd><p>A list of filters to be applied to the search of radio stations. By default
none filters are applied. Valid filters are:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">language</span></code></dt><dd><p>Filter stations by selected language. For instance the <code class="docutils literal notranslate"><span class="pre">de</span></code> from <code class="docutils literal notranslate"><span class="pre">:de-AU</span></code>
will be translated to <cite>german</cite> and used in the argument <code class="docutils literal notranslate"><span class="pre">language=</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">countrycode</span></code></dt><dd><p>Filter stations by selected country. The 2-digit countrycode of the station
comes from the region the user selected. For instance <code class="docutils literal notranslate"><span class="pre">:de-AU</span></code> will filter
out all stations not in <code class="docutils literal notranslate"><span class="pre">AU</span></code>.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>RadioBrowser has registered a lot of languages and countrycodes unknown to
<code class="xref py py-obj docutils literal notranslate"><span class="pre">babel</span></code> and note that when searching for radio stations, users are
more likely to search by name than by region or language.</p>
</div>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="qwant.html" title="previous chapter">Qwant</a>
<li>Next: <a href="recoll.html" title="next chapter">Recoll Engine</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/radio_browser.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,239 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Recoll Engine &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Seekr Engines" href="seekr.html" />
<link rel="prev" title="RadioBrowser" href="radio_browser.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="seekr.html" title="Seekr Engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="radio_browser.html" title="RadioBrowser"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Recoll Engine</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="recoll-engine">
<span id="engine-recoll"></span><h1>Recoll Engine<a class="headerlink" href="#recoll-engine" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li>
<li><p><a class="reference internal" href="#example" id="id2">Example</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li>
</ul>
</nav>
<aside class="sidebar" id="module-searx.engines.recoll">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.lesbonscomptes.com/recoll/">Recoll</a></p></li>
<li><p><a class="reference external" href="https://framagit.org/medoc92/recollwebui.git">recoll-webui</a></p></li>
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/recoll.py">git://searx/engines/recoll.py</a></p></li>
</ul>
</aside>
<p><a class="reference external" href="https://www.lesbonscomptes.com/recoll/">Recoll</a> is a desktop full-text search tool based on Xapian. By itself <a class="reference external" href="https://www.lesbonscomptes.com/recoll/">Recoll</a>
does not offer WEB or API access, this can be achieved using <a class="reference external" href="https://framagit.org/medoc92/recollwebui.git">recoll-webui</a></p>
<section id="configuration">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>You must configure the following settings:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">base_url</span></code>:</dt><dd><p>Location where recoll-webui can be reached.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">mount_prefix</span></code>:</dt><dd><p>Location where the file hierarchy is mounted on your <em>local</em> filesystem.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">dl_prefix</span></code>:</dt><dd><p>Location where the file hierarchy as indexed by recoll can be reached.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">search_dir</span></code>:</dt><dd><p>Part of the indexed file hierarchy to be search, if empty the full domain is
searched.</p>
</dd>
</dl>
</section>
<section id="example">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Example</a><a class="headerlink" href="#example" title="Link to this heading"></a></h2>
<p>Scenario:</p>
<ol class="arabic simple">
<li><p>Recoll indexes a local filesystem mounted in <code class="docutils literal notranslate"><span class="pre">/export/documents/reference</span></code>,</p></li>
<li><p>the Recoll search interface can be reached at <a class="reference external" href="https://recoll.example.org/">https://recoll.example.org/</a> and</p></li>
<li><p>the contents of this filesystem can be reached though <a class="reference external" href="https://download.example.org/reference">https://download.example.org/reference</a></p></li>
</ol>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://recoll.example.org/</span>
<span class="nt">mount_prefix</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/export/documents</span>
<span class="nt">dl_prefix</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://download.example.org</span>
<span class="nt">search_dir</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;&#39;</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="radio_browser.html" title="previous chapter">RadioBrowser</a>
<li>Next: <a href="seekr.html" title="next chapter">Seekr Engines</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/recoll.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,243 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Seekr Engines &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Startpage Engines" href="startpage.html" />
<link rel="prev" title="Recoll Engine" href="recoll.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="startpage.html" title="Startpage Engines"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="recoll.html" title="Recoll Engine"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Seekr Engines</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="seekr-engines">
<span id="seekr-engine"></span><h1>Seekr Engines<a class="headerlink" href="#seekr-engines" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li>
<li><p><a class="reference internal" href="#known-quirks" id="id2">Known Quirks</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.seekr">seekr.com Seeker Score</p>
<p>Seekr is a privately held search and content evaluation engine that prioritizes
credibility over popularity.</p>
<section id="configuration">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The engine has the following additional settings:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.seekr.seekr_category" title="searx.engines.seekr.seekr_category"><code class="xref py py-obj docutils literal notranslate"><span class="pre">seekr_category</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.seekr.api_key" title="searx.engines.seekr.api_key"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_key</span></code></a></p></li>
</ul>
<p>This implementation is used by seekr engines in the <a class="reference internal" href="../../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">settings.yml</span></a>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">seekr news</span>
<span class="w"> </span><span class="nt">seekr_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">news</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">seekr images</span>
<span class="w"> </span><span class="nt">seekr_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">images</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">seekr videos</span>
<span class="w"> </span><span class="nt">seekr_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">videos</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</pre></div>
</div>
</section>
<section id="known-quirks">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Known Quirks</a><a class="headerlink" href="#known-quirks" title="Link to this heading"></a></h2>
<p>The implementation to support <a class="reference internal" href="../enginelib.html#searx.enginelib.Engine.paging" title="searx.enginelib.Engine.paging"><code class="xref py py-obj docutils literal notranslate"><span class="pre">paging</span></code></a>
is based on the <em>nextpage</em> method of Seekrs REST API. This feature is <em>next
page driven</em> and plays well with the <a class="reference internal" href="../../../admin/settings/settings_ui.html#settings-ui"><span class="std std-ref">infinite_scroll</span></a>
setting in SearXNG but it does not really fit into SearXNGs UI to select a page
by number.</p>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.seekr.api_key">
<span class="sig-prename descclassname"><span class="pre">searx.engines.seekr.</span></span><span class="sig-name descname"><span class="pre">api_key</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'srh1-22fb-sekr'</span></em><a class="headerlink" href="#searx.engines.seekr.api_key" title="Link to this definition"></a></dt>
<dd><p>API key / reversed engineered / is still the same one since 2022.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.seekr.seekr_category">
<span class="sig-prename descclassname"><span class="pre">searx.engines.seekr.</span></span><span class="sig-name descname"><span class="pre">seekr_category</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'unset'</span></em><a class="headerlink" href="#searx.engines.seekr.seekr_category" title="Link to this definition"></a></dt>
<dd><p>Search category, any of <code class="docutils literal notranslate"><span class="pre">news</span></code>, <code class="docutils literal notranslate"><span class="pre">videos</span></code> or <code class="docutils literal notranslate"><span class="pre">images</span></code>.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="recoll.html" title="previous chapter">Recoll Engine</a>
<li>Next: <a href="startpage.html" title="next chapter">Startpage Engines</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/seekr.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Startpage Engines &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Tagesschau API" href="tagesschau.html" />
<link rel="prev" title="Seekr Engines" href="seekr.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="tagesschau.html" title="Tagesschau API"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="seekr.html" title="Seekr Engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Startpage Engines</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="startpage-engines">
<span id="id1"></span><h1>Startpage Engines<a class="headerlink" href="#startpage-engines" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#startpage-regions" id="id9">Startpage regions</a></p></li>
<li><p><a class="reference internal" href="#startpage-languages" id="id10">Startpage languages</a></p></li>
<li><p><a class="reference internal" href="#startpage-categories" id="id11">Startpage categories</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.startpage">Startpages language &amp; region selectors are a mess ..</p>
<section id="startpage-regions">
<span id="id2"></span><h2><a class="toc-backref" href="#id9" role="doc-backlink">Startpage regions</a><a class="headerlink" href="#startpage-regions" title="Link to this heading"></a></h2>
<p>In the list of regions there are tags we need to map to common region tags:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pt</span><span class="o">-</span><span class="n">BR_BR</span> <span class="o">--&gt;</span> <span class="n">pt_BR</span>
<span class="n">zh</span><span class="o">-</span><span class="n">CN_CN</span> <span class="o">--&gt;</span> <span class="n">zh_Hans_CN</span>
<span class="n">zh</span><span class="o">-</span><span class="n">TW_TW</span> <span class="o">--&gt;</span> <span class="n">zh_Hant_TW</span>
<span class="n">zh</span><span class="o">-</span><span class="n">TW_HK</span> <span class="o">--&gt;</span> <span class="n">zh_Hant_HK</span>
<span class="n">en</span><span class="o">-</span><span class="n">GB_GB</span> <span class="o">--&gt;</span> <span class="n">en_GB</span>
</pre></div>
</div>
<p>and there is at least one tag with a three letter language tag (ISO 639-2):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fil_PH</span> <span class="o">--&gt;</span> <span class="n">fil_PH</span>
</pre></div>
</div>
<p>The locale code <code class="docutils literal notranslate"><span class="pre">no_NO</span></code> from Startpage does not exists and is mapped to
<code class="docutils literal notranslate"><span class="pre">nb-NO</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">babel</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">UnknownLocaleError</span><span class="p">:</span> <span class="n">unknown</span> <span class="n">locale</span> <span class="s1">&#39;no_NO&#39;</span>
</pre></div>
</div>
<p>For reference see languages-subtag at iana; <code class="docutils literal notranslate"><span class="pre">no</span></code> is the macrolanguage <a class="footnote-reference brackets" href="#id5" id="id3" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a> and
W3C recommends subtag over macrolanguage <a class="footnote-reference brackets" href="#id6" id="id4" role="doc-noteref"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a>.</p>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="id5" role="note">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id3">1</a><span class="fn-bracket">]</span></span>
<p><a class="reference external" href="https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry">iana: language-subtag-registry</a></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">type</span><span class="p">:</span> <span class="n">language</span>
<span class="n">Subtag</span><span class="p">:</span> <span class="n">nb</span>
<span class="n">Description</span><span class="p">:</span> <span class="n">Norwegian</span> <span class="n">Bokmål</span>
<span class="n">Added</span><span class="p">:</span> <span class="mi">2005</span><span class="o">-</span><span class="mi">10</span><span class="o">-</span><span class="mi">16</span>
<span class="n">Suppress</span><span class="o">-</span><span class="n">Script</span><span class="p">:</span> <span class="n">Latn</span>
<span class="n">Macrolanguage</span><span class="p">:</span> <span class="n">no</span>
</pre></div>
</div>
</aside>
<aside class="footnote brackets" id="id6" role="note">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id4">2</a><span class="fn-bracket">]</span></span>
<p>Use macrolanguages with care. Some language subtags have a Scope field set to
macrolanguage, i.e. this primary language subtag encompasses a number of more
specific primary language subtags in the registry. … As we recommended for
the collection subtags mentioned above, in most cases you should try to use
the more specific subtags … <a class="reference external" href="https://www.w3.org/International/questions/qa-choosing-language-tags#langsubtag">W3: The primary language subtag</a></p>
</aside>
</aside>
</section>
<section id="startpage-languages">
<span id="id7"></span><h2><a class="toc-backref" href="#id10" role="doc-backlink">Startpage languages</a><a class="headerlink" href="#startpage-languages" title="Link to this heading"></a></h2>
<dl>
<dt><a class="reference internal" href="#searx.engines.startpage.send_accept_language_header" title="searx.engines.startpage.send_accept_language_header"><code class="xref py py-obj docutils literal notranslate"><span class="pre">send_accept_language_header</span></code></a>:</dt><dd><p>The displayed name in Startpages settings page depend on the location of the
IP when <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> HTTP header is unset. In <a class="reference internal" href="#searx.engines.startpage.fetch_traits" title="searx.engines.startpage.fetch_traits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fetch_traits</span></code></a>
we use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="s1">&#39;Accept-Language&#39;</span><span class="p">:</span> <span class="s2">&quot;en-US,en;q=0.5&quot;</span><span class="p">,</span>
<span class="o">..</span>
</pre></div>
</div>
<p>to get uniform names independent from the IP).</p>
</dd>
</dl>
</section>
<section id="startpage-categories">
<span id="id8"></span><h2><a class="toc-backref" href="#id11" role="doc-backlink">Startpage categories</a><a class="headerlink" href="#startpage-categories" title="Link to this heading"></a></h2>
<p>Startpages category (for Web-search, News, Videos, ..) is set by
<a class="reference internal" href="#searx.engines.startpage.startpage_categ" title="searx.engines.startpage.startpage_categ"><code class="xref py py-obj docutils literal notranslate"><span class="pre">startpage_categ</span></code></a> in settings.yml:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">-</span> <span class="n">name</span><span class="p">:</span> <span class="n">startpage</span>
<span class="n">engine</span><span class="p">:</span> <span class="n">startpage</span>
<span class="n">startpage_categ</span><span class="p">:</span> <span class="n">web</span>
<span class="o">...</span>
</pre></div>
</div>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>The default category is <code class="docutils literal notranslate"><span class="pre">web</span></code> .. and other categories than <code class="docutils literal notranslate"><span class="pre">web</span></code> are not
yet implemented.</p>
</div>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.startpage.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/startpage.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.startpage.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch <a class="reference internal" href="#startpage-languages"><span class="std std-ref">languages</span></a> and <a class="reference internal" href="#startpage-regions"><span class="std std-ref">regions</span></a> from Startpage.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.startpage.get_sc_code">
<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">get_sc_code</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">searxng_locale</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/startpage.html#get_sc_code"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.startpage.get_sc_code" title="Link to this definition"></a></dt>
<dd><p>Get an actual <code class="docutils literal notranslate"><span class="pre">sc</span></code> argument from Startpages search form (HTML page).</p>
<p>Startpage puts a <code class="docutils literal notranslate"><span class="pre">sc</span></code> argument on every HTML <a class="reference internal" href="#searx.engines.startpage.search_form_xpath" title="searx.engines.startpage.search_form_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search</span> <span class="pre">form</span></code></a>. Without this argument Startpage considers the request
is from a bot. We do not know what is encoded in the value of the <code class="docutils literal notranslate"><span class="pre">sc</span></code>
argument, but it seems to be a kind of a <em>time-stamp</em>.</p>
<p>Startpages search form generates a new sc-code on each request. This
function scrap a new sc-code from Startpages home page every
<a class="reference internal" href="#searx.engines.startpage.sc_code_cache_sec" title="searx.engines.startpage.sc_code_cache_sec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sc_code_cache_sec</span></code></a> seconds.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.startpage.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/startpage.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.startpage.request" title="Link to this definition"></a></dt>
<dd><p>Assemble a Startpage request.</p>
<p>To avoid CAPTCHA we need to send a well formed HTTP POST request with a
cookie. We need to form a request that is identical to the request build by
Startpages search form:</p>
<ul class="simple">
<li><p>in the cookie the <strong>region</strong> is selected</p></li>
<li><p>in the HTTP POST data the <strong>language</strong> is selected</p></li>
</ul>
<p>Additionally the arguments form Startpages search form needs to be set in
HTML POST data / compare <code class="docutils literal notranslate"><span class="pre">&lt;input&gt;</span></code> elements: <a class="reference internal" href="#searx.engines.startpage.search_form_xpath" title="searx.engines.startpage.search_form_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_form_xpath</span></code></a>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.startpage.max_page">
<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">max_page</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">18</span></em><a class="headerlink" href="#searx.engines.startpage.max_page" title="Link to this definition"></a></dt>
<dd><p>Tested 18 pages maximum (argument <code class="docutils literal notranslate"><span class="pre">page</span></code>), to be save max is set to 20.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.startpage.sc_code_cache_sec">
<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">sc_code_cache_sec</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">30</span></em><a class="headerlink" href="#searx.engines.startpage.sc_code_cache_sec" title="Link to this definition"></a></dt>
<dd><p>Time in seconds the sc-code is cached in memory <a class="reference internal" href="#searx.engines.startpage.get_sc_code" title="searx.engines.startpage.get_sc_code"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_sc_code</span></code></a>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.startpage.search_form_xpath">
<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">search_form_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'//form[&#64;id=&quot;search&quot;]'</span></em><a class="headerlink" href="#searx.engines.startpage.search_form_xpath" title="Link to this definition"></a></dt>
<dd><p>XPath of Startpages origin search form</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.startpage.send_accept_language_header">
<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">send_accept_language_header</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.startpage.send_accept_language_header" title="Link to this definition"></a></dt>
<dd><p>Startpage tries to guess users language and territory from the HTTP
<code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code>. Optional the user can select a search-language (can be
different to the UI language) and a region filter.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.startpage.startpage_categ">
<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">startpage_categ</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'web'</span></em><a class="headerlink" href="#searx.engines.startpage.startpage_categ" title="Link to this definition"></a></dt>
<dd><p>Startpages category, visit <a class="reference internal" href="#startpage-categories"><span class="std std-ref">Startpage categories</span></a>.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="seekr.html" title="previous chapter">Seekr Engines</a>
<li>Next: <a href="tagesschau.html" title="next chapter">Tagesschau API</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/startpage.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,207 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tagesschau API &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Torznab WebAPI" href="torznab.html" />
<link rel="prev" title="Startpage Engines" href="startpage.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="torznab.html" title="Torznab WebAPI"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="startpage.html" title="Startpage Engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Tagesschau API</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="tagesschau-api">
<span id="tagesschau-engine"></span><h1>Tagesschau API<a class="headerlink" href="#tagesschau-api" title="Link to this heading"></a></h1>
<p id="module-searx.engines.tagesschau">ARD: <a class="reference external" href="https://github.com/AndreasFischer1985/tagesschau-api/blob/main/README_en.md">Tagesschau API</a></p>
<p>The Tagesschau is a news program of the ARD. Via the <a class="reference external" href="https://github.com/AndreasFischer1985/tagesschau-api/blob/main/README_en.md">Tagesschau API</a>, current
news and media reports are available in JSON format. The <a class="reference external" href="https://github.com/bundesAPI">Bundesstelle für Open
Data</a> offers a <a class="reference external" href="https://swagger.io/specification/">OpenAPI</a> portal at <a class="reference external" href="https://bund.dev/apis">bundDEV</a> where APIs are documented an can
be tested.</p>
<p>This SearXNG engine uses the <a class="reference external" href="http://tagesschau.api.bund.dev/">/api2u/search</a> API.</p>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.tagesschau.use_source_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.tagesschau.</span></span><span class="sig-name descname"><span class="pre">use_source_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.tagesschau.use_source_url" title="Link to this definition"></a></dt>
<dd><p>When set to false, display URLs from Tagesschau, and not the actual source
(e.g. NDR, WDR, SWR, HR, …)</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The actual source may contain additional content, such as commentary, that is
not displayed in the Tagesschau.</p>
</div>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="startpage.html" title="previous chapter">Startpage Engines</a>
<li>Next: <a href="torznab.html" title="next chapter">Torznab WebAPI</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/tagesschau.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,261 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Torznab WebAPI &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Wallhaven" href="wallhaven.html" />
<link rel="prev" title="Tagesschau API" href="tagesschau.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="wallhaven.html" title="Wallhaven"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="tagesschau.html" title="Tagesschau API"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Torznab WebAPI</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="torznab-webapi">
<span id="torznab-engine"></span><h1>Torznab WebAPI<a class="headerlink" href="#torznab-webapi" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id2">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.torznab"><a class="reference external" href="https://torznab.github.io/spec-1.3-draft/index.html">Torznab</a> is an API specification that provides a standardized way to query
torrent site for content. It is used by a number of torrent applications,
including <a class="reference external" href="https://github.com/Prowlarr/Prowlarr">Prowlarr</a> and <a class="reference external" href="https://github.com/Jackett/Jackett">Jackett</a>.</p>
<p>Using this engine together with <a class="reference external" href="https://github.com/Prowlarr/Prowlarr">Prowlarr</a> or <a class="reference external" href="https://github.com/Jackett/Jackett">Jackett</a> allows you to search
a huge number of torrent sites which are not directly supported.</p>
<section id="configuration">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The engine has the following settings:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">base_url</span></code>:</dt><dd><p>Torznab endpoint URL.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">api_key</span></code>:</dt><dd><p>The API key to use for authentication.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">torznab_categories</span></code>:</dt><dd><p>The categories to use for searching. This is a list of category IDs. See
<a class="reference external" href="https://wiki.servarr.com/en/prowlarr/cardigann-yml-definition#categories">Prowlarr-categories</a> or <a class="reference external" href="https://github.com/Jackett/Jackett/wiki/Jackett-Categories">Jackett-categories</a> for more information.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">show_torrent_files</span></code>:</dt><dd><p>Whether to show the torrent file in the search results. Be careful as using
this with <a class="reference external" href="https://github.com/Prowlarr/Prowlarr">Prowlarr</a> or <a class="reference external" href="https://github.com/Jackett/Jackett">Jackett</a> leaks the API key. This should be used only
if you are querying a Torznab endpoint without authentication or if the
instance is private. Be aware that private trackers may ban you if you share
the torrent file. Defaults to <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">show_magnet_links</span></code>:</dt><dd><p>Whether to show the magnet link in the search results. Be aware that private
trackers may ban you if you share the magnet link. Defaults to <code class="docutils literal notranslate"><span class="pre">true</span></code>.</p>
</dd>
</dl>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.torznab.build_result">
<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">build_result</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Element</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.12)"><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.12)"><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.12)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#build_result"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.build_result" title="Link to this definition"></a></dt>
<dd><p>Build a result from a XML item.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.torznab.get_attribute">
<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">get_attribute</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">etree.Element</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">property_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.12)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><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.12)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#get_attribute"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.get_attribute" title="Link to this definition"></a></dt>
<dd><p>Get attribute from item.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.torznab.get_torznab_attribute">
<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">get_torznab_attribute</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">etree.Element</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">attribute_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.12)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><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.12)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#get_torznab_attribute"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.get_torznab_attribute" title="Link to this definition"></a></dt>
<dd><p>Get torznab special attribute from item.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.torznab.init">
<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><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">engine_settings</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.init" title="Link to this definition"></a></dt>
<dd><p>Initialize the engine.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.torznab.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</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.12)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</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.Dict" title="(in Python v3.12)"><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.12)"><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.12)"><span class="pre">Any</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">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.12)"><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.12)"><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.12)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.request" title="Link to this definition"></a></dt>
<dd><p>Build the request params.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.torznab.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">httpx.Response</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><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.12)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><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/engines/torznab.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.response" title="Link to this definition"></a></dt>
<dd><p>Parse the XML response and return a list of results.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="tagesschau.html" title="previous chapter">Tagesschau API</a>
<li>Next: <a href="wallhaven.html" title="next chapter">Wallhaven</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/torznab.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,212 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Wallhaven &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Wikimedia" href="wikipedia.html" />
<link rel="prev" title="Torznab WebAPI" href="torznab.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="wikipedia.html" title="Wikimedia"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="torznab.html" title="Torznab WebAPI"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Wallhaven</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="wallhaven">
<span id="wallhaven-engine"></span><h1>Wallhaven<a class="headerlink" href="#wallhaven" title="Link to this heading"></a></h1>
<p id="module-searx.engines.wallhaven"><a class="reference external" href="https://wallhaven.cc/about#Copyright">Wallhaven</a> is a site created by and for people who like wallpapers.</p>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.wallhaven.api_key">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wallhaven.</span></span><span class="sig-name descname"><span class="pre">api_key</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.wallhaven.api_key" title="Link to this definition"></a></dt>
<dd><p>If you own an API key you can add it here, further read <a class="reference external" href="https://wallhaven.cc/help/api#limits">Rate Limiting and
Errors</a>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.wallhaven.safesearch_map">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wallhaven.</span></span><span class="sig-name descname"><span class="pre">safesearch_map</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{0:</span> <span class="pre">'111',</span> <span class="pre">1:</span> <span class="pre">'110',</span> <span class="pre">2:</span> <span class="pre">'100'}</span></em><a class="headerlink" href="#searx.engines.wallhaven.safesearch_map" title="Link to this definition"></a></dt>
<dd><p>Turn purities on(1) or off(0) NSFW requires a valid API key.</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>100/110/111 &lt;-- Bits stands for: SFW, Sketchy and NSFW
</pre></div>
</div>
<p><a class="reference external" href="https://wallhaven.cc/faq#What-are-SFW-Sketchy-and-NSFW-all-about">What are SFW, Sketchy and NSFW all about?</a>:</p>
<ul class="simple">
<li><p>SFW = “Safe for work” wallpapers. <em>Grandma approves.</em></p></li>
<li><p>Sketchy = Not quite SFW not quite NSFW. <em>Grandma might be uncomfortable.</em></p></li>
<li><p>NSFW = “Not safe for work”. <em>Grandma isnt sure who you are anymore.</em></p></li>
</ul>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="torznab.html" title="previous chapter">Torznab WebAPI</a>
<li>Next: <a href="wikipedia.html" title="next chapter">Wikimedia</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/wallhaven.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,364 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Wikimedia &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Yacy" href="yacy.html" />
<link rel="prev" title="Wallhaven" href="wallhaven.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="yacy.html" title="Yacy"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="wallhaven.html" title="Wallhaven"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Wikimedia</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="wikimedia">
<span id="wikimedia-engines"></span><h1>Wikimedia<a class="headerlink" href="#wikimedia" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#module-searx.engines.wikipedia" id="id1">Wikipedia</a></p></li>
<li><p><a class="reference internal" href="#module-searx.engines.wikidata" id="id2">Wikidata</a></p></li>
</ul>
</nav>
<section id="module-searx.engines.wikipedia">
<span id="wikipedia"></span><span id="wikipedia-engine"></span><h2><a class="toc-backref" href="#id1" role="doc-backlink">Wikipedia</a><a class="headerlink" href="#module-searx.engines.wikipedia" title="Link to this heading"></a></h2>
<p>This module implements the Wikipedia engine. Some of this implementations
are shared by other engines:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#wikidata-engine"><span class="std std-ref">Wikidata</span></a></p></li>
</ul>
<p>The list of supported languages is <a class="reference internal" href="#searx.engines.wikipedia.fetch_wikimedia_traits" title="searx.engines.wikipedia.fetch_wikimedia_traits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fetched</span></code></a> from
the article linked by <a class="reference internal" href="#searx.engines.wikipedia.list_of_wikipedias" title="searx.engines.wikipedia.list_of_wikipedias"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list_of_wikipedias</span></code></a>.</p>
<p>Unlike traditional search engines, wikipedia does not support one Wikipedia for
all languages, but there is one Wikipedia for each supported language. Some of
these Wikipedias have a <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> enabled
(<a class="reference internal" href="#searx.engines.wikipedia.rest_v1_summary_url" title="searx.engines.wikipedia.rest_v1_summary_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rest_v1_summary_url</span></code></a>).</p>
<p>A <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> (LC) is a system based on language variants that
automatically converts the content of a page into a different variant. A variant
is mostly the same language in a different script.</p>
<ul class="simple">
<li><p><a class="reference external" href="https://meta.wikimedia.org/wiki/Wikipedias_in_multiple_writing_systems">Wikipedias in multiple writing systems</a></p></li>
<li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Chinese_Wikipedia#Automatic_conversion_between_traditional_and_simplified_Chinese_characters">Automatic conversion between traditional and simplified Chinese characters</a></p></li>
</ul>
<dl class="simple">
<dt><a class="reference external" href="https://github.com/searx/searx/pull/2554">PR-2554</a>:</dt><dd><p>The Wikipedia link returned by the API is still the same in all cases
(<a class="reference external" href="https://zh.wikipedia.org/wiki/%E5%87%BA%E7%A7%9F%E8%BB%8A">https://zh.wikipedia.org/wiki/出租車</a>) but if your browsers
<code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> is set to any of <code class="docutils literal notranslate"><span class="pre">zh</span></code>, <code class="docutils literal notranslate"><span class="pre">zh-CN</span></code>, <code class="docutils literal notranslate"><span class="pre">zh-TW</span></code>, <code class="docutils literal notranslate"><span class="pre">zh-HK</span></code>
or .. Wikipedias LC automatically returns the desired script in their
web-page.</p>
<ul class="simple">
<li><p>You can test the API here: <a class="reference external" href="https://reqbin.com/gesg2kvx">https://reqbin.com/gesg2kvx</a></p></li>
</ul>
</dd>
</dl>
<p>To support Wikipedias <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a>, a SearXNG request to Wikipedia uses
<a class="reference internal" href="#searx.engines.wikipedia.get_wiki_params" title="searx.engines.wikipedia.get_wiki_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_wiki_params</span></code></a> and <code class="xref py py-obj docutils literal notranslate"><span class="pre">wiki_lc_locale_variants'</span> <span class="pre">in</span> <span class="pre">the</span>
<span class="pre">:py:obj:`fetch_wikimedia_traits</span></code> function.</p>
<p>To test in SearXNG, query for <code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span></code> with each of the available Chinese
options:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span> <span class="pre">:zh</span></code> should show 出租車</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span> <span class="pre">:zh-CN</span></code> should show 出租车</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span> <span class="pre">:zh-TW</span></code> should show 計程車</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span> <span class="pre">:zh-HK</span></code> should show 的士</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span> <span class="pre">:zh-SG</span></code> should show 德士</p></li>
</ul>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.wikipedia.fetch_wikimedia_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">fetch_wikimedia_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/wikipedia.html#fetch_wikimedia_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.wikipedia.fetch_wikimedia_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages from Wikipedia. Not all languages from the
<a class="reference internal" href="#searx.engines.wikipedia.list_of_wikipedias" title="searx.engines.wikipedia.list_of_wikipedias"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list_of_wikipedias</span></code></a> are supported by SearXNG locales, only those
known from <a class="reference internal" href="../../../src/searx.locales.html#searx.locales.LOCALE_NAMES" title="searx.locales.LOCALE_NAMES"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.locales.LOCALE_NAMES</span></code></a> or those with a minimal
<a class="reference internal" href="#searx.engines.wikipedia.wikipedia_article_depth" title="searx.engines.wikipedia.wikipedia_article_depth"><code class="xref py py-obj docutils literal notranslate"><span class="pre">editing</span> <span class="pre">depth</span></code></a>.</p>
<p>The location of the Wikipedia address of a language is mapped in a
<a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits.custom" title="searx.enginelib.traits.EngineTraits.custom"><code class="xref py py-obj docutils literal notranslate"><span class="pre">custom</span> <span class="pre">field</span></code></a>
(<code class="docutils literal notranslate"><span class="pre">wiki_netloc</span></code>). Here is a reduced example:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">traits</span><span class="o">.</span><span class="n">custom</span><span class="p">[</span><span class="s1">&#39;wiki_netloc&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;en&quot;</span><span class="p">:</span> <span class="s2">&quot;en.wikipedia.org&quot;</span><span class="p">,</span>
<span class="o">..</span>
<span class="s2">&quot;gsw&quot;</span><span class="p">:</span> <span class="s2">&quot;als.wikipedia.org&quot;</span><span class="p">,</span>
<span class="o">..</span>
<span class="s2">&quot;zh&quot;</span><span class="p">:</span> <span class="s2">&quot;zh.wikipedia.org&quot;</span><span class="p">,</span>
<span class="s2">&quot;zh-classical&quot;</span><span class="p">:</span> <span class="s2">&quot;zh-classical.wikipedia.org&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.wikipedia.get_wiki_params">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">get_wiki_params</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sxng_locale</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eng_traits</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/wikipedia.html#get_wiki_params"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.wikipedia.get_wiki_params" title="Link to this definition"></a></dt>
<dd><p>Returns the Wikipedia language tag and the netloc that fits to the
<code class="docutils literal notranslate"><span class="pre">sxng_locale</span></code>. To support <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> this function rates a locale
(region) higher than a language (compare <a class="reference internal" href="#searx.engines.wikipedia.wiki_lc_locale_variants" title="searx.engines.wikipedia.wiki_lc_locale_variants"><code class="xref py py-obj docutils literal notranslate"><span class="pre">wiki_lc_locale_variants</span></code></a>).</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.wikipedia.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/wikipedia.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.wikipedia.request" title="Link to this definition"></a></dt>
<dd><p>Assemble a request (<a class="reference external" href="https://en.wikipedia.org/api/rest_v1/#/Page%20content/get_page_summary__title_">wikipedia rest_v1 summary API</a>).</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.wikipedia.display_type">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">display_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['infobox']</span></em><a class="headerlink" href="#searx.engines.wikipedia.display_type" title="Link to this definition"></a></dt>
<dd><p>A list of display types composed from <code class="docutils literal notranslate"><span class="pre">infobox</span></code> and <code class="docutils literal notranslate"><span class="pre">list</span></code>. The latter
one will add a hit to the result list. The first one will show a hit in the
info box. Both values can be set, or one of the two can be set.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.wikipedia.list_of_wikipedias">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">list_of_wikipedias</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://meta.wikimedia.org/wiki/List_of_Wikipedias'</span></em><a class="headerlink" href="#searx.engines.wikipedia.list_of_wikipedias" title="Link to this definition"></a></dt>
<dd><p><a class="reference external" href="https://meta.wikimedia.org/wiki/List_of_Wikipedias">List of all wikipedias</a></p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.wikipedia.rest_v1_summary_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">rest_v1_summary_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://{wiki_netloc}/api/rest_v1/page/summary/{title}'</span></em><a class="headerlink" href="#searx.engines.wikipedia.rest_v1_summary_url" title="Link to this definition"></a></dt>
<dd><dl class="simple">
<dt><a class="reference external" href="https://en.wikipedia.org/api/rest_v1/#/Page%20content/get_page_summary__title_">wikipedia rest_v1 summary API</a>:</dt><dd><p>The summary response includes an extract of the first paragraph of the page in
plain text and HTML as well as the type of page. This is useful for page
previews (fka. Hovercards, aka. Popups) on the web and link previews in the
apps.</p>
</dd>
<dt>HTTP <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header (<a class="reference internal" href="#searx.engines.wikipedia.send_accept_language_header" title="searx.engines.wikipedia.send_accept_language_header"><code class="xref py py-obj docutils literal notranslate"><span class="pre">send_accept_language_header</span></code></a>):</dt><dd><p>The desired language variant code for wikis where <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> is
enabled.</p>
</dd>
</dl>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.wikipedia.send_accept_language_header">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">send_accept_language_header</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.wikipedia.send_accept_language_header" title="Link to this definition"></a></dt>
<dd><p>The HTTP <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header is needed for wikis where
<a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> is enabled.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.wikipedia.wiki_lc_locale_variants">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">wiki_lc_locale_variants</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'zh':</span> <span class="pre">('zh-CN',</span> <span class="pre">'zh-HK',</span> <span class="pre">'zh-MO',</span> <span class="pre">'zh-MY',</span> <span class="pre">'zh-SG',</span> <span class="pre">'zh-TW'),</span> <span class="pre">'zh-classical':</span> <span class="pre">('zh-classical',)}</span></em><a class="headerlink" href="#searx.engines.wikipedia.wiki_lc_locale_variants" title="Link to this definition"></a></dt>
<dd><p>Mapping rule of the <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> to map a language and its variants to
a Locale (used in the HTTP <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header). For example see <a class="reference external" href="https://meta.wikimedia.org/wiki/Wikipedias_in_multiple_writing_systems#Chinese">LC
Chinese</a>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.wikipedia.wikipedia_article_depth">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">wikipedia_article_depth</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://meta.wikimedia.org/wiki/Wikipedia_article_depth'</span></em><a class="headerlink" href="#searx.engines.wikipedia.wikipedia_article_depth" title="Link to this definition"></a></dt>
<dd><p>The <em>editing depth</em> of Wikipedia is one of several possible rough indicators
of the encyclopedias collaborative quality, showing how frequently its articles
are updated. The measurement of depth was introduced after some limitations of
the classic measurement of article count were realized.</p>
</dd></dl>
</section>
<section id="module-searx.engines.wikidata">
<span id="wikidata"></span><span id="wikidata-engine"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Wikidata</a><a class="headerlink" href="#module-searx.engines.wikidata" title="Link to this heading"></a></h2>
<p>This module implements the Wikidata engine. Some implementations are shared
from <a class="reference internal" href="#wikipedia-engine"><span class="std std-ref">Wikipedia</span></a>.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.wikidata.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikidata.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/wikidata.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.wikidata.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Uses languages evaluated from <a class="reference internal" href="#searx.engines.wikipedia.fetch_wikimedia_traits" title="searx.engines.wikipedia.fetch_wikimedia_traits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">wikipedia.fetch_wikimedia_traits</span></code></a> and removes</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">traits.custom['wiki_netloc']</span></code>: wikidata does not have net-locations for
the languages and the list of all</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">traits.custom['WIKIPEDIA_LANGUAGES']</span></code>: not used in the wikipedia engine</p></li>
</ul>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.wikidata.get_thumbnail">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikidata.</span></span><span class="sig-name descname"><span class="pre">get_thumbnail</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">img_src</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/wikidata.html#get_thumbnail"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.wikidata.get_thumbnail" title="Link to this definition"></a></dt>
<dd><p>Get Thumbnail image from wikimedia commons</p>
<p>Images from commons.wikimedia.org are (HTTP) redirected to
upload.wikimedia.org. The redirected URL can be calculated by this
function.</p>
<ul class="simple">
<li><p><a class="reference external" href="https://stackoverflow.com/a/33691240">https://stackoverflow.com/a/33691240</a></p></li>
</ul>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.wikidata.display_type">
<span class="sig-prename descclassname"><span class="pre">searx.engines.wikidata.</span></span><span class="sig-name descname"><span class="pre">display_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['infobox']</span></em><a class="headerlink" href="#searx.engines.wikidata.display_type" title="Link to this definition"></a></dt>
<dd><p>A list of display types composed from <code class="docutils literal notranslate"><span class="pre">infobox</span></code> and <code class="docutils literal notranslate"><span class="pre">list</span></code>. The latter
one will add a hit to the result list. The first one will show a hit in the
info box. Both values can be set, or one of the two can be set.</p>
</dd></dl>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="wallhaven.html" title="previous chapter">Wallhaven</a>
<li>Next: <a href="yacy.html" title="next chapter">Yacy</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/wikipedia.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,265 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Yacy &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Yahoo Engine" href="yahoo.html" />
<link rel="prev" title="Wikimedia" href="wikipedia.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="yahoo.html" title="Yahoo Engine"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="wikipedia.html" title="Wikimedia"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Yacy</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="yacy">
<span id="yacy-engine"></span><h1>Yacy<a class="headerlink" href="#yacy" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.yacy"><a class="reference external" href="https://yacy.net/">YaCy</a> is a free distributed search engine, built on the principles of
peer-to-peer (P2P) networks.</p>
<p>API: <a class="reference external" href="https://wiki.yacy.net/index.php/Dev:APIyacysearch">Dev:APIyacysearch</a></p>
<p>Releases:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/yacy/yacy_search_server/tags">https://github.com/yacy/yacy_search_server/tags</a></p></li>
<li><p><a class="reference external" href="https://download.yacy.net/">https://download.yacy.net/</a></p></li>
</ul>
<section id="configuration">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The engine has the following (additional) settings:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.yacy.http_digest_auth_user" title="searx.engines.yacy.http_digest_auth_user"><code class="xref py py-obj docutils literal notranslate"><span class="pre">http_digest_auth_user</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.yacy.http_digest_auth_pass" title="searx.engines.yacy.http_digest_auth_pass"><code class="xref py py-obj docutils literal notranslate"><span class="pre">http_digest_auth_pass</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.yacy.search_mode" title="searx.engines.yacy.search_mode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_mode</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.yacy.search_type" title="searx.engines.yacy.search_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_type</span></code></a></p></li>
</ul>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yacy</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yacy</span>
<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">general</span>
<span class="w"> </span><span class="nt">search_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">text</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://yacy.searchlab.eu</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ya</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yacy images</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yacy</span>
<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">images</span>
<span class="w"> </span><span class="nt">search_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">image</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://yacy.searchlab.eu</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yai</span>
<span class="w"> </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.yacy.http_digest_auth_pass">
<span class="sig-prename descclassname"><span class="pre">searx.engines.yacy.</span></span><span class="sig-name descname"><span class="pre">http_digest_auth_pass</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.yacy.http_digest_auth_pass" title="Link to this definition"></a></dt>
<dd><p>HTTP digest password for the local YACY instance</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.yacy.http_digest_auth_user">
<span class="sig-prename descclassname"><span class="pre">searx.engines.yacy.</span></span><span class="sig-name descname"><span class="pre">http_digest_auth_user</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.yacy.http_digest_auth_user" title="Link to this definition"></a></dt>
<dd><p>HTTP digest user for the local YACY instance</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.yacy.search_mode">
<span class="sig-prename descclassname"><span class="pre">searx.engines.yacy.</span></span><span class="sig-name descname"><span class="pre">search_mode</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'global'</span></em><a class="headerlink" href="#searx.engines.yacy.search_mode" title="Link to this definition"></a></dt>
<dd><p>Yacy search mode <code class="docutils literal notranslate"><span class="pre">global</span></code> or <code class="docutils literal notranslate"><span class="pre">local</span></code>. By default, Yacy operates in <code class="docutils literal notranslate"><span class="pre">global</span></code>
mode.</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">global</span></code></dt><dd><p>Peer-to-Peer search</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">local</span></code></dt><dd><p>Privacy or Stealth mode, restricts the search to local yacy instance.</p>
</dd>
</dl>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.yacy.search_type">
<span class="sig-prename descclassname"><span class="pre">searx.engines.yacy.</span></span><span class="sig-name descname"><span class="pre">search_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'text'</span></em><a class="headerlink" href="#searx.engines.yacy.search_type" title="Link to this definition"></a></dt>
<dd><p>One of <code class="docutils literal notranslate"><span class="pre">text</span></code>, <code class="docutils literal notranslate"><span class="pre">image</span></code> / The search-types <code class="docutils literal notranslate"><span class="pre">app</span></code>, <code class="docutils literal notranslate"><span class="pre">audio</span></code> and
<code class="docutils literal notranslate"><span class="pre">video</span></code> are not yet implemented (Pull-Requests are welcome).</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="wikipedia.html" title="previous chapter">Wikimedia</a>
<li>Next: <a href="yahoo.html" title="next chapter">Yahoo Engine</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/yacy.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,222 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Yahoo Engine &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Z-Library" href="zlibrary.html" />
<link rel="prev" title="Yacy" href="yacy.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="zlibrary.html" title="Z-Library"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="yacy.html" title="Yacy"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Yahoo Engine</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="yahoo-engine">
<span id="id1"></span><h1>Yahoo Engine<a class="headerlink" href="#yahoo-engine" title="Link to this heading"></a></h1>
<p id="module-searx.engines.yahoo">Yahoo Search (Web)</p>
<p>Languages are supported by mapping the language to a domain. If domain is not
found in <a class="reference internal" href="#searx.engines.yahoo.lang2domain" title="searx.engines.yahoo.lang2domain"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lang2domain</span></code></a> URL <code class="docutils literal notranslate"><span class="pre">&lt;lang&gt;.search.yahoo.com</span></code> is used.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.yahoo.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.yahoo.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/yahoo.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.yahoo.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages from yahoo</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.yahoo.parse_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.yahoo.</span></span><span class="sig-name descname"><span class="pre">parse_url</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">url_string</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/yahoo.html#parse_url"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.yahoo.parse_url" title="Link to this definition"></a></dt>
<dd><p>remove yahoo-specific tracking-url</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.yahoo.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.yahoo.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/yahoo.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.yahoo.request" title="Link to this definition"></a></dt>
<dd><p>build request</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.yahoo.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.yahoo.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/yahoo.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.yahoo.response" title="Link to this definition"></a></dt>
<dd><p>parse response</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.yahoo.lang2domain">
<span class="sig-prename descclassname"><span class="pre">searx.engines.yahoo.</span></span><span class="sig-name descname"><span class="pre">lang2domain</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'any':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'bg':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'cs':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'da':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'el':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'en':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'et':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'he':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'hr':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'ja':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'ko':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'sk':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'sl':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'zh_chs':</span> <span class="pre">'hk.search.yahoo.com',</span> <span class="pre">'zh_cht':</span> <span class="pre">'tw.search.yahoo.com'}</span></em><a class="headerlink" href="#searx.engines.yahoo.lang2domain" title="Link to this definition"></a></dt>
<dd><p>Map language to domain</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="yacy.html" title="previous chapter">Yacy</a>
<li>Next: <a href="zlibrary.html" title="next chapter">Z-Library</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/yahoo.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,254 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Z-Library &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Offline Concept" href="../offline_concept.html" />
<link rel="prev" title="Yahoo Engine" href="yahoo.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../offline_concept.html" title="Offline Concept"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="yahoo.html" title="Yahoo Engine"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Z-Library</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="z-library">
<span id="zlibrary-engine"></span><h1>Z-Library<a class="headerlink" href="#z-library" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.zlibrary"><a class="reference external" href="https://zlibrary-global.se/">Z-Library</a> (abbreviated as z-lib, formerly BookFinder) is a shadow library
project for file-sharing access to scholarly journal articles, academic texts
and general-interest books. It began as a mirror of Library Genesis, from which
most of its books originate.</p>
<section id="configuration">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>The engine has the following additional settings:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.zlibrary.zlib_year_from" title="searx.engines.zlibrary.zlib_year_from"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zlib_year_from</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.zlibrary.zlib_year_to" title="searx.engines.zlibrary.zlib_year_to"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zlib_year_to</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.zlibrary.zlib_ext" title="searx.engines.zlibrary.zlib_ext"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zlib_ext</span></code></a></p></li>
</ul>
<p>With this options a SearXNG maintainer is able to configure <strong>additional</strong>
engines for specific searches in Z-Library. For example a engine to search
only for EPUB from 2010 to 2020.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">z-library 2010s epub</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">zlibrary</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">zlib2010s</span>
<span class="w"> </span><span class="nt">zlib_year_from</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;2010&#39;</span>
<span class="w"> </span><span class="nt">zlib_year_to</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;2020&#39;</span>
<span class="w"> </span><span class="nt">zlib_ext</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;EPUB&#39;</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.zlibrary.fetch_traits">
<span class="sig-prename descclassname"><span class="pre">searx.engines.zlibrary.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.12)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../../_modules/searx/engines/zlibrary.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.zlibrary.fetch_traits" title="Link to this definition"></a></dt>
<dd><p>Fetch languages and other search arguments from zlibrarys search form.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.zlibrary.init">
<span class="sig-prename descclassname"><span class="pre">searx.engines.zlibrary.</span></span><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">engine_settings</span></span><span class="o"><span class="pre">=</span></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">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.12)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../../_modules/searx/engines/zlibrary.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.zlibrary.init" title="Link to this definition"></a></dt>
<dd><p>Check of engines settings.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.zlibrary.zlib_ext">
<span class="sig-prename descclassname"><span class="pre">searx.engines.zlibrary.</span></span><span class="sig-name descname"><span class="pre">zlib_ext</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.zlibrary.zlib_ext" title="Link to this definition"></a></dt>
<dd><p>Filter z-librarys results by a file ending. Common filters for example are
<code class="docutils literal notranslate"><span class="pre">PDF</span></code> and <code class="docutils literal notranslate"><span class="pre">EPUB</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.zlibrary.zlib_year_from">
<span class="sig-prename descclassname"><span class="pre">searx.engines.zlibrary.</span></span><span class="sig-name descname"><span class="pre">zlib_year_from</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.zlibrary.zlib_year_from" title="Link to this definition"></a></dt>
<dd><p>Filter z-librarys results by year from. E.g 2010.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.zlibrary.zlib_year_to">
<span class="sig-prename descclassname"><span class="pre">searx.engines.zlibrary.</span></span><span class="sig-name descname"><span class="pre">zlib_year_to</span></span><em 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.12)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.zlibrary.zlib_year_to" title="Link to this definition"></a></dt>
<dd><p>Filter z-librarys results by year to. E.g. 2010.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="yahoo.html" title="previous chapter">Yahoo Engine</a>
<li>Next: <a href="../offline_concept.html" title="next chapter">Offline Concept</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online/zlibrary.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,232 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tineye &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
<script src="../../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="Search API" href="../../search_api.html" />
<link rel="prev" title="SQL Engines" href="../offline/sql-engines.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../../search_api.html" title="Search API"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../offline/sql-engines.html" title="SQL Engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Tineye</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="tineye">
<span id="tineye-engine"></span><h1>Tineye<a class="headerlink" href="#tineye" title="Link to this heading"></a></h1>
<p id="module-searx.engines.tineye">This engine implements <em>Tineye - reverse image search</em></p>
<p>Using TinEye, you can search by image or perform what we call a reverse image
search. You can do that by uploading an image or searching by URL. You can also
simply drag and drop your images to start your search. TinEye constantly crawls
the web and adds images to its index. Today, the TinEye index is over 50.2
billion images <a class="reference external" href="https://tineye.com/how">[tineye.com]</a>.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>This SearXNG engine only supports <em>searching by URL</em> and it does not use
the official API <a class="reference external" href="https://api.tineye.com/python/docs/">[api.tineye.com]</a>.</p>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.tineye.parse_tineye_match">
<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">parse_tineye_match</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">match_json</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/tineye.html#parse_tineye_match"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.tineye.parse_tineye_match" title="Link to this definition"></a></dt>
<dd><p>Takes parsed JSON from the API server and turns it into a <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.12)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dict</span></code></a>
object.</p>
<p>Attributes <a class="reference external" href="https://github.com/TinEye/pytineye/blob/main/pytineye/api.py">(class Match)</a></p>
<ul class="simple">
<li><p><cite>image_url</cite>, link to the result image.</p></li>
<li><p><cite>domain</cite>, domain this result was found on.</p></li>
<li><p><cite>score</cite>, a number (0 to 100) that indicates how closely the images match.</p></li>
<li><p><cite>width</cite>, image width in pixels.</p></li>
<li><p><cite>height</cite>, image height in pixels.</p></li>
<li><p><cite>size</cite>, image area in pixels.</p></li>
<li><p><cite>format</cite>, image format.</p></li>
<li><p><cite>filesize</cite>, image size in bytes.</p></li>
<li><p><cite>overlay</cite>, overlay URL.</p></li>
<li><p><cite>tags</cite>, whether this match belongs to a collection or stock domain.</p></li>
<li><p><cite>backlinks</cite>, a list of Backlink objects pointing to the original websites
and image URLs. List items are instances of <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.12)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dict</span></code></a>, (<a class="reference external" href="https://github.com/TinEye/pytineye/blob/main/pytineye/api.py">Backlink</a>):</p>
<ul>
<li><p><cite>url</cite>, the image URL to the image.</p></li>
<li><p><cite>backlink</cite>, the original website URL.</p></li>
<li><p><cite>crawl_date</cite>, the date the image was crawled.</p></li>
</ul>
</li>
</ul>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.tineye.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/tineye.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.tineye.request" title="Link to this definition"></a></dt>
<dd><p>Build TinEye HTTP request using <code class="docutils literal notranslate"><span class="pre">search_urls</span></code> of a <a class="reference internal" href="#searx.engines.tineye.engine_type" title="searx.engines.tineye.engine_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">engine_type</span></code></a>.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.tineye.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/tineye.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.tineye.response" title="Link to this definition"></a></dt>
<dd><p>Parse HTTP response from TinEye.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.tineye.DOWNLOAD_ERROR">
<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">DOWNLOAD_ERROR</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'The</span> <span class="pre">image</span> <span class="pre">could</span> <span class="pre">not</span> <span class="pre">be</span> <span class="pre">downloaded.'</span></em><a class="headerlink" href="#searx.engines.tineye.DOWNLOAD_ERROR" title="Link to this definition"></a></dt>
<dd><p>TinEye error message</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.tineye.FORMAT_NOT_SUPPORTED">
<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">FORMAT_NOT_SUPPORTED</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'Could</span> <span class="pre">not</span> <span class="pre">read</span> <span class="pre">that</span> <span class="pre">image</span> <span class="pre">url.</span> <span class="pre">This</span> <span class="pre">may</span> <span class="pre">be</span> <span class="pre">due</span> <span class="pre">to</span> <span class="pre">an</span> <span class="pre">unsupported</span> <span class="pre">file</span> <span class="pre">format.</span> <span class="pre">TinEye</span> <span class="pre">only</span> <span class="pre">supports</span> <span class="pre">images</span> <span class="pre">that</span> <span class="pre">are</span> <span class="pre">JPEG,</span> <span class="pre">PNG,</span> <span class="pre">GIF,</span> <span class="pre">BMP,</span> <span class="pre">TIFF</span> <span class="pre">or</span> <span class="pre">WebP.'</span></em><a class="headerlink" href="#searx.engines.tineye.FORMAT_NOT_SUPPORTED" title="Link to this definition"></a></dt>
<dd><p>TinEye error message</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.tineye.NO_SIGNATURE_ERROR">
<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">NO_SIGNATURE_ERROR</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'The</span> <span class="pre">image</span> <span class="pre">is</span> <span class="pre">too</span> <span class="pre">simple</span> <span class="pre">to</span> <span class="pre">find</span> <span class="pre">matches.</span> <span class="pre">TinEye</span> <span class="pre">requires</span> <span class="pre">a</span> <span class="pre">basic</span> <span class="pre">level</span> <span class="pre">of</span> <span class="pre">visual</span> <span class="pre">detail</span> <span class="pre">to</span> <span class="pre">successfully</span> <span class="pre">identify</span> <span class="pre">matches.'</span></em><a class="headerlink" href="#searx.engines.tineye.NO_SIGNATURE_ERROR" title="Link to this definition"></a></dt>
<dd><p>TinEye error message</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.tineye.engine_type">
<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">engine_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'online_url_search'</span></em><a class="headerlink" href="#searx.engines.tineye.engine_type" title="Link to this definition"></a></dt>
<dd><p><a class="reference internal" href="../../../src/searx.search.processors.html#module-searx.search.processors.online_url_search" title="searx.search.processors.online_url_search"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.search.processors.online_url_search</span></code></a></p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../../index.html">
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a><ul class="current">
<li class="toctree-l5 current"><a class="current reference internal" href="#">Tineye</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../../index.html">Overview</a>
<ul>
<li><a href="../../index.html">Developer documentation</a>
<ul>
<li><a href="../index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="../offline/sql-engines.html" title="previous chapter">SQL Engines</a>
<li>Next: <a href="../../search_api.html" title="next chapter">Search API</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/dev/engines/online_url_search/tineye.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../../_static/version_warning_offset.js"></script>
</body>
</html>

438
dev/engines/xpath.html Normal file
View file

@ -0,0 +1,438 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>XPath Engine &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script src="../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="MediaWiki Engine" href="mediawiki.html" />
<link rel="prev" title="Demo Online Engine" href="demo/demo_online.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="mediawiki.html" title="MediaWiki Engine"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="demo/demo_online.html" title="Demo Online Engine"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">XPath Engine</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="xpath-engine">
<span id="id1"></span><h1>XPath Engine<a class="headerlink" href="#xpath-engine" title="Link to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li>
<li><p><a class="reference internal" href="#example" id="id3">Example</a></p></li>
<li><p><a class="reference internal" href="#implementations" id="id4">Implementations</a></p></li>
</ul>
</nav>
<p id="module-searx.engines.xpath">The XPath engine is a <em>generic</em> engine with which it is possible to configure
engines in the settings.</p>
<section id="configuration">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
<p>Request:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.xpath.search_url" title="searx.engines.xpath.search_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_url</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.lang_all" title="searx.engines.xpath.lang_all"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lang_all</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.soft_max_redirects" title="searx.engines.xpath.soft_max_redirects"><code class="xref py py-obj docutils literal notranslate"><span class="pre">soft_max_redirects</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.cookies" title="searx.engines.xpath.cookies"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cookies</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.headers" title="searx.engines.xpath.headers"><code class="xref py py-obj docutils literal notranslate"><span class="pre">headers</span></code></a></p></li>
</ul>
<p>Paging:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.xpath.paging" title="searx.engines.xpath.paging"><code class="xref py py-obj docutils literal notranslate"><span class="pre">paging</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.page_size" title="searx.engines.xpath.page_size"><code class="xref py py-obj docutils literal notranslate"><span class="pre">page_size</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.first_page_num" title="searx.engines.xpath.first_page_num"><code class="xref py py-obj docutils literal notranslate"><span class="pre">first_page_num</span></code></a></p></li>
</ul>
<p>Time Range:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.xpath.time_range_support" title="searx.engines.xpath.time_range_support"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_support</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.time_range_url" title="searx.engines.xpath.time_range_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_url</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.time_range_map" title="searx.engines.xpath.time_range_map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_map</span></code></a></p></li>
</ul>
<p>Safe-Search:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.xpath.safe_search_support" title="searx.engines.xpath.safe_search_support"><code class="xref py py-obj docutils literal notranslate"><span class="pre">safe_search_support</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.safe_search_map" title="searx.engines.xpath.safe_search_map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">safe_search_map</span></code></a></p></li>
</ul>
<p>Response:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.xpath.no_result_for_http_status" title="searx.engines.xpath.no_result_for_http_status"><code class="xref py py-obj docutils literal notranslate"><span class="pre">no_result_for_http_status</span></code></a></p></li>
</ul>
<p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a>:</p>
<ul class="simple">
<li><p><a class="reference internal" href="#searx.engines.xpath.results_xpath" title="searx.engines.xpath.results_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">results_xpath</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.url_xpath" title="searx.engines.xpath.url_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">url_xpath</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.title_xpath" title="searx.engines.xpath.title_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">title_xpath</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.content_xpath" title="searx.engines.xpath.content_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">content_xpath</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.thumbnail_xpath" title="searx.engines.xpath.thumbnail_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">thumbnail_xpath</span></code></a></p></li>
<li><p><a class="reference internal" href="#searx.engines.xpath.suggestion_xpath" title="searx.engines.xpath.suggestion_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">suggestion_xpath</span></code></a></p></li>
</ul>
</section>
<section id="example">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Example</a><a class="headerlink" href="#example" title="Link to this heading"></a></h2>
<p>Here is a simple example of a XPath engine configured in the <a class="reference internal" href="../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">engine:</span></a> section, further read <a class="reference internal" href="engine_overview.html#engines-dev"><span class="std std-ref">Engine Overview</span></a>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">bitbucket</span>
<span class="w"> </span><span class="nt">engine </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">xpath</span>
<span class="w"> </span><span class="nt">paging </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">True</span>
<span class="w"> </span><span class="nt">search_url </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://bitbucket.org/repo/all/{pageno}?name={query}</span>
<span class="w"> </span><span class="nt">url_xpath </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">//article[@class=&quot;repo-summary&quot;]//a[@class=&quot;repo-link&quot;]/@href</span>
<span class="w"> </span><span class="nt">title_xpath </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">//article[@class=&quot;repo-summary&quot;]//a[@class=&quot;repo-link&quot;]</span>
<span class="w"> </span><span class="nt">content_xpath </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">//article[@class=&quot;repo-summary&quot;]/p</span>
</pre></div>
</div>
</section>
<section id="implementations">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading"></a></h2>
</section>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.xpath.request">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/engines/xpath.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.xpath.request" title="Link to this definition"></a></dt>
<dd><p>Build request parameters (see <a class="reference internal" href="engine_overview.html#engine-request"><span class="std std-ref">Making a Request</span></a>).</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searx.engines.xpath.response">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/engines/xpath.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.xpath.response" title="Link to this definition"></a></dt>
<dd><p>Scrap <em>results</em> from the response (see <a class="reference internal" href="engine_overview.html#engine-results"><span class="std std-ref">Result Types (template)</span></a>).</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.content_xpath">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">content_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.xpath.content_xpath" title="Link to this definition"></a></dt>
<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> of results <code class="docutils literal notranslate"><span class="pre">content</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.cookies">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">cookies</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{}</span></em><a class="headerlink" href="#searx.engines.xpath.cookies" title="Link to this definition"></a></dt>
<dd><p>Some engines might offer different result based on cookies.
Possible use-case: To set safesearch cookie.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.first_page_num">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">first_page_num</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">1</span></em><a class="headerlink" href="#searx.engines.xpath.first_page_num" title="Link to this definition"></a></dt>
<dd><p>Number of the first page (usually 0 or 1).</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.headers">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">headers</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{}</span></em><a class="headerlink" href="#searx.engines.xpath.headers" title="Link to this definition"></a></dt>
<dd><p>Some engines might offer different result based headers. Possible use-case:
To set header to moderate.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.lang_all">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">lang_all</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'en'</span></em><a class="headerlink" href="#searx.engines.xpath.lang_all" title="Link to this definition"></a></dt>
<dd><p>Replacement <code class="docutils literal notranslate"><span class="pre">{lang}</span></code> in <a class="reference internal" href="#searx.engines.xpath.search_url" title="searx.engines.xpath.search_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_url</span></code></a> if language <code class="docutils literal notranslate"><span class="pre">all</span></code> is
selected.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.no_result_for_http_status">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">no_result_for_http_status</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">[]</span></em><a class="headerlink" href="#searx.engines.xpath.no_result_for_http_status" title="Link to this definition"></a></dt>
<dd><p>Return empty result for these HTTP status codes instead of throwing an error.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">no_result_for_http_status</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[]</span>
</pre></div>
</div>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.page_size">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">page_size</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">1</span></em><a class="headerlink" href="#searx.engines.xpath.page_size" title="Link to this definition"></a></dt>
<dd><p>Number of results on each page. Only needed if the site requires not a page
number, but an offset.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.paging">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">paging</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.xpath.paging" title="Link to this definition"></a></dt>
<dd><p>Engine supports paging [True or False].</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.results_xpath">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">results_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.xpath.results_xpath" title="Link to this definition"></a></dt>
<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> for the list of result items</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.safe_search_map">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">safe_search_map</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{0:</span> <span class="pre">'&amp;filter=none',</span> <span class="pre">1:</span> <span class="pre">'&amp;filter=moderate',</span> <span class="pre">2:</span> <span class="pre">'&amp;filter=strict'}</span></em><a class="headerlink" href="#searx.engines.xpath.safe_search_map" title="Link to this definition"></a></dt>
<dd><p>Maps safe-search value to <code class="docutils literal notranslate"><span class="pre">{safe_search}</span></code> in <a class="reference internal" href="#searx.engines.xpath.search_url" title="searx.engines.xpath.search_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_url</span></code></a>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">safesearch</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="nt">safes_search_map</span><span class="p">:</span>
<span class="w"> </span><span class="nt">0</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;&amp;filter=none&#39;</span>
<span class="w"> </span><span class="nt">1</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;&amp;filter=moderate&#39;</span>
<span class="w"> </span><span class="nt">2</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;&amp;filter=strict&#39;</span>
</pre></div>
</div>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.safe_search_support">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">safe_search_support</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.xpath.safe_search_support" title="Link to this definition"></a></dt>
<dd><p>Engine supports safe-search.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.search_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">search_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.xpath.search_url" title="Link to this definition"></a></dt>
<dd><p>Search URL of the engine. Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>https://example.org/?search={query}&amp;page={pageno}{time_range}{safe_search}
</pre></div>
</div>
<p>Replacements are:</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">{query}</span></code>:</dt><dd><p>Search terms from user.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">{pageno}</span></code>:</dt><dd><p>Page number if engine supports paging <a class="reference internal" href="#searx.engines.xpath.paging" title="searx.engines.xpath.paging"><code class="xref py py-obj docutils literal notranslate"><span class="pre">paging</span></code></a></p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">{lang}</span></code>:</dt><dd><p>ISO 639-1 language code (en, de, fr ..)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">{time_range}</span></code>:</dt><dd><p><a class="reference internal" href="#searx.engines.xpath.time_range_url" title="searx.engines.xpath.time_range_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">URL</span> <span class="pre">parameter</span></code></a> if engine <a class="reference internal" href="#searx.engines.xpath.time_range_support" title="searx.engines.xpath.time_range_support"><code class="xref py py-obj docutils literal notranslate"><span class="pre">supports</span> <span class="pre">time</span>
<span class="pre">range</span></code></a>. The value for the parameter is taken from
<a class="reference internal" href="#searx.engines.xpath.time_range_map" title="searx.engines.xpath.time_range_map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_map</span></code></a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">{safe_search}</span></code>:</dt><dd><p>Safe-search <a class="reference internal" href="#searx.engines.xpath.safe_search_map" title="searx.engines.xpath.safe_search_map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">URL</span> <span class="pre">parameter</span></code></a> if engine
<a class="reference internal" href="#searx.engines.xpath.safe_search_support" title="searx.engines.xpath.safe_search_support"><code class="xref py py-obj docutils literal notranslate"><span class="pre">supports</span> <span class="pre">safe-search</span></code></a>. The <code class="docutils literal notranslate"><span class="pre">{safe_search}</span></code>
replacement is taken from the <code class="xref py py-obj docutils literal notranslate"><span class="pre">safes_search_map</span></code>. Filter results:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">0</span><span class="p">:</span> <span class="n">none</span><span class="p">,</span> <span class="mi">1</span><span class="p">:</span> <span class="n">moderate</span><span class="p">,</span> <span class="mi">2</span><span class="p">:</span><span class="n">strict</span>
</pre></div>
</div>
<p>If not supported, the URL parameter is an empty string.</p>
</dd>
</dl>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.soft_max_redirects">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">soft_max_redirects</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">0</span></em><a class="headerlink" href="#searx.engines.xpath.soft_max_redirects" title="Link to this definition"></a></dt>
<dd><p>Maximum redirects, soft limit. Record an error but dont stop the engine</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.suggestion_xpath">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">suggestion_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.xpath.suggestion_xpath" title="Link to this definition"></a></dt>
<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> of results <code class="docutils literal notranslate"><span class="pre">suggestion</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.thumbnail_xpath">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">thumbnail_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.xpath.thumbnail_xpath" title="Link to this definition"></a></dt>
<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> of results <code class="docutils literal notranslate"><span class="pre">img_src</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.time_range_map">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">time_range_map</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'day':</span> <span class="pre">24,</span> <span class="pre">'month':</span> <span class="pre">720,</span> <span class="pre">'week':</span> <span class="pre">168,</span> <span class="pre">'year':</span> <span class="pre">8760}</span></em><a class="headerlink" href="#searx.engines.xpath.time_range_map" title="Link to this definition"></a></dt>
<dd><p>Maps time range value from user to <code class="docutils literal notranslate"><span class="pre">{time_range_val}</span></code> in
<a class="reference internal" href="#searx.engines.xpath.time_range_url" title="searx.engines.xpath.time_range_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_url</span></code></a>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">time_range_map</span><span class="p">:</span>
<span class="w"> </span><span class="nt">day</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
<span class="w"> </span><span class="nt">week</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">7</span>
<span class="w"> </span><span class="nt">month</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">30</span>
<span class="w"> </span><span class="nt">year</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">365</span>
</pre></div>
</div>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.time_range_support">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">time_range_support</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.xpath.time_range_support" title="Link to this definition"></a></dt>
<dd><p>Engine supports search time range.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.time_range_url">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">time_range_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'&amp;hours={time_range_val}'</span></em><a class="headerlink" href="#searx.engines.xpath.time_range_url" title="Link to this definition"></a></dt>
<dd><p>Time range URL parameter in the in <a class="reference internal" href="#searx.engines.xpath.search_url" title="searx.engines.xpath.search_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_url</span></code></a>. If no time range is
requested by the user, the URL parameter is an empty string. The
<code class="docutils literal notranslate"><span class="pre">{time_range_val}</span></code> replacement is taken from the <a class="reference internal" href="#searx.engines.xpath.time_range_map" title="searx.engines.xpath.time_range_map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_map</span></code></a>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">time_range_url </span><span class="p">:</span><span class="w"> </span><span class="s">&#39;&amp;days={time_range_val}&#39;</span>
</pre></div>
</div>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.title_xpath">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">title_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.xpath.title_xpath" title="Link to this definition"></a></dt>
<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> of results <code class="docutils literal notranslate"><span class="pre">title</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt class="sig sig-object py" id="searx.engines.xpath.url_xpath">
<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">url_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.xpath.url_xpath" title="Link to this definition"></a></dt>
<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> of results <code class="docutils literal notranslate"><span class="pre">url</span></code>.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li>
<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="index.html#engine-types">Engine Types</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="index.html#online-engines">Online Engines</a><ul class="current">
<li class="toctree-l5"><a class="reference internal" href="demo/demo_online.html">Demo Online Engine</a></li>
<li class="toctree-l5 current"><a class="current reference internal" href="#">XPath Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="mediawiki.html">MediaWiki Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/annas_archive.html">Annas Archive</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/archlinux.html">Arch Linux</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/bing.html">Bing Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/bpb.html">Bpb</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/brave.html">Brave Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/bt4g.html">BT4G</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/dailymotion.html">Dailymotion</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/duckduckgo.html">DuckDuckGo Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/google.html">Google Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/lemmy.html">Lemmy</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/loc.html">Library of Congress</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/mastodon.html">Mastodon</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/moviepilot.html">Moviepilot</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/mrs.html">Matrix Rooms Search (MRS)</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/mwmbl.html">Mwmbl Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/odysee.html">Odysee</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/peertube.html">Peertube Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/piped.html">Piped</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/qwant.html">Qwant</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/radio_browser.html">RadioBrowser</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/recoll.html">Recoll Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/seekr.html">Seekr Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/startpage.html">Startpage Engines</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/tagesschau.html">Tagesschau API</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/torznab.html">Torznab WebAPI</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/wallhaven.html">Wallhaven</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/wikipedia.html">Wikimedia</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/yacy.html">Yacy</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/yahoo.html">Yahoo Engine</a></li>
<li class="toctree-l5"><a class="reference internal" href="online/zlibrary.html">Z-Library</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="index.html#offline-engines">Offline Engines</a></li>
<li class="toctree-l4"><a class="reference internal" href="index.html#online-url-search">Online URL Search</a></li>
<li class="toctree-l4"><a class="reference internal" href="index.html#online-currency">Online Currency</a></li>
<li class="toctree-l4"><a class="reference internal" href="index.html#online-dictionary">Online Dictionary</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../index.html">Overview</a>
<ul>
<li><a href="../index.html">Developer documentation</a>
<ul>
<li><a href="index.html">Engine Implementations</a>
<ul>
<li>Previous: <a href="demo/demo_online.html" title="previous chapter">Demo Online Engine</a>
<li>Next: <a href="mediawiki.html" title="next chapter">MediaWiki Engine</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/dev/engines/xpath.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

218
dev/index.html Normal file
View file

@ -0,0 +1,218 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Developer documentation &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script src="../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Development Quickstart" href="quickstart.html" />
<link rel="prev" title="Buildhosts" href="../admin/buildhosts.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="quickstart.html" title="Development Quickstart"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../admin/buildhosts.html" title="Buildhosts"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Developer documentation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="developer-documentation">
<h1>Developer documentation<a class="headerlink" href="#developer-documentation" title="Link to this heading"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a><ul>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html#get-started">Get started</a></li>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html#manage-versions">Manage Versions</a></li>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html#introduce-asdf">Introduce asdf</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="contribution_guide.html">How to contribute</a><ul>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#prime-directives-privacy-hackability">Prime directives: Privacy, Hackability</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#code">Code</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#translation">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#documentation">Documentation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="engines/index.html">Engine Implementations</a><ul>
<li class="toctree-l2"><a class="reference internal" href="engines/enginelib.html">Engine Library</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/engines.html">SearXNGs engines loader</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/engine_overview.html">Engine Overview</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html#engine-types">Engine Types</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="search_api.html">Search API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="search_api.html#parameters">Parameters</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins</a><ul>
<li class="toctree-l2"><a class="reference internal" href="plugins.html#example-plugin">Example plugin</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html#external-plugins">External plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html#plugin-entry-points">Plugin entry points</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="translation.html">Translation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="translation.html#id2">wlc</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a><ul>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html#gentlemen-start-your-engines">Gentlemen, start your engines!</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html#in-containers-work-as-usual">In containers, work as usual</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html#wrap-production-into-developer-suite">Wrap production into developer suite</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html#summary">Summary</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#python-environment-make-install">Python environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-buildenv"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">buildenv</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#node-js-environment-make-node-env">Node.js environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-run"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-format-python"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">format.python</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-clean"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-docs"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-test"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-search-checker-engine-name"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-themes"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">themes.*</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-static-build"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">static.build.*</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#manage-redis-help"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">redis.help</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#manage-go-help"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">go.help</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reST.html">reST primer</a><ul>
<li class="toctree-l2"><a class="reference internal" href="reST.html#soft-skills">Soft skills</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#basic-inline-markup">Basic inline markup</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#basic-article-structure">Basic article structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#anchors-links">Anchors &amp; Links</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#literal-blocks">Literal blocks</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#unicode-substitution">Unicode substitution</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#roles">Roles</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#figures-images">Figures &amp; Images</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#list-markups">List markups</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#admonitions">Admonitions</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#tables">Tables</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#templating">Templating</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#tabbed-views">Tabbed views</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#math-equations">Math equations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/standalone_searx.py.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></li>
</ul>
</li>
</ul>
</div>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Developer documentation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li>Previous: <a href="../admin/buildhosts.html" title="previous chapter">Buildhosts</a>
<li>Next: <a href="quickstart.html" title="next chapter">Development Quickstart</a>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/dev/index.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

463
dev/lxcdev.html Normal file
View file

@ -0,0 +1,463 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Developing in Linux Containers &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script src="../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/tabs.js?v=3030b3cb"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Makefile &amp; ./manage" href="makefile.html" />
<link rel="prev" title="Translation" href="translation.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="makefile.html" title="Makefile &amp; ./manage"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="translation.html" title="Translation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Developing in Linux Containers</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="developing-in-linux-containers">
<span id="lxcdev"></span><h1>Developing in Linux Containers<a class="headerlink" href="#developing-in-linux-containers" title="Link to this heading"></a></h1>
<p>In this article we will show, how you can make use of Linux Containers (<a class="reference external" href="https://linuxcontainers.org/lxc/introduction/">LXC</a>) in
<em>distributed and heterogeneous development cycles</em> (TL;DR; jump to the
<a class="reference internal" href="#lxcdev-summary"><span class="std std-ref">Summary</span></a>).</p>
<aside class="sidebar">
<p class="sidebar-title">Audience</p>
<p>This blog post is written for experienced admins and developers. Readers
should have a serious meaning about the terms: <em>distributed</em>, <em>merge</em> and
<em>linux container</em>.</p>
<p><strong>hint</strong></p>
<p>If you have issues with the internet connectivity of your containers read
section <a class="reference internal" href="../utils/lxc.sh.html#internet-connectivity-docker"><span class="std std-ref">Internet Connectivity &amp; Docker</span></a>.</p>
</aside>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#motivation" id="id1">Motivation</a></p></li>
<li><p><a class="reference internal" href="#gentlemen-start-your-engines" id="id2">Gentlemen, start your engines!</a></p></li>
<li><p><a class="reference internal" href="#in-containers-work-as-usual" id="id3">In containers, work as usual</a></p></li>
<li><p><a class="reference internal" href="#wrap-production-into-developer-suite" id="id4">Wrap production into developer suite</a></p></li>
<li><p><a class="reference internal" href="#summary" id="id5">Summary</a></p></li>
</ul>
</nav>
<section id="motivation">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Motivation</a><a class="headerlink" href="#motivation" title="Link to this heading"></a></h2>
<p>Most often in our development cycle, we edit the sources and run some test
and/or builds by using <code class="docutils literal notranslate"><span class="pre">make</span></code> <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">[ref]</span></a> before we commit. This
cycle is simple and perfect but might fail in some aspects we should not
overlook.</p>
<blockquote>
<div><p><strong>The environment in which we run all our development processes matters!</strong></p>
</div></blockquote>
<p>The <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile &amp; ./manage</span></a> and the <a class="reference internal" href="makefile.html#make-install"><span class="std std-ref">Python environment (make install)</span></a> encapsulate a lot for us, but
these tools do not have access to all prerequisites. For example, there may
have dependencies on packages that are installed on developers desktop, but
usually are not preinstalled on a server or client system. Another example is;
settings have been made to the software on developers desktop that would never
be set on a <em>production</em> system.</p>
<blockquote>
<div><p><strong>Linux Containers are isolate environments</strong>, we use them to not mix up all
the prerequisites from various projects on developers desktop.</p>
</div></blockquote>
<p>The scripts from <a class="reference internal" href="../utils/index.html#searx-utils"><span class="std std-ref">DevOps tooling box</span></a> can divide in those to install and maintain
software</p>
<ul class="simple">
<li><p><a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a></p></li>
</ul>
<p>and the script</p>
<ul class="simple">
<li><p><a class="reference internal" href="../utils/lxc.sh.html#lxc-sh"><span class="std std-ref">utils/lxc.sh</span></a></p></li>
</ul>
<p>with we can scale our installation, maintenance or even development tasks over a
stack of isolated containers / what we call the:</p>
<ul class="simple">
<li><p><a class="reference internal" href="../utils/lxc.sh.html#searxng-lxc-suite"><span class="std std-ref">SearXNG LXC suite</span></a></p></li>
</ul>
</section>
<section id="gentlemen-start-your-engines">
<span id="lxcdev-install-searxng"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Gentlemen, start your engines!</a><a class="headerlink" href="#gentlemen-start-your-engines" title="Link to this heading"></a></h2>
<p>Before you can start with containers, you need to install and initiate <a class="reference external" href="https://linuxcontainers.org/lxd/introduction/">LXD</a>
once:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-ZGVza3RvcCAoSE9TVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="0">desktop (HOST)</button></div><div aria-labelledby="tab-0-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" id="panel-0-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>snap<span class="w"> </span>install<span class="w"> </span>lxd
$<span class="w"> </span>lxd<span class="w"> </span>init<span class="w"> </span>--auto
</pre></div>
</div>
</div></div>
<p>And you need to clone from origin or if you have your own fork, clone from your
fork:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-ZGVza3RvcCAoSE9TVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="0">desktop (HOST)</button></div><div aria-labelledby="tab-1-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" id="panel-1-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>~/Downloads
$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/searxng/searxng.git<span class="w"> </span>searxng
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>searxng
</pre></div>
</div>
</div></div>
<aside class="sidebar">
<p class="sidebar-title">The <code class="docutils literal notranslate"><span class="pre">searxng-archlinux</span></code> container</p>
<p>is the base of all our exercises here.</p>
</aside>
<p>The <a class="reference internal" href="../utils/lxc.sh.html#lxc-searxng-env"><span class="std std-ref">SearXNG suite config</span></a> consists of several images, see <code class="docutils literal notranslate"><span class="pre">export</span>
<span class="pre">LXC_SUITE=(...</span></code> near by <a class="reference external" href="https://github.com/searxng/searxng/blob/master/utils/lxc-searxng.env#L19">git://utils/lxc-searxng.env#L19</a>.
For this blog post we exercise on a <a class="reference external" href="https://www.archlinux.org/">archlinux</a> image. The container of this
image is named <code class="docutils literal notranslate"><span class="pre">searxng-archlinux</span></code>.</p>
<p>Lets build the container, but be sure that this container does not already
exists, so first lets remove possible old one:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-2-ZGVza3RvcCAoSE9TVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-2-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="0">desktop (HOST)</button></div><div aria-labelledby="tab-2-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" id="panel-2-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>remove<span class="w"> </span>searxng-archlinux
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>build<span class="w"> </span>searxng-archlinux
</pre></div>
</div>
</div></div>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference internal" href="../utils/lxc.sh.html#lxc-sh-install-suite"><span class="std std-ref">Install suite</span></a></p></li>
<li><p><a class="reference internal" href="../admin/installation-nginx.html#installation-nginx"><span class="std std-ref">NGINX</span></a></p></li>
</ul>
</aside>
<p>To install the complete <a class="reference internal" href="../utils/lxc.sh.html#searxng-lxc-suite"><span class="std std-ref">SearXNG suite</span></a> and the HTTP
proxy <a class="reference internal" href="../admin/installation-nginx.html#installation-nginx"><span class="std std-ref">NGINX</span></a> into the archlinux container run:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-3-ZGVza3RvcCAoSE9TVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-3-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="0">desktop (HOST)</button></div><div aria-labelledby="tab-3-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" id="panel-3-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>install<span class="w"> </span>suite<span class="w"> </span>searxng-archlinux
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>--<span class="w"> </span><span class="nv">FORCE_TIMEOUT</span><span class="o">=</span><span class="m">0</span><span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>nginx
$<span class="w"> </span>sudo<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>show<span class="w"> </span>suite<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>SEARXNG_URL
...
<span class="o">[</span>searxng-archlinux<span class="o">]</span><span class="w"> </span>SEARXNG_URL<span class="w"> </span>:<span class="w"> </span>http://n.n.n.140/searxng
</pre></div>
</div>
</div></div>
<aside class="sidebar">
<p class="sidebar-title">Fully functional SearXNG suite</p>
<p>From here on you have a fully functional SearXNG suite (including a
<a class="reference internal" href="../src/searx.redisdb.html#redis-db"><span class="std std-ref">Redis DB</span></a>).</p>
</aside>
<p>In such a SearXNG suite admins can maintain and access the debug log of the
services quite easy.</p>
<p>In the example above the SearXNG instance in the container is wrapped to
<code class="docutils literal notranslate"><span class="pre">http://n.n.n.140/searxng</span></code> to the HOST system. Note, on your HOST system, the
IP of your <code class="docutils literal notranslate"><span class="pre">searxng-archlinux</span></code> container is different to this example. To
test the instance in the container from outside of the container, in your WEB
browser on your desktop just open the URL reported in your installation</p>
</section>
<section id="in-containers-work-as-usual">
<span id="working-in-containers"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">In containers, work as usual</a><a class="headerlink" href="#in-containers-work-as-usual" title="Link to this heading"></a></h2>
<p>Usually you open a root-bash using <code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">-H</span> <span class="pre">bash</span></code>. In case of LXC containers
open the root-bash in the container is done by the <code class="docutils literal notranslate"><span class="pre">./utils/lxc.sh</span> <span class="pre">cmd</span>
<span class="pre">searxng-archlinux</span></code> command:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-4-ZGVza3RvcCAoSE9TVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-4-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="0">desktop (HOST)</button></div><div aria-labelledby="tab-4-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" id="panel-4-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>bash
INFO:<span class="w"> </span><span class="o">[</span>searxng-archlinux<span class="o">]</span><span class="w"> </span>bash
<span class="o">[</span>root@searxng-archlinux<span class="w"> </span>SearXNG<span class="o">]</span>$
</pre></div>
</div>
</div></div>
<p>The prompt <code class="docutils literal notranslate"><span class="pre">[root&#64;searxng-archlinux</span> <span class="pre">...]</span></code> signals, that you are the root user
in the container (GUEST). To debug the running SearXNG instance use:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-5-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-5-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root&#64;searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-5-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-5-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-5-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-5-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>inspect
...
use<span class="w"> </span><span class="o">[</span>CTRL-C<span class="o">]</span><span class="w"> </span>to<span class="w"> </span>stop<span class="w"> </span>monitoring<span class="w"> </span>the<span class="w"> </span>log
...
</pre></div>
</div>
</div><div aria-labelledby="tab-5-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-5-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>inspect
...
use<span class="w"> </span><span class="o">[</span>CTRL-C<span class="o">]</span><span class="w"> </span>to<span class="w"> </span>stop<span class="w"> </span>monitoring<span class="w"> </span>the<span class="w"> </span>log
...
</pre></div>
</div>
</div></div>
<p>Back in the browser on your desktop open the service <a class="reference external" href="http://n.n.n.140/searxng">http://n.n.n.140/searxng</a>
and run your application tests while the debug log is shown in the terminal from
above. You can stop monitoring using <code class="docutils literal notranslate"><span class="pre">CTRL-C</span></code>, this also disables the <em>“debug
option”</em> in SearXNGs settings file and restarts the SearXNG uwsgi application.</p>
<p>Another point we have to notice is that the service <a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">SearXNG</span></a>
runs under dedicated system user account with the same name (compare
<a class="reference internal" href="../admin/installation-searxng.html#create-searxng-user"><span class="std std-ref">Create user</span></a>). To get a login shell from these accounts, simply
call:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-6-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-6-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root&#64;searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-6-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-6-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-6-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-6-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>cmd<span class="w"> </span>bash<span class="w"> </span>-l
<span class="o">(</span>searx-pyenv<span class="o">)</span><span class="w"> </span><span class="o">[</span>searxng@searxng-archlinux<span class="w"> </span>~<span class="o">]</span>$<span class="w"> </span><span class="nb">pwd</span>
/usr/local/searxng
</pre></div>
</div>
</div><div aria-labelledby="tab-6-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-6-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>cmd<span class="w"> </span>bash<span class="w"> </span>-l
INFO:<span class="w"> </span><span class="o">[</span>searxng-archlinux<span class="o">]</span><span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>cmd<span class="w"> </span>bash<span class="w"> </span>-l
<span class="o">(</span>searx-pyenv<span class="o">)</span><span class="w"> </span><span class="o">[</span>searxng@searxng-archlinux<span class="w"> </span>~<span class="o">]</span>$<span class="w"> </span><span class="nb">pwd</span>
/usr/local/searxng
</pre></div>
</div>
</div></div>
<p>The prompt <code class="docutils literal notranslate"><span class="pre">[searxng&#64;searxng-archlinux]</span></code> signals that you are logged in as system
user <code class="docutils literal notranslate"><span class="pre">searxng</span></code> in the <code class="docutils literal notranslate"><span class="pre">searxng-archlinux</span></code> container and the python <em>virtualenv</em>
<code class="docutils literal notranslate"><span class="pre">(searxng-pyenv)</span></code> environment is activated.</p>
</section>
<section id="wrap-production-into-developer-suite">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Wrap production into developer suite</a><a class="headerlink" href="#wrap-production-into-developer-suite" title="Link to this heading"></a></h2>
<p>In this section we will see how to change the <em>“Fully functional SearXNG suite”</em>
from a LXC container (which is quite ready for production) into a developer
suite. For this, we have to keep an eye on the <a class="reference internal" href="../admin/installation-searxng.html#installation-basic"><span class="std std-ref">Step by step installation</span></a>:</p>
<ul class="simple">
<li><p>SearXNG setup in: <code class="docutils literal notranslate"><span class="pre">/etc/searxng/settings.yml</span></code></p></li>
<li><p>SearXNG users home: <code class="docutils literal notranslate"><span class="pre">/usr/local/searxng</span></code></p></li>
<li><p>virtualenv in: <code class="docutils literal notranslate"><span class="pre">/usr/local/searxng/searxng-pyenv</span></code></p></li>
<li><p>SearXNG software in: <code class="docutils literal notranslate"><span class="pre">/usr/local/searxng/searxng-src</span></code></p></li>
</ul>
<p>With the use of the <a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a> the SearXNG service was installed as
<a class="reference internal" href="../admin/installation-uwsgi.html#searxng-uwsgi"><span class="std std-ref">uWSGI application</span></a>. To maintain this service, we can use
<code class="docutils literal notranslate"><span class="pre">systemctl</span></code> (compare <a class="reference internal" href="../admin/installation-uwsgi.html#uwsgi-maintenance"><span class="std std-ref">uWSGI maintenance</span></a>).</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-7-dXdzZ2lAc2VhcnhuZw==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-7-dXdzZ2lAc2VhcnhuZw==" name="dXdzZ2lAc2VhcnhuZw==" role="tab" tabindex="0"><a class="reference external" href="mailto:uwsgi&#37;&#52;&#48;searxng">uwsgi<span>&#64;</span>searxng</a></button></div><div aria-labelledby="tab-7-dXdzZ2lAc2VhcnhuZw==" class="sphinx-tabs-panel group-tab" id="panel-7-dXdzZ2lAc2VhcnhuZw==" name="dXdzZ2lAc2VhcnhuZw==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>systemctl<span class="w"> </span>stop<span class="w"> </span>uwsgi@searxng
</pre></div>
</div>
</div></div>
<p>With the command above, we stopped the SearXNG uWSGI-App in the archlinux
container.</p>
<p>The uWSGI-App for the archlinux distros is configured in
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini">git://utils/templates/etc/uwsgi/apps-archlinux/searxng.ini</a>, from where at
least you should attend the settings of <code class="docutils literal notranslate"><span class="pre">uid</span></code>, <code class="docutils literal notranslate"><span class="pre">chdir</span></code>, <code class="docutils literal notranslate"><span class="pre">env</span></code> and
<code class="docutils literal notranslate"><span class="pre">http</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">env</span> <span class="o">=</span> <span class="n">SEARXNG_SETTINGS_PATH</span><span class="o">=/</span><span class="n">etc</span><span class="o">/</span><span class="n">searxng</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
<span class="n">http</span> <span class="o">=</span> <span class="mf">127.0.0.1</span><span class="p">:</span><span class="mi">8888</span>
<span class="n">chdir</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searxng</span><span class="o">/</span><span class="n">searxng</span><span class="o">-</span><span class="n">src</span><span class="o">/</span><span class="n">searx</span>
<span class="n">virtualenv</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searxng</span><span class="o">/</span><span class="n">searxng</span><span class="o">-</span><span class="n">pyenv</span>
<span class="n">pythonpath</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searxng</span><span class="o">/</span><span class="n">searxng</span><span class="o">-</span><span class="n">src</span>
</pre></div>
</div>
<p>If you have read the <a class="reference internal" href="../utils/lxc.sh.html#good-to-know"><span class="std std-ref">Good to know</span></a> you remember, that each container
shares the root folder of the repository and the command <code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span> <span class="pre">cmd</span></code>
handles relative path names <strong>transparent</strong>.</p>
<p>To wrap the SearXNG installation in the container into a developer one, we
simple have to create a symlink to the <strong>transparent</strong> repository from the
desktop. Now lets replace the repository at <code class="docutils literal notranslate"><span class="pre">searxng-src</span></code> in the container
with the working tree from outside of the container:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-8-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-8-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root&#64;searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-8-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-8-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-8-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-8-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>mv<span class="w"> </span>/usr/local/searxng/searxng-src<span class="w"> </span>/usr/local/searxng/searxng-src.old
$<span class="w"> </span>ln<span class="w"> </span>-s<span class="w"> </span>/share/SearXNG/<span class="w"> </span>/usr/local/searxng/searxng-src
</pre></div>
</div>
</div><div aria-labelledby="tab-8-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-8-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>mv<span class="w"> </span>/usr/local/searxng/searxng-src<span class="w"> </span>/usr/local/searxng/searxng-src.old
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>ln<span class="w"> </span>-s<span class="w"> </span>/share/SearXNG/<span class="w"> </span>/usr/local/searxng/searxng-src
</pre></div>
</div>
</div></div>
<p>Now we can develop as usual in the working tree of our desktop system. Every
time the software was changed, you have to restart the SearXNG service (in the
container):</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-9-dXdzZ2lAc2VhcnhuZw==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-9-dXdzZ2lAc2VhcnhuZw==" name="dXdzZ2lAc2VhcnhuZw==" role="tab" tabindex="0"><a class="reference external" href="mailto:uwsgi&#37;&#52;&#48;searxng">uwsgi<span>&#64;</span>searxng</a></button></div><div aria-labelledby="tab-9-dXdzZ2lAc2VhcnhuZw==" class="sphinx-tabs-panel group-tab" id="panel-9-dXdzZ2lAc2VhcnhuZw==" name="dXdzZ2lAc2VhcnhuZw==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>uwsgi@searxng
</pre></div>
</div>
</div></div>
<p>Remember: <a class="reference internal" href="#working-in-containers"><span class="std std-ref">In containers, work as usual</span></a> .. here are just some examples from my
daily usage:</p>
<p>To <em>inspect</em> the SearXNG instance (already described above):</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-10-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-10-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root&#64;searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-10-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-10-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-10-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-10-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./utils/searx.sh<span class="w"> </span>inspect<span class="w"> </span>service
</pre></div>
</div>
</div><div aria-labelledby="tab-10-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-10-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>./utils/searx.sh<span class="w"> </span>inspect<span class="w"> </span>service
</pre></div>
</div>
</div></div>
<p>Run <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile &amp; ./manage</span></a>, e.g. to test inside the container:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-11-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-11-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root&#64;searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-11-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-11-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-11-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-11-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span><span class="nb">test</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-11-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-11-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>make<span class="w"> </span><span class="nb">test</span>
</pre></div>
</div>
</div></div>
<p>To install all prerequisites needed for a <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-12-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-12-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root&#64;searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-12-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-12-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-12-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-12-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>buildhost
</pre></div>
</div>
</div><div aria-labelledby="tab-12-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-12-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>buildhost
</pre></div>
</div>
</div></div>
<p>To build the docs on a buildhost <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-13-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-13-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root&#64;searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-13-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-13-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-13-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-13-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docs.html
</pre></div>
</div>
</div><div aria-labelledby="tab-13-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-13-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>make<span class="w"> </span>docs.html
</pre></div>
</div>
</div></div>
</section>
<section id="summary">
<span id="lxcdev-summary"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">Summary</a><a class="headerlink" href="#summary" title="Link to this heading"></a></h2>
<p>We build up a fully functional SearXNG suite in a archlinux container:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>build<span class="w"> </span>searxng-archlinux
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>install<span class="w"> </span>suite<span class="w"> </span>searxng-archlinux
...
Developer<span class="w"> </span>install?<span class="w"> </span><span class="o">(</span>wraps<span class="w"> </span><span class="nb">source</span><span class="w"> </span>from<span class="w"> </span>HOST<span class="w"> </span>into<span class="w"> </span>the<span class="w"> </span>running<span class="w"> </span>instance<span class="o">)</span><span class="w"> </span><span class="o">[</span>YES/no<span class="o">]</span>
</pre></div>
</div>
<p>To wrap the suite into a developer one answer <code class="docutils literal notranslate"><span class="pre">YES</span></code> (or press Enter).</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>link SearXNG&#39;s sources to: /share/SearXNG
=========================================
mv -f &quot;/usr/local/searxng/searxng-src&quot; &quot;/usr/local/searxng/searxng-src.backup&quot;
ln -s &quot;/share/SearXNG&quot; &quot;/usr/local/searxng/searxng-src&quot;
ls -ld /usr/local/searxng/searxng-src
|searxng| lrwxrwxrwx 1 searxng searxng ... /usr/local/searxng/searxng-src -&gt; /share/SearXNG
</pre></div>
</div>
<p>On code modification the instance has to be restarted (see <a class="reference internal" href="../admin/installation-uwsgi.html#uwsgi-maintenance"><span class="std std-ref">uWSGI maintenance</span></a>):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>uwsgi@searxng
</pre></div>
</div>
<p>To access HTTP from the desktop we installed nginx for the services inside the
container:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>--<span class="w"> </span><span class="nv">FORCE_TIMEOUT</span><span class="o">=</span><span class="m">0</span><span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>nginx
</pre></div>
</div>
<p>To get information about the SearxNG suite in the archlinux container we can
use:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh show suite searxng-archlinux
[searxng-archlinux] INFO: (eth0) docs-live: http:///n.n.n.140:8080/
[searxng-archlinux] INFO: (eth0) IPv6: http://[fd42:555b:2af9:e121:216:3eff:fe5b:1744]
[searxng-archlinux] uWSGI:
[searxng-archlinux] SEARXNG_UWSGI_SOCKET : /usr/local/searxng/run/socket
[searxng-archlinux] environment /usr/local/searxng/searxng-src/utils/brand.env:
[searxng-archlinux] GIT_URL : https://github.com/searxng/searxng
[searxng-archlinux] GIT_BRANCH : master
[searxng-archlinux] SEARXNG_URL : http:///n.n.n.140/searxng
[searxng-archlinux] SEARXNG_PORT : 8888
[searxng-archlinux] SEARXNG_BIND_ADDRESS : 127.0.0.1
</pre></div>
</div>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Developing in Linux Containers</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#motivation">Motivation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#gentlemen-start-your-engines">Gentlemen, start your engines!</a></li>
<li class="toctree-l3"><a class="reference internal" href="#in-containers-work-as-usual">In containers, work as usual</a></li>
<li class="toctree-l3"><a class="reference internal" href="#wrap-production-into-developer-suite">Wrap production into developer suite</a></li>
<li class="toctree-l3"><a class="reference internal" href="#summary">Summary</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="translation.html" title="previous chapter">Translation</a>
<li>Next: <a href="makefile.html" title="next chapter">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/dev/lxcdev.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

653
dev/makefile.html Normal file
View file

@ -0,0 +1,653 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Makefile &amp; ./manage &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script src="../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/tabs.js?v=3030b3cb"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="reST primer" href="reST.html" />
<link rel="prev" title="Developing in Linux Containers" href="lxcdev.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="reST.html" title="reST primer"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="lxcdev.html" title="Developing in Linux Containers"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="makefile-manage">
<span id="makefile"></span><h1>Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code><a class="headerlink" href="#makefile-manage" title="Link to this heading"></a></h1>
<p>All relevant build and development tasks are implemented in the
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/manage">./manage</a> script and for CI or IDE integration a small
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/Makefile">git://Makefile</a> wrapper is available. If you are not familiar with
Makefiles, we recommend to read <a class="reference external" href="https://www.gnu.org/software/make/manual/make.html#Introduction">gnu-make</a> introduction.</p>
<aside class="sidebar">
<p class="sidebar-title">build environment</p>
<p>Before looking deeper at the targets, first read about <a class="reference internal" href="#make-install"><span class="std std-ref">Python environment (make install)</span></a>.</p>
<p>To install developer requirements follow <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>.</p>
</aside>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#python-environment-make-install" id="id15">Python environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>)</a></p></li>
<li><p><a class="reference internal" href="#make-buildenv" id="id16"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">buildenv</span></code></a></p></li>
<li><p><a class="reference internal" href="#node-js-environment-make-node-env" id="id17">Node.js environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code>)</a></p>
<ul>
<li><p><a class="reference internal" href="#nvm-make-nvm-install-nvm-status" id="id18">NVM <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.install</span> <span class="pre">nvm.status</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-nvm-nodejs" id="id19"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.nodejs</span></code></a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#make-run" id="id20"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-format-python" id="id21"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">format.python</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-clean" id="id22"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-docs" id="id23"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code></a></p>
<ul>
<li><p><a class="reference internal" href="#make-docs-clean-docs-live" id="id24"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.clean</span> <span class="pre">docs.live</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-docs-gh-pages" id="id25"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.gh-pages</span></code></a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#make-test" id="id26"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></p>
<ul>
<li><p><a class="reference internal" href="#make-test-shell" id="id27"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.shell</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-test-pylint" id="id28"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.pylint</span></code></a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#make-search-checker-engine-name" id="id29"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-themes" id="id30"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">themes.*</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-static-build" id="id31"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">static.build.*</span></code></a></p></li>
<li><p><a class="reference internal" href="#manage-redis-help" id="id32"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">redis.help</span></code></a></p></li>
<li><p><a class="reference internal" href="#manage-go-help" id="id33"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">go.help</span></code></a></p></li>
</ul>
</nav>
<p>The usage is simple, just type <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">{target-name}</span></code> to <em>build</em> a target.
Calling the <code class="docutils literal notranslate"><span class="pre">help</span></code> target gives a first overview (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">help</span></code>):</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-YGBtYWtlYGA=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-YGBtYWtlYGA=" name="YGBtYWtlYGA=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">make</span></code></button><button aria-controls="panel-0-YGAuL21hbmFnZWBg" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-YGAuL21hbmFnZWBg" name="YGAuL21hbmFnZWBg" role="tab" tabindex="-1"><code class="docutils literal notranslate"><span class="pre">./manage</span></code></button></div><div aria-labelledby="tab-0-YGBtYWtlYGA=" class="sphinx-tabs-panel group-tab" id="panel-0-YGBtYWtlYGA=" name="YGBtYWtlYGA=" role="tabpanel" tabindex="0"><div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm
nvm.: use nvm (without dot) to execute nvm commands directly
install : install NVM locally at /home/runner/work/searxng/searxng/.nvm
clean : remove NVM installation
status : prompt some status informations about nvm &amp; node
nodejs : install Node.js latest LTS
cmd ... : run command ... in NVM environment
bash : start bash interpreter with NVM environment sourced
buildenv:
rebuild ./utils/brand.env
webapp.:
run : run developer instance
docs.:
html : build HTML documentation
live : autobuild HTML documentation while editing
gh-pages : deploy on gh-pages branch
prebuild : build reST include files (./build/docs/includes)
clean : clean documentation build
docker.:
build : build docker image
push : build and push docker image
gecko.driver:
download &amp; install geckodriver if not already installed (required for
robot_tests)
redis:
build : build redis binaries at /home/runner/work/searxng/searxng/dist/redis/6.2.6/amd64
install : create user (searxng-redis) and install systemd service (searxng-redis)
help : show more redis commands
py.:
build : Build python packages at ./dist
clean : delete virtualenv and intermediate py files
pyenv.:
install : developer install of SearXNG into virtualenv
uninstall : uninstall developer installation
cmd ... : run command ... in virtualenv
OK : test if virtualenv is OK
pypi.upload:
Upload python packages to PyPi (to test use pypi.upload.test)
format.:
python : format Python code source using black
pygments.:
less : build LESS files for pygments
go.:
ls : list golang binary archives (stable)
golang : (re-) install golang binary in user&#39;s $HOME/local folder
install : install go package in user&#39;s $HOME/go-apps folder
bash : start bash interpreter with golang environment sourced
node.:
env : download &amp; install SearXNG&#39;s npm dependencies locally
env.dev : download &amp; install developer and CI tools
clean : drop locally npm installations
weblate.:
push.translations: push translation changes from SearXNG to Weblate&#39;s counterpart
to.translations: Update &#39;translations&#39; branch with last additions from Weblate.
data.:
all : update searx/sxng_locales.py and searx/data/*
traits : update searx/data/engine_traits.json &amp; searx/sxng_locales.py
useragents: update searx/data/useragents.json with the most recent versions of Firefox
test.:
yamllint : lint YAML files (YAMLLINT_FILES)
pylint : lint PYLINT_FILES, searx/engines, searx &amp; tests
pyright : static type check of python sources
black : check black code format
unit : run unit tests
coverage : run unit tests with coverage
robot : run robot test
rst : test .rst files incl. README.rst
clean : clean intermediate test stuff
themes.:
all : build all themes
live : to get live builds of CSS &amp; JS use &#39;LIVE_THEME=simple make run&#39;
simple.:
build : build simple theme
test : test simple theme
static.build.: [build] /static
commit : build &amp; commit /static folder
drop : drop last commit if it was previously done by static.build.commit
restore : git restore of the /static folder (after themes.all)
environment ...
SEARXNG_REDIS_URL :
----
run - run developer instance
install - developer install of SearxNG into virtualenv
uninstall - uninstall developer installation
clean - clean up working tree
search.checker - check search engines
test - run shell &amp; CI tests
test.shell - test shell scripts
ci.test - run CI tests
</pre></div>
</div>
</div><div aria-labelledby="tab-0-YGAuL21hbmFnZWBg" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-YGAuL21hbmFnZWBg" name="YGAuL21hbmFnZWBg" role="tabpanel" tabindex="0"><p>The Makefile targets are implemented for comfort, if you can do without
tab-completion and need to have a more granular control, use
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/manage">git://manage</a> without the Makefile wrappers.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./manage<span class="w"> </span><span class="nb">help</span>
</pre></div>
</div>
</div></div>
<section id="python-environment-make-install">
<span id="make-install"></span><h2><a class="toc-backref" href="#id15" role="doc-backlink">Python environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>)</a><a class="headerlink" href="#python-environment-make-install" title="Link to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">activate environment</p>
<p><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">./local/py3/bin/activate</span></code></p>
</aside>
<p>We do no longer need to build up the virtualenv manually. Jump into your git
working tree and release a <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code> to get a virtualenv with a
<em>developer install</em> of SearXNG (<a class="reference external" href="https://github.com/searxng/searxng/blob/master/setup.py">git://setup.py</a>).</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cd ~/searxng-clone
$ make install
PYENV [virtualenv] installing ./requirements*.txt into local/py3
...
PYENV OK
PYENV [install] pip install -e &#39;searx[test]&#39;
...
Successfully installed argparse-1.4.0 searx
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
BUILDENV build utils/brand.env
</pre></div>
</div>
<p>If you release <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code> multiple times the installation will only
rebuild if the sha256 sum of the <em>requirement files</em> fails. With other words:
the check fails if you edit the requirements listed in
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/requirements-dev.txt">git://requirements-dev.txt</a> and <a class="reference external" href="https://github.com/searxng/searxng/blob/master/requirements.txt">git://requirements.txt</a>).</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make install
PYENV OK
PYENV [virtualenv] requirements.sha256 failed
[virtualenv] - 6cea6eb6def9e14a18bf32f8a3e... ./requirements-dev.txt
[virtualenv] - 471efef6c73558e391c3adb35f4... ./requirements.txt
...
PYENV [virtualenv] installing ./requirements*.txt into local/py3
...
PYENV OK
PYENV [install] pip install -e &#39;searx[test]&#39;
...
Successfully installed argparse-1.4.0 searx
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
BUILDENV build utils/brand.env
</pre></div>
</div>
<aside class="sidebar">
<p class="sidebar-title">drop environment</p>
<p>To get rid of the existing environment before re-build use <a class="reference internal" href="#make-clean"><span class="std std-ref">clean target</span></a> first.</p>
</aside>
<p>If you think, something goes wrong with your ./local environment or you change
the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/setup.py">git://setup.py</a> file, you have to call <a class="reference internal" href="#make-clean"><span class="std std-ref">make clean</span></a>.</p>
</section>
<section id="make-buildenv">
<span id="id1"></span><h2><a class="toc-backref" href="#id16" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">buildenv</span></code></a><a class="headerlink" href="#make-buildenv" title="Link to this heading"></a></h2>
<p>Rebuild instances environment with the modified settings from the
<a class="reference internal" href="../admin/settings/settings_brand.html#settings-brand"><span class="std std-ref">brand:</span></a> and <a class="reference internal" href="../admin/settings/settings_server.html#settings-server"><span class="std std-ref">server:</span></a> section of your
<a class="reference internal" href="../admin/settings/settings.html#settings-location"><span class="std std-ref">settings.yml</span></a>.</p>
<blockquote>
<div><p>What is the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/utils/brand.env">git://utils/brand.env</a> needed for and why do you need to rebuild
it if necessary?</p>
<p>Short answer: <a class="reference internal" href="../admin/update-searxng.html#searxng-maintenance"><span class="std std-ref">installation and maintenance</span></a>
scripts are running outside of instances runtime environment and need some
values defined in the runtime environment.</p>
</div></blockquote>
<p>All the SearXNG setups are centralized in the <a class="reference internal" href="../admin/settings/settings.html#settings-yml"><span class="std std-ref">settings.yml</span></a> file. This
setup is available as long we are in a <em>installed instance</em>. E.g. the
<em>installed instance</em> on the server or the <em>installed developer instance</em> at
<code class="docutils literal notranslate"><span class="pre">./local</span></code> (the later one is created by a <a class="reference internal" href="#make-install"><span class="std std-ref">make install</span></a> or
<a class="reference internal" href="#make-run"><span class="std std-ref">make run</span></a>).</p>
<p>Tasks running outside of an <em>installed instance</em>, especially <a class="reference internal" href="../admin/update-searxng.html#searxng-maintenance"><span class="std std-ref">installation
and maintenance</span></a> tasks running at (pre-) installation time
do not have access to the SearXNG setup (from a <em>installed instance</em>). Those
tasks need a <em>build environment</em>.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">buildenv</span></code> target will update the <em>build environment</em> in:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/utils/brand.env">git://utils/brand.env</a></p></li>
</ul>
<p>Tasks running outside of an <em>installed instance</em>, need the following settings
from the YAML configuration:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">SEARXNG_URL</span></code> from <a class="reference internal" href="../admin/settings/settings_server.html#settings-server"><span class="std std-ref">server.base_url</span></a> (aka
<code class="docutils literal notranslate"><span class="pre">PUBLIC_URL</span></code>)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">SEARXNG_BIND_ADDRESS</span></code> from <a class="reference internal" href="../admin/settings/settings_server.html#settings-server"><span class="std std-ref">server.bind_address</span></a></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">SEARXNG_PORT</span></code> from <a class="reference internal" href="../admin/settings/settings_server.html#settings-server"><span class="std std-ref">server.port</span></a></p></li>
</ul>
<p>The <code class="docutils literal notranslate"><span class="pre">GIT_URL</span></code> and <code class="docutils literal notranslate"><span class="pre">GIT_BRANCH</span></code> in the origin:<cite>utils/brand.env</cite> file, are
read from the git VCS and the branch that is checked out when <code class="docutils literal notranslate"><span class="pre">make</span>
<span class="pre">buildenv</span></code> command runs.</p>
<p id="brand"><strong>I would like to create my own brand, how should I proceed?</strong></p>
<p>Create a remote branch (<code class="docutils literal notranslate"><span class="pre">example.org</span></code>), checkout the remote branch (on your
local developer desktop) and in the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">git://searx/settings.yml</a> file in the
<a class="reference internal" href="../admin/settings/settings_server.html#settings-server"><span class="std std-ref">server:</span></a> section set <code class="docutils literal notranslate"><span class="pre">base_url</span></code>. Run <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">buildenv</span></code> and
create a commit for your brand.</p>
<p>On your server you clone the branch (<code class="docutils literal notranslate"><span class="pre">example.org</span></code>) into your HOME folder
<code class="docutils literal notranslate"><span class="pre">~</span></code> from where you run the <a class="reference internal" href="../admin/installation.html#installation"><span class="std std-ref">installation</span></a> and
<a class="reference internal" href="../admin/update-searxng.html#searxng-maintenance"><span class="std std-ref">maintenance</span></a> task.</p>
<p>To upgrade you brand, rebase on SearXNGs master branch (on your local
developer desktop), force push it to your remote branch. Go to your server, do
a force pull and run <a class="reference internal" href="../admin/update-searxng.html#update-searxng"><span class="std std-ref">sudo -H ./utils/searxng.sh instance update</span></a>.</p>
</section>
<section id="node-js-environment-make-node-env">
<span id="make-node-env"></span><h2><a class="toc-backref" href="#id17" role="doc-backlink">Node.js environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code>)</a><a class="headerlink" href="#node-js-environment-make-node-env" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://nodejs.org/">Node.js</a> version 16.13.0 or higher is required to build the themes.
If the requirement is not met, the build chain uses <a class="reference external" href="https://github.com/nvm-sh">nvm</a> (Node Version
Manager) to install latest LTS of <a class="reference external" href="https://nodejs.org/">Node.js</a> locally: there is no need to
install <a class="reference external" href="https://github.com/nvm-sh">nvm</a> or <a class="reference external" href="https://www.npmjs.com/">npm</a> on your system.</p>
<p>To install <a class="reference external" href="https://github.com/nvm-sh">NVM</a> and <a class="reference external" href="https://nodejs.org/">Node.js</a> in once you can use <a class="reference internal" href="#make-nvm-nodejs"><span class="std std-ref">make nvm.nodejs</span></a>.</p>
<section id="nvm-make-nvm-install-nvm-status">
<span id="make-nvm"></span><h3><a class="toc-backref" href="#id18" role="doc-backlink">NVM <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.install</span> <span class="pre">nvm.status</span></code></a><a class="headerlink" href="#nvm-make-nvm-install-nvm-status" title="Link to this heading"></a></h3>
<p>Use <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.status</span></code> to get the current status of your <a class="reference external" href="https://nodejs.org/">Node.js</a> and <a class="reference external" href="https://github.com/nvm-sh">nvm</a>
setup.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-bnZtLmluc3RhbGw=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-bnZtLmluc3RhbGw=" name="bnZtLmluc3RhbGw=" role="tab" tabindex="0">nvm.install</button><button aria-controls="panel-1-bnZtLnN0YXR1cyAodWJ1MjAwNCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-bnZtLnN0YXR1cyAodWJ1MjAwNCk=" name="bnZtLnN0YXR1cyAodWJ1MjAwNCk=" role="tab" tabindex="-1">nvm.status (ubu2004)</button></div><div aria-labelledby="tab-1-bnZtLmluc3RhbGw=" class="sphinx-tabs-panel group-tab" id="panel-1-bnZtLmluc3RhbGw=" name="bnZtLmluc3RhbGw=" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nv">LANG</span><span class="o">=</span>C<span class="w"> </span>make<span class="w"> </span>nvm.install
INFO:<span class="w"> </span>install<span class="w"> </span><span class="o">(</span>update<span class="o">)</span><span class="w"> </span>NVM<span class="w"> </span>at<span class="w"> </span>./searxng/.nvm
INFO:<span class="w"> </span>clone:<span class="w"> </span>https://github.com/nvm-sh/nvm.git
<span class="w"> </span><span class="o">||</span><span class="w"> </span>Cloning<span class="w"> </span>into<span class="w"> </span><span class="s1">&#39;./searxng/.nvm&#39;</span>...
INFO:<span class="w"> </span>checkout<span class="w"> </span>v0.39.4
<span class="w"> </span><span class="o">||</span><span class="w"> </span>HEAD<span class="w"> </span>is<span class="w"> </span>now<span class="w"> </span>at<span class="w"> </span>8fbf8ab<span class="w"> </span>v0.39.4
</pre></div>
</div>
</div><div aria-labelledby="tab-1-bnZtLnN0YXR1cyAodWJ1MjAwNCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-bnZtLnN0YXR1cyAodWJ1MjAwNCk=" name="bnZtLnN0YXR1cyAodWJ1MjAwNCk=" role="tabpanel" tabindex="0"><p>Here is the output you will typically get on a Ubuntu 20.04 system which
serves only a <a class="reference external" href="https://nodejs.org/en/about/releases/">no longer active</a>
Release <a class="reference external" href="https://packages.ubuntu.com/focal/nodejs">Node.js v10.19.0</a>.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>nvm.status
INFO:<span class="w"> </span>Node.js<span class="w"> </span>is<span class="w"> </span>installed<span class="w"> </span>at<span class="w"> </span>/usr/bin/node
INFO:<span class="w"> </span>Node.js<span class="w"> </span>is<span class="w"> </span>version<span class="w"> </span>v10.19.0
WARN:<span class="w"> </span>minimal<span class="w"> </span>Node.js<span class="w"> </span>version<span class="w"> </span>is<span class="w"> </span><span class="m">16</span>.13.0
INFO:<span class="w"> </span>npm<span class="w"> </span>is<span class="w"> </span>installed<span class="w"> </span>at<span class="w"> </span>/usr/bin/npm
INFO:<span class="w"> </span>npm<span class="w"> </span>is<span class="w"> </span>version<span class="w"> </span><span class="m">6</span>.14.4
WARN:<span class="w"> </span>NVM<span class="w"> </span>is<span class="w"> </span>not<span class="w"> </span>installed
</pre></div>
</div>
</div></div>
</section>
<section id="make-nvm-nodejs">
<span id="id2"></span><h3><a class="toc-backref" href="#id19" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.nodejs</span></code></a><a class="headerlink" href="#make-nvm-nodejs" title="Link to this heading"></a></h3>
<p>Install latest <a class="reference external" href="https://nodejs.org/">Node.js</a> LTS locally (uses <a class="reference external" href="https://github.com/nvm-sh">nvm</a>):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make nvm.nodejs
INFO: install (update) NVM at /share/searxng/.nvm
INFO: clone: https://github.com/nvm-sh/nvm.git
...
Downloading and installing node v16.13.0...
...
INFO: Node.js is installed at searxng/.nvm/versions/node/v16.13.0/bin/node
INFO: Node.js is version v16.13.0
INFO: npm is installed at searxng/.nvm/versions/node/v16.13.0/bin/npm
INFO: npm is version 8.1.0
INFO: NVM is installed at searxng/.nvm
</pre></div>
</div>
</section>
</section>
<section id="make-run">
<span id="id3"></span><h2><a class="toc-backref" href="#id20" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a><a class="headerlink" href="#make-run" title="Link to this heading"></a></h2>
<p>To get up a running a developer instance simply call <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code>. This enables
<em>debug</em> option in <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">git://searx/settings.yml</a>, starts a <code class="docutils literal notranslate"><span class="pre">./searx/webapp.py</span></code>
instance and opens the URL in your favorite WEB browser (<a class="reference external" href="https://manpages.debian.org/jump?q=xdg-open">xdg-open</a>):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make run
</pre></div>
</div>
<p>Changes to themes HTML templates (jinja2) are instant. Changes to the CSS &amp; JS
sources of the theme need to be rebuild. You can do that by running:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make themes.all
</pre></div>
</div>
<p>Alternatively to <code class="docutils literal notranslate"><span class="pre">themes.all</span></code> you can run <em>live builds</em> of the theme you are
modify (<a class="reference internal" href="#make-themes"><span class="std std-ref">make themes.*</span></a>):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ LIVE_THEME=simple make run
</pre></div>
</div>
</section>
<section id="make-format-python">
<span id="id4"></span><h2><a class="toc-backref" href="#id21" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">format.python</span></code></a><a class="headerlink" href="#make-format-python" title="Link to this heading"></a></h2>
<p>Format Python source code using <a class="reference external" href="https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html">Black code style</a>. See <code class="docutils literal notranslate"><span class="pre">$BLACK_OPTIONS</span></code>
and <code class="docutils literal notranslate"><span class="pre">$BLACK_TARGETS</span></code> in <a class="reference external" href="https://github.com/searxng/searxng/blob/master/Makefile">git://Makefile</a>.</p>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>We stuck at Black 22.12.0, please read comment in PR <a class="reference external" href="https://github.com/searxng/searxng/pull/2159#pullrequestreview-1284094735">Bump black from 22.12.0
to 23.1.0</a></p>
</div>
</section>
<section id="make-clean">
<span id="id5"></span><h2><a class="toc-backref" href="#id22" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a><a class="headerlink" href="#make-clean" title="Link to this heading"></a></h2>
<p>Drops all intermediate files, all builds, but keep sources untouched. Before
calling <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code> stop all processes using the <a class="reference internal" href="#make-install"><span class="std std-ref">Python environment (make install)</span></a> or
<a class="reference internal" href="#make-node-env"><span class="std std-ref">Node.js environment (make node.env)</span></a>.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make clean
CLEAN pyenv
PYENV [virtualenv] drop local/py3
CLEAN docs -- build/docs dist/docs
CLEAN themes -- locally installed npm dependencies
...
CLEAN test stuff
CLEAN common files
</pre></div>
</div>
</section>
<section id="make-docs">
<span id="id6"></span><h2><a class="toc-backref" href="#id23" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code></a><a class="headerlink" href="#make-docs" title="Link to this heading"></a></h2>
<p>Target <code class="docutils literal notranslate"><span class="pre">docs</span></code> builds the documentation:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docs
HTML<span class="w"> </span>./docs<span class="w"> </span>--&gt;<span class="w"> </span>file://
DOCS<span class="w"> </span>build<span class="w"> </span>build/docs/includes
...
The<span class="w"> </span>HTML<span class="w"> </span>pages<span class="w"> </span>are<span class="w"> </span><span class="k">in</span><span class="w"> </span>dist/docs.
</pre></div>
</div>
<section id="make-docs-clean-docs-live">
<span id="make-docs-clean"></span><h3><a class="toc-backref" href="#id24" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.clean</span> <span class="pre">docs.live</span></code></a><a class="headerlink" href="#make-docs-clean-docs-live" title="Link to this heading"></a></h3>
<p>We describe the usage of the <code class="docutils literal notranslate"><span class="pre">doc.*</span></code> targets in the <a class="reference internal" href="contribution_guide.html#contrib-docs"><span class="std std-ref">How to contribute /
Documentation</span></a> section. If you want to edit the documentation
read our <a class="reference internal" href="contribution_guide.html#make-docs-live"><span class="std std-ref">live build</span></a> section. If you are working in your own brand,
adjust your <a class="reference internal" href="../admin/settings/settings_brand.html#settings-brand"><span class="std std-ref">brand:</span></a>.</p>
</section>
<section id="make-docs-gh-pages">
<span id="id7"></span><h3><a class="toc-backref" href="#id25" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.gh-pages</span></code></a><a class="headerlink" href="#make-docs-gh-pages" title="Link to this heading"></a></h3>
<p>To deploy on github.io first adjust your <a class="reference internal" href="../admin/settings/settings_brand.html#settings-brand"><span class="std std-ref">brand:</span></a>. For any
further read <a class="reference internal" href="contribution_guide.html#deploy-on-github-io"><span class="std std-ref">deploy on github.io</span></a>.</p>
</section>
</section>
<section id="make-test">
<span id="id8"></span><h2><a class="toc-backref" href="#id26" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a><a class="headerlink" href="#make-test" title="Link to this heading"></a></h2>
<p>Runs a series of tests: <a class="reference internal" href="#make-test-pylint"><span class="std std-ref">make test.pylint</span></a>, <code class="docutils literal notranslate"><span class="pre">test.pep8</span></code>, <code class="docutils literal notranslate"><span class="pre">test.unit</span></code>
and <code class="docutils literal notranslate"><span class="pre">test.robot</span></code>. You can run tests selective, e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make test.pep8 test.unit test.shell
TEST test.pep8 OK
...
TEST test.unit OK
...
TEST test.shell OK
</pre></div>
</div>
<section id="make-test-shell">
<span id="id9"></span><h3><a class="toc-backref" href="#id27" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.shell</span></code></a><a class="headerlink" href="#make-test-shell" title="Link to this heading"></a></h3>
<p><a class="reference internal" href="../admin/buildhosts.html#sh-lint"><span class="std std-ref">Lint shell scripts</span></a> / if you have changed some bash scripting run this test before
commit.</p>
</section>
<section id="make-test-pylint">
<span id="id10"></span><h3><a class="toc-backref" href="#id28" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.pylint</span></code></a><a class="headerlink" href="#make-test-pylint" title="Link to this heading"></a></h3>
<p><a class="reference external" href="https://www.pylint.org/">Pylint</a> is known as one of the best source-code, bug and quality checker for the
Python programming language. The pylint profile used in the SearXNG project is
found in projects root folder <a class="reference external" href="https://github.com/searxng/searxng/blob/master/.pylintrc">git://.pylintrc</a>.</p>
</section>
</section>
<section id="make-search-checker-engine-name">
<span id="make-search-checker"></span><h2><a class="toc-backref" href="#id29" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a><a class="headerlink" href="#make-search-checker-engine-name" title="Link to this heading"></a></h2>
<p>To check all engines:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span>
</pre></div>
</div>
<p>To check a engine with whitespace in the name like <em>google news</em> replace space
by underline:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span><span class="o">.</span><span class="n">google_news</span>
</pre></div>
</div>
<p>To see HTTP requests and more use SEARXNG_DEBUG:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">SEARXNG_DEBUG</span><span class="o">=</span><span class="mi">1</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span><span class="o">.</span><span class="n">google_news</span>
</pre></div>
</div>
<p>To filter out HTTP redirects (<a class="reference external" href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection">3xx</a>):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">SEARXNG_DEBUG</span><span class="o">=</span><span class="mi">1</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span><span class="o">.</span><span class="n">google_news</span> <span class="o">|</span> <span class="n">grep</span> <span class="o">-</span><span class="n">A1</span> <span class="s2">&quot;HTTP/1.1</span><span class="se">\&quot;</span><span class="s2"> 3[0-9][0-9]&quot;</span>
<span class="o">...</span>
<span class="n">Engine</span> <span class="n">google</span> <span class="n">news</span> <span class="n">Checking</span>
<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">&quot;GET /search?q=life&amp;hl=en&amp;lr=lang_en&amp;ie=utf8&amp;oe=utf8&amp;ceid=US%3Aen&amp;gl=US HTTP/1.1&quot;</span> <span class="mi">302</span> <span class="mi">0</span>
<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">&quot;GET /search?q=life&amp;hl=en-US&amp;lr=lang_en&amp;ie=utf8&amp;oe=utf8&amp;ceid=US:en&amp;gl=US HTTP/1.1&quot;</span> <span class="mi">200</span> <span class="kc">None</span>
<span class="o">--</span>
<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">&quot;GET /search?q=computer&amp;hl=en&amp;lr=lang_en&amp;ie=utf8&amp;oe=utf8&amp;ceid=US%3Aen&amp;gl=US HTTP/1.1&quot;</span> <span class="mi">302</span> <span class="mi">0</span>
<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">&quot;GET /search?q=computer&amp;hl=en-US&amp;lr=lang_en&amp;ie=utf8&amp;oe=utf8&amp;ceid=US:en&amp;gl=US HTTP/1.1&quot;</span> <span class="mi">200</span> <span class="kc">None</span>
<span class="o">--</span>
</pre></div>
</div>
</section>
<section id="make-themes">
<span id="id11"></span><h2><a class="toc-backref" href="#id30" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">themes.*</span></code></a><a class="headerlink" href="#make-themes" title="Link to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference internal" href="quickstart.html#devquickstart"><span class="std std-ref">Development Quickstart</span></a></p></li>
</ul>
</aside>
<p>The <a class="reference external" href="https://github.com/searxng/searxng/blob/master/Makefile">git://Makefile</a> targets <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">theme.*</span></code> cover common tasks to build the
theme(s). The <code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">themes.*</span></code> command line can be used to convenient run
common theme build tasks.</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm
themes.:
all : build all themes
live : to get live builds of CSS &amp; JS use &#39;LIVE_THEME=simple make run&#39;
simple.:
build : build simple theme
test : test simple theme
</pre></div>
</div>
<p>To get live builds while modifying CSS &amp; JS use (<a class="reference internal" href="#make-run"><span class="std std-ref">make run</span></a>):</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nv">LIVE_THEME</span><span class="o">=</span>simple<span class="w"> </span>make<span class="w"> </span>run
</pre></div>
</div>
</section>
<section id="make-static-build">
<span id="id12"></span><h2><a class="toc-backref" href="#id31" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">static.build.*</span></code></a><a class="headerlink" href="#make-static-build" title="Link to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference internal" href="quickstart.html#devquickstart"><span class="std std-ref">Development Quickstart</span></a></p></li>
</ul>
</aside>
<p>The <a class="reference external" href="https://github.com/searxng/searxng/blob/master/Makefile">git://Makefile</a> targets <code class="docutils literal notranslate"><span class="pre">static.build.*</span></code> cover common tasks to build (a
commit of) the static files. The <code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">static.build..*</span></code> command line
can be used to convenient run common build tasks of the static files.</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm
static.build.: [build] /static
commit : build &amp; commit /static folder
drop : drop last commit if it was previously done by static.build.commit
restore : git restore of the /static folder (after themes.all)
</pre></div>
</div>
</section>
<section id="manage-redis-help">
<span id="id13"></span><h2><a class="toc-backref" href="#id32" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">redis.help</span></code></a><a class="headerlink" href="#manage-redis-help" title="Link to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">redis.*</span></code> command line can be used to convenient run common Redis
tasks (<a class="reference internal" href="../admin/settings/settings_redis.html#redis-developer-notes"><span class="std std-ref">Redis Developer Notes</span></a>).</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm
redis.:
devpkg : install essential packages to compile redis
build : build redis binaries at /home/runner/work/searxng/searxng/dist/redis/6.2.6/amd64
install : create user (searxng-redis) and install systemd service (searxng-redis)
remove : delete user (searxng-redis) and remove service (searxng-redis)
shell : start bash interpreter from user searxng-redis
src : clone redis source code to &lt;path&gt; and checkput 6.2.6
useradd : create user (searxng-redis) at /usr/local/searxng-redis
userdel : delete user (searxng-redis)
addgrp : add &lt;user&gt; to group (searxng-redis)
rmgrp : remove &lt;user&gt; from group (searxng-redis)
</pre></div>
</div>
</section>
<section id="manage-go-help">
<span id="id14"></span><h2><a class="toc-backref" href="#id33" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">go.help</span></code></a><a class="headerlink" href="#manage-go-help" title="Link to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">go.*</span></code> command line can be used to convenient run common <a class="reference external" href="https://en.wikipedia.org/wiki/Go_(programming_language)">go
(wiki)</a> tasks.</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm
go.:
ls : list golang binary archives (stable)
golang : (re-) install golang binary in user&#39;s $HOME/local folder
install : install go package in user&#39;s $HOME/go-apps folder
bash : start bash interpreter with golang environment sourced
</pre></div>
</div>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a><ul>
<li class="toctree-l3"><a class="reference internal" href="#python-environment-make-install">Python environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>)</a></li>
<li class="toctree-l3"><a class="reference internal" href="#make-buildenv"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">buildenv</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#node-js-environment-make-node-env">Node.js environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code>)</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#nvm-make-nvm-install-nvm-status">NVM <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.install</span> <span class="pre">nvm.status</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#make-nvm-nodejs"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.nodejs</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#make-run"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#make-format-python"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">format.python</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#make-clean"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#make-docs"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="#make-docs-clean-docs-live"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.clean</span> <span class="pre">docs.live</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#make-docs-gh-pages"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.gh-pages</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#make-test"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="#make-test-shell"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.shell</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#make-test-pylint"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.pylint</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#make-search-checker-engine-name"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#make-themes"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">themes.*</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#make-static-build"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">static.build.*</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#manage-redis-help"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">redis.help</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#manage-go-help"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">go.help</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="lxcdev.html" title="previous chapter">Developing in Linux Containers</a>
<li>Next: <a href="reST.html" title="next chapter">reST primer</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/dev/makefile.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

265
dev/plugins.html Normal file
View file

@ -0,0 +1,265 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Plugins &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script src="../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Translation" href="translation.html" />
<link rel="prev" title="Search API" href="search_api.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="translation.html" title="Translation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="search_api.html" title="Search API"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Plugins</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="plugins">
<span id="dev-plugin"></span><h1>Plugins<a class="headerlink" href="#plugins" title="Link to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="../admin/plugins.html#plugins-generic"><span class="std std-ref">Plugins builtin</span></a></p></li>
</ul>
</aside>
<p>Plugins can extend or replace functionality of various components of searx.</p>
<section id="example-plugin">
<h2>Example plugin<a class="headerlink" href="#example-plugin" title="Link to this heading"></a></h2>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">name</span> <span class="o">=</span> <span class="s1">&#39;Example plugin&#39;</span>
<span class="n">description</span> <span class="o">=</span> <span class="s1">&#39;This plugin extends the suggestions with the word &quot;example&quot;&#39;</span>
<span class="n">default_on</span> <span class="o">=</span> <span class="kc">False</span> <span class="c1"># disabled by default</span>
<span class="c1"># attach callback to the post search hook</span>
<span class="c1"># request: flask request object</span>
<span class="c1"># ctx: the whole local context of the post search hook</span>
<span class="k">def</span> <span class="nf">post_search</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">search</span><span class="p">):</span>
<span class="n">search</span><span class="o">.</span><span class="n">result_container</span><span class="o">.</span><span class="n">suggestions</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s1">&#39;example&#39;</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
</pre></div>
</div>
</section>
<section id="external-plugins">
<h2>External plugins<a class="headerlink" href="#external-plugins" title="Link to this heading"></a></h2>
<p>SearXNG supports <em>external plugins</em> / there is no need to install one, SearXNG
runs out of the box. But to demonstrate; in the example below we install the
SearXNG plugins from <em>The Green Web Foundation</em> <a class="reference external" href="https://www.thegreenwebfoundation.org/news/searching-the-green-web-with-searx/">[ref]</a>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>cmd<span class="w"> </span>bash<span class="w"> </span>-c
<span class="o">(</span>searxng-pyenv<span class="o">)</span>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>git+https://github.com/return42/tgwf-searx-plugins
</pre></div>
</div>
<p>In the <a class="reference internal" href="../admin/settings/settings.html#settings-yml"><span class="std std-ref">settings.yml</span></a> activate the <code class="docutils literal notranslate"><span class="pre">plugins:</span></code> section and add module
<code class="docutils literal notranslate"><span class="pre">only_show_green_results</span></code> from <code class="docutils literal notranslate"><span class="pre">tgwf-searx-plugins</span></code>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">plugins</span><span class="p">:</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">- only_show_green_results</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</pre></div>
</div>
</section>
<section id="plugin-entry-points">
<h2>Plugin entry points<a class="headerlink" href="#plugin-entry-points" title="Link to this heading"></a></h2>
<p>Entry points (hooks) define when a plugin runs. Right now only three hooks are
implemented. So feel free to implement a hook if it fits the behaviour of your
plugin. A plugin doesnt need to implement all the hooks.</p>
<dl class="py function">
<dt class="sig sig-object py" id="pre_search">
<span class="sig-name descname"><span class="pre">pre_search</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">search</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></span></span><a class="headerlink" href="#pre_search" title="Link to this definition"></a></dt>
<dd><p>Runs BEFORE the search request.</p>
<p><cite>search.result_container</cite> can be changed.</p>
<p>Return a boolean:</p>
<ul class="simple">
<li><p>True to continue the search</p></li>
<li><p>False to stop the search</p></li>
</ul>
<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>request</strong> (<em>flask.request</em>) </p></li>
<li><p><strong>search</strong> (<a class="reference internal" href="../src/searx.search.html#searx.search.SearchWithPlugins" title="searx.search.SearchWithPlugins"><em>searx.search.SearchWithPlugins</em></a>) </p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>False to stop the search</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)">bool</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="post_search">
<span class="sig-name descname"><span class="pre">post_search</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">search</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.12)"><span class="pre">None</span></a></span></span><a class="headerlink" href="#post_search" title="Link to this definition"></a></dt>
<dd><p>Runs AFTER the search request.</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>request</strong> (<em>flask.request</em>) Flask request.</p></li>
<li><p><strong>search</strong> (<a class="reference internal" href="../src/searx.search.html#searx.search.SearchWithPlugins" title="searx.search.SearchWithPlugins"><em>searx.search.SearchWithPlugins</em></a>) Context.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="on_result">
<span class="sig-name descname"><span class="pre">on_result</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">search</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">result</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></span></span><a class="headerlink" href="#on_result" title="Link to this definition"></a></dt>
<dd><p>Runs for each result of each engine.</p>
<p><cite>result</cite> can be changed.</p>
<p>If <cite>result[“url”]</cite> is defined, then <cite>result[“parsed_url”] = urlparse(result[url])</cite></p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p><cite>result[“url”]</cite> can be changed, but <cite>result[“parsed_url”]</cite> must be updated too.</p>
</div>
<p>Return a boolean:</p>
<ul class="simple">
<li><p>True to keep the result</p></li>
<li><p>False to remove the result</p></li>
</ul>
<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>request</strong> (<em>flask.request</em>) </p></li>
<li><p><strong>search</strong> (<a class="reference internal" href="../src/searx.search.html#searx.search.SearchWithPlugins" title="searx.search.SearchWithPlugins"><em>searx.search.SearchWithPlugins</em></a>) </p></li>
<li><p><strong>result</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.12)"><em>Dict</em></a>) Result, see - <a class="reference internal" href="engines/engine_overview.html#engine-results"><span class="std std-ref">Result Types (template)</span></a></p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>True to keep the result</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)">bool</a></p>
</dd>
</dl>
</dd></dl>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Plugins</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#example-plugin">Example plugin</a></li>
<li class="toctree-l3"><a class="reference internal" href="#external-plugins">External plugins</a></li>
<li class="toctree-l3"><a class="reference internal" href="#plugin-entry-points">Plugin entry points</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#pre_search"><code class="docutils literal notranslate"><span class="pre">pre_search()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#post_search"><code class="docutils literal notranslate"><span class="pre">post_search()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#on_result"><code class="docutils literal notranslate"><span class="pre">on_result()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="search_api.html" title="previous chapter">Search API</a>
<li>Next: <a href="translation.html" title="next chapter">Translation</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/dev/plugins.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

201
dev/quickstart.html Normal file
View file

@ -0,0 +1,201 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Development Quickstart &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script src="../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Runtime Management" href="rtm_asdf.html" />
<link rel="prev" title="Developer documentation" href="index.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="rtm_asdf.html" title="Runtime Management"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Developer documentation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Development Quickstart</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="development-quickstart">
<span id="devquickstart"></span><h1>Development Quickstart<a class="headerlink" href="#development-quickstart" title="Link to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile &amp; ./manage</span></a></p></li>
<li><p><a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a></p></li>
</ul>
</aside>
<p>SearXNG loves developers; Developers do not need to worry about tool chains, the
usual developer tasks can be comfortably executed via <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">make</span></a>.</p>
<p>Dont hesitate, just clone SearXNGs sources and start hacking right now ..</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/searxng/searxng.git<span class="w"> </span>searxng
</pre></div>
</div>
<p>Here is how a minimal workflow looks like:</p>
<ol class="arabic simple">
<li><p><em>start</em> hacking</p></li>
<li><p><em>run</em> your code: <a class="reference internal" href="makefile.html#make-run"><span class="std std-ref">make run</span></a></p></li>
<li><p><em>format &amp; test</em> your code: <a class="reference internal" href="makefile.html#make-format-python"><span class="std std-ref">make format.python</span></a> and <a class="reference internal" href="makefile.html#make-test"><span class="std std-ref">make test</span></a></p></li>
</ol>
<p>If you think at some point something fails, go back to <em>start</em>. Otherwise,
choose a meaningful commit message and we are happy to receive your pull
request. To not end in <em>wild west</em> we have some directives, please pay attention
to our “<a class="reference internal" href="contribution_guide.html#how-to-contribute"><span class="std std-ref">How to contribute</span></a>” guideline.</p>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference internal" href="makefile.html#make-nvm"><span class="std std-ref">NVM make nvm.install nvm.status</span></a></p></li>
<li><p><a class="reference internal" href="makefile.html#make-themes"><span class="std std-ref">make themes.*</span></a></p></li>
</ul>
</aside>
<p>If you implement themes, you will need to setup a <a class="reference internal" href="makefile.html#make-node-env"><span class="std std-ref">Node.js environment</span></a>: <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code></p>
<p>Before you call <em>make run</em> (2.), you need to compile the modified styles and
JavaScript: <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">themes.all</span></code></p>
<p>Alternatively you can also compile selective the theme you have modified,
e.g. the <em>simple</em> theme.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span>themes.simple
</pre></div>
</div>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>To get live builds while modifying CSS &amp; JS use: <code class="docutils literal notranslate"><span class="pre">LIVE_THEME=simple</span> <span class="pre">make</span> <span class="pre">run</span></code></p>
</div>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference internal" href="makefile.html#make-static-build"><span class="std std-ref">make static.build.*</span></a></p></li>
</ul>
</aside>
<p>If you finished your <em>tests</em> you can start to commit your changes. To separate
the modified source code from the build products first run:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span>static.build.restore
</pre></div>
</div>
<p>This will restore the old build products and only your changes of the code
remain in the working tree which can now be added &amp; committed. When all sources
are committed, you can commit the build products simply by:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span>static.build.commit
</pre></div>
</div>
<p>Committing the build products should be the last step, just before you send us
your PR. There is also a make target to rewind this last build commit:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span>static.build.drop
</pre></div>
</div>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="index.html" title="previous chapter">Developer documentation</a>
<li>Next: <a href="rtm_asdf.html" title="next chapter">Runtime Management</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/dev/quickstart.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

1748
dev/reST.html Normal file

File diff suppressed because it is too large Load diff

234
dev/rtm_asdf.html Normal file
View file

@ -0,0 +1,234 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Runtime Management &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script src="../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="How to contribute" href="contribution_guide.html" />
<link rel="prev" title="Development Quickstart" href="quickstart.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="contribution_guide.html" title="How to contribute"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="quickstart.html" title="Development Quickstart"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Runtime Management</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="runtime-management">
<h1>Runtime Management<a class="headerlink" href="#runtime-management" title="Link to this heading"></a></h1>
<p>The runtimes are managed with asdf and are activated in this project via the
<a class="reference external" href=".tool-versions">.tool-versions</a>. If you have not yet installed <a class="reference external" href="https://asdf-vm.com/">asdf</a>, then
chapter <a class="reference internal" href="#introduce-asdf"><span class="std std-ref">Introduce asdf</span></a> may be of help to you.</p>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#get-started" id="id2">Get started</a></p></li>
<li><p><a class="reference internal" href="#manage-versions" id="id3">Manage Versions</a></p></li>
<li><p><a class="reference internal" href="#introduce-asdf" id="id4">Introduce asdf</a></p></li>
</ul>
</nav>
<section id="get-started">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Get started</a><a class="headerlink" href="#get-started" title="Link to this heading"></a></h2>
<p>If you have asdf installed you can install the runtimes of this project by:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>/path/to/searxng
$<span class="w"> </span>asdf<span class="w"> </span>install<span class="w"> </span><span class="c1"># will install runtimes listed in .tool-versions</span>
...
</pre></div>
</div>
</section>
<section id="manage-versions">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Manage Versions</a><a class="headerlink" href="#manage-versions" title="Link to this heading"></a></h2>
<p>If you want to perform a <code class="docutils literal notranslate"><span class="pre">test</span></code> with special runtime versions of nodejs,
python or shellcheck, you can patch the <code class="docutils literal notranslate"><span class="pre">.tool-versions</span></code>:</p>
<div class="highlight-diff notranslate"><div class="highlight"><pre><span></span><span class="gd">--- a/.tool-versions</span>
<span class="gi">+++ b/.tool-versions</span>
<span class="gu">@@ -1,2 +1,2 @@</span>
<span class="gd">-python 3.12.0</span>
<span class="gd">-shellcheck 0.9.0</span>
<span class="gi">+python 3.11.6</span>
<span class="gi">+shellcheck 0.8.0</span>
</pre></div>
</div>
<p>To install use <code class="docutils literal notranslate"><span class="pre">asdf</span> <span class="pre">install</span></code> again. If the runtime tools have changed, any
existing (nodejs and python) environments should be cleaned up with a <code class="docutils literal notranslate"><span class="pre">make</span>
<span class="pre">clean</span></code>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>asdf<span class="w"> </span>install
...
$<span class="w"> </span>make<span class="w"> </span>clean<span class="w"> </span><span class="nb">test</span>
</pre></div>
</div>
</section>
<section id="introduce-asdf">
<span id="id1"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Introduce asdf</a><a class="headerlink" href="#introduce-asdf" title="Link to this heading"></a></h2>
<p>To <a class="reference external" href="https://asdf-vm.com/guide/getting-started.html#_2-download-asdf">download asdf</a> and <a class="reference external" href="https://asdf-vm.com/guide/getting-started.html#_3-install-asdf">install asdf</a>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/asdf-vm/asdf.git<span class="w"> </span>~/.asdf<span class="w"> </span>--branch<span class="w"> </span>&lt;version&gt;
$<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s1">&#39;. &quot;$HOME/.asdf/asdf.sh&quot;&#39;</span><span class="w"> </span>&gt;&gt;<span class="w"> </span>~/.bashrc
$<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s1">&#39;. &quot;$HOME/.asdf/completions/asdf.bash&quot;&#39;</span><span class="w"> </span>&gt;&gt;<span class="w"> </span>~/.bashrc
</pre></div>
</div>
<p>Start a new shell and try to <a class="reference external" href="https://asdf-vm.com/guide/getting-started.html#install-the-plugin">install plugins</a>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>asdf<span class="w"> </span>plugin-list-all<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>-E<span class="w"> </span><span class="s1">&#39;(golang|python|nodejs|shellcheck).git&#39;</span>
golang<span class="w"> </span>https://github.com/asdf-community/asdf-golang.git
nodejs<span class="w"> </span>https://github.com/asdf-vm/asdf-nodejs.git
python<span class="w"> </span>https://github.com/danhper/asdf-python.git
shellcheck<span class="w"> </span>https://github.com/luizm/asdf-shellcheck.git
$<span class="w"> </span>asdf<span class="w"> </span>plugin<span class="w"> </span>add<span class="w"> </span>golang<span class="w"> </span>https://github.com/asdf-community/asdf-golang.git
$<span class="w"> </span>asdf<span class="w"> </span>plugin<span class="w"> </span>add<span class="w"> </span>nodejs<span class="w"> </span>https://github.com/asdf-vm/asdf-nodejs.git
$<span class="w"> </span>asdf<span class="w"> </span>plugin<span class="w"> </span>add<span class="w"> </span>python<span class="w"> </span>https://github.com/danhper/asdf-python.git
$<span class="w"> </span>asdf<span class="w"> </span>plugin<span class="w"> </span>add<span class="w"> </span>shellcheck<span class="w"> </span>https://github.com/luizm/asdf-shellcheck.git
</pre></div>
</div>
<p>Each plugin has dependencies, to compile runtimes visit the URLs from above and
look out for the dependencies you need to install on your OS, on Debian for the
runtimes listed above you will need:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>update
$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>dirmngr<span class="w"> </span>gpg<span class="w"> </span>curl<span class="w"> </span>gawk<span class="w"> </span>coreutils<span class="w"> </span>build-essential<span class="w"> </span>libssl-dev<span class="w"> </span>zlib1g-dev<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>libbz2-dev<span class="w"> </span>libreadline-dev<span class="w"> </span>libsqlite3-dev<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>libncursesw5-dev<span class="w"> </span>xz-utils<span class="w"> </span>tk-dev<span class="w"> </span>libxml2-dev<span class="w"> </span>libxmlsec1-dev<span class="w"> </span>libffi-dev<span class="w"> </span>liblzma-dev
</pre></div>
</div>
<p>With dependencies installed you can install/compile runtimes:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>asdf<span class="w"> </span>install<span class="w"> </span>golang<span class="w"> </span>latest
$<span class="w"> </span>asdf<span class="w"> </span>install<span class="w"> </span>nodejs<span class="w"> </span>latest
$<span class="w"> </span>asdf<span class="w"> </span>install<span class="w"> </span>python<span class="w"> </span>latest
$<span class="w"> </span>asdf<span class="w"> </span>install<span class="w"> </span>shellcheck<span class="w"> </span>latest
</pre></div>
</div>
<p>Python will be compiled and will take a while.</p>
<p>In the repository the version is defined in <a class="reference external" href=".tool-versions">.tool-versions</a>. Outside the
repository, its recommended that the runtime should use the versions of the OS
(<a class="reference external" href="https://asdf-vm.com/manage/versions.html#fallback-to-system-version">Fallback to System Version</a>) / if not already done register the system
versions global:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>/
$<span class="w"> </span>asdf<span class="w"> </span>global<span class="w"> </span>golang<span class="w"> </span>system
$<span class="w"> </span>asdf<span class="w"> </span>global<span class="w"> </span>nodejs<span class="w"> </span>system
$<span class="w"> </span>asdf<span class="w"> </span>global<span class="w"> </span>python<span class="w"> </span>system
$<span class="w"> </span>asdf<span class="w"> </span>global<span class="w"> </span>shellcheck<span class="w"> </span>system
</pre></div>
</div>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Runtime Management</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#get-started">Get started</a></li>
<li class="toctree-l3"><a class="reference internal" href="#manage-versions">Manage Versions</a></li>
<li class="toctree-l3"><a class="reference internal" href="#introduce-asdf">Introduce asdf</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="quickstart.html" title="previous chapter">Development Quickstart</a>
<li>Next: <a href="contribution_guide.html" title="next chapter">How to contribute</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/dev/rtm_asdf.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

230
dev/search_api.html Normal file
View file

@ -0,0 +1,230 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search API &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script src="../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Plugins" href="plugins.html" />
<link rel="prev" title="Tineye" href="engines/online_url_search/tineye.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="plugins.html" title="Plugins"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="engines/online_url_search/tineye.html" title="Tineye"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Search API</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="search-api">
<span id="id1"></span><h1>Search API<a class="headerlink" href="#search-api" title="Link to this heading"></a></h1>
<p>The search supports both <code class="docutils literal notranslate"><span class="pre">GET</span></code> and <code class="docutils literal notranslate"><span class="pre">POST</span></code>.</p>
<p>Furthermore, two endpoints <code class="docutils literal notranslate"><span class="pre">/</span></code> and <code class="docutils literal notranslate"><span class="pre">/search</span></code> are available for querying.</p>
<p><code class="docutils literal notranslate"><span class="pre">GET</span> <span class="pre">/</span></code></p>
<p><code class="docutils literal notranslate"><span class="pre">GET</span> <span class="pre">/search</span></code></p>
<section id="parameters">
<h2>Parameters<a class="headerlink" href="#parameters" title="Link to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="engines/engine_overview.html#engines-dev"><span class="std std-ref">Engine Overview</span></a></p></li>
<li><p><a class="reference internal" href="../admin/settings/settings.html#settings-yml"><span class="std std-ref">settings.yml</span></a></p></li>
<li><p><a class="reference internal" href="../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a></p></li>
</ul>
</aside>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">q</span></code><span class="classifier">required</span></dt><dd><p>The search query. This string is passed to external search services. Thus,
SearXNG supports syntax of each search service. For example, <code class="docutils literal notranslate"><span class="pre">site:github.com</span>
<span class="pre">SearXNG</span></code> is a valid query for Google. However, if simply the query above is
passed to any search engine which does not filter its results based on this
syntax, you might not get the results you wanted.</p>
<p>See more at <a class="reference internal" href="../user/search-syntax.html#search-syntax"><span class="std std-ref">Search syntax</span></a></p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">categories</span></code><span class="classifier">optional</span></dt><dd><p>Comma separated list, specifies the active search categories (see
<a class="reference internal" href="../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a>)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">engines</span></code><span class="classifier">optional</span></dt><dd><p>Comma separated list, specifies the active search engines (see
<a class="reference internal" href="../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a>).</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">language</span></code><span class="classifier">default from <a class="reference internal" href="../admin/settings/settings_search.html#settings-search"><span class="std std-ref">search:</span></a></span></dt><dd><p>Code of the language.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">pageno</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">1</span></code></span></dt><dd><p>Search page number.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">time_range</span></code><span class="classifier">optional</span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">day</span></code>, <code class="docutils literal notranslate"><span class="pre">month</span></code>, <code class="docutils literal notranslate"><span class="pre">year</span></code> ]</p>
<p>Time range of search for engines which support it. See if an engine supports
time range search in the preferences page of an instance.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">format</span></code><span class="classifier">optional</span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">json</span></code>, <code class="docutils literal notranslate"><span class="pre">csv</span></code>, <code class="docutils literal notranslate"><span class="pre">rss</span></code> ]</p>
<p>Output format of results. Format needs to be activated in <a class="reference internal" href="../admin/settings/settings_search.html#settings-search"><span class="std std-ref">search:</span></a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">results_on_new_tab</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">0</span></code></span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">0</span></code>, <code class="docutils literal notranslate"><span class="pre">1</span></code> ]</p>
<p>Open search results on new tab.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">image_proxy</span></code><span class="classifier">default from <a class="reference internal" href="../admin/settings/settings_server.html#settings-server"><span class="std std-ref">server:</span></a></span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">True</span></code>, <code class="docutils literal notranslate"><span class="pre">False</span></code> ]</p>
<p>Proxy image results through SearXNG.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">autocomplete</span></code><span class="classifier">default from <a class="reference internal" href="../admin/settings/settings_search.html#settings-search"><span class="std std-ref">search:</span></a></span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">google</span></code>, <code class="docutils literal notranslate"><span class="pre">dbpedia</span></code>, <code class="docutils literal notranslate"><span class="pre">duckduckgo</span></code>, <code class="docutils literal notranslate"><span class="pre">mwmbl</span></code>, <code class="docutils literal notranslate"><span class="pre">startpage</span></code>,
<code class="docutils literal notranslate"><span class="pre">wikipedia</span></code>, <code class="docutils literal notranslate"><span class="pre">swisscows</span></code>, <code class="docutils literal notranslate"><span class="pre">qwant</span></code> ]</p>
<p>Service which completes words as you type.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">safesearch</span></code><span class="classifier">default from <a class="reference internal" href="../admin/settings/settings_search.html#settings-search"><span class="std std-ref">search:</span></a></span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">0</span></code>, <code class="docutils literal notranslate"><span class="pre">1</span></code>, <code class="docutils literal notranslate"><span class="pre">2</span></code> ]</p>
<p>Filter search results of engines which support safe search. See if an engine
supports safe search in the preferences page of an instance.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">theme</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">simple</span></code></span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">simple</span></code> ]</p>
<p>Theme of instance.</p>
<p>Please note, available themes depend on an instance. It is possible that an
instance administrator deleted, created or renamed themes on their instance.
See the available options in the preferences page of the instance.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">enabled_plugins</span></code><span class="classifier">optional</span></dt><dd><p>List of enabled plugins.</p>
<dl class="field-list">
<dt class="field-odd">default<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">Hash_plugin</span></code>, <code class="docutils literal notranslate"><span class="pre">Self_Information</span></code>,
<code class="docutils literal notranslate"><span class="pre">Tracker_URL_remover</span></code>, <code class="docutils literal notranslate"><span class="pre">Ahmia_blacklist</span></code></p>
</dd>
<dt class="field-even">values<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">Hash_plugin</span></code>, <code class="docutils literal notranslate"><span class="pre">Self_Information</span></code>,
<code class="docutils literal notranslate"><span class="pre">Tracker_URL_remover</span></code>, <code class="docutils literal notranslate"><span class="pre">Ahmia_blacklist</span></code>,</p>
<p><code class="docutils literal notranslate"><span class="pre">Hostname_replace</span></code>, <code class="docutils literal notranslate"><span class="pre">Open_Access_DOI_rewrite</span></code>,
<code class="docutils literal notranslate"><span class="pre">Vim-like_hotkeys</span></code>, <code class="docutils literal notranslate"><span class="pre">Tor_check_plugin</span></code></p>
</dd>
</dl>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">disabled_plugins</span></code>: optional</dt><dd><p>List of disabled plugins.</p>
<dl class="field-list simple">
<dt class="field-odd">default<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">Hostname_replace</span></code>, <code class="docutils literal notranslate"><span class="pre">Open_Access_DOI_rewrite</span></code>,
<code class="docutils literal notranslate"><span class="pre">Vim-like_hotkeys</span></code>, <code class="docutils literal notranslate"><span class="pre">Tor_check_plugin</span></code></p>
</dd>
<dt class="field-even">values<span class="colon">:</span></dt>
<dd class="field-even"><p>see values from <code class="docutils literal notranslate"><span class="pre">enabled_plugins</span></code></p>
</dd>
</dl>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">enabled_engines</span></code><span class="classifier">optional</span><span class="classifier"><em>all</em> <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines">engines</a></span></dt><dd><p>List of enabled engines.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">disabled_engines</span></code><span class="classifier">optional</span><span class="classifier"><em>all</em> <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines">engines</a></span></dt><dd><p>List of disabled engines.</p>
</dd>
</dl>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Search API</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="engines/online_url_search/tineye.html" title="previous chapter">Tineye</a>
<li>Next: <a href="plugins.html" title="next chapter">Plugins</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/dev/search_api.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,167 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tooling box searxng_extra &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script src="../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="searxng_extra/update/" href="update.html" />
<link rel="prev" title="reST primer" href="../reST.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="update.html" title="searxng_extra/update/"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../reST.html" title="reST primer"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="tooling-box-searxng-extra">
<span id="searxng-extra"></span><h1>Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code><a class="headerlink" href="#tooling-box-searxng-extra" title="Link to this heading"></a></h1>
<p>In the folder <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/">git://searxng_extra/</a> we maintain some tools useful for CI and
developers.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="update.html#update-ahmia-blacklist-py"><code class="docutils literal notranslate"><span class="pre">update_ahmia_blacklist.py</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="update.html#update-currencies-py"><code class="docutils literal notranslate"><span class="pre">update_currencies.py</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="update.html#update-engine-descriptions-py"><code class="docutils literal notranslate"><span class="pre">update_engine_descriptions.py</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="update.html#update-external-bangs-py"><code class="docutils literal notranslate"><span class="pre">update_external_bangs.py</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="update.html#update-firefox-version-py"><code class="docutils literal notranslate"><span class="pre">update_firefox_version.py</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="update.html#update-engine-traits-py"><code class="docutils literal notranslate"><span class="pre">update_engine_traits.py</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="update.html#update-osm-keys-tags-py"><code class="docutils literal notranslate"><span class="pre">update_osm_keys_tags.py</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="update.html#update-pygments-py"><code class="docutils literal notranslate"><span class="pre">update_pygments.py</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="update.html#update-wikidata-units-py"><code class="docutils literal notranslate"><span class="pre">update_wikidata_units.py</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="standalone_searx.py.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="standalone_searx.py.html#searxng_extra.standalone_searx.get_search_query"><code class="docutils literal notranslate"><span class="pre">get_search_query()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="standalone_searx.py.html#searxng_extra.standalone_searx.json_serial"><code class="docutils literal notranslate"><span class="pre">json_serial()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="standalone_searx.py.html#searxng_extra.standalone_searx.no_parsed_url"><code class="docutils literal notranslate"><span class="pre">no_parsed_url()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="standalone_searx.py.html#searxng_extra.standalone_searx.parse_argument"><code class="docutils literal notranslate"><span class="pre">parse_argument()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="standalone_searx.py.html#searxng_extra.standalone_searx.to_dict"><code class="docutils literal notranslate"><span class="pre">to_dict()</span></code></a></li>
</ul>
</li>
</ul>
</div>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="../engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><ul>
<li class="toctree-l3"><a class="reference internal" href="update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="standalone_searx.py.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../index.html">Overview</a>
<ul>
<li><a href="../index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="../reST.html" title="previous chapter">reST primer</a>
<li>Next: <a href="update.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/dev/searxng_extra/index.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,238 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>searxng_extra/standalone_searx.py &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script src="../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="DevOps tooling box" href="../../utils/index.html" />
<link rel="prev" title="searxng_extra/update/" href="update.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../../utils/index.html" title="DevOps tooling box"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="update.html" title="searxng_extra/update/"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="module-searxng_extra.standalone_searx">
<span id="searxng-extra-standalone-searx-py"></span><span id="standalone-searx-py"></span><h1><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code><a class="headerlink" href="#module-searxng_extra.standalone_searx" title="Link to this heading"></a></h1>
<p>Script to run SearXNG from terminal.</p>
<blockquote>
<div><p>DONT USE THIS SCRIPT!!</p>
</div></blockquote>
<div class="admonition danger">
<p class="admonition-title">Danger</p>
<p>Be warned, using the <code class="docutils literal notranslate"><span class="pre">standalone_searx.py</span></code> wont give you privacy!</p>
<p>On the contrary, this script behaves like a SearXNG server: your IP is
exposed and tracked by all active engines (google, bing, qwant, … ), with
every query!</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This is an old and grumpy hack / SearXNG is a Flask application with
client/server structure, which cant be turned into a command line tool the
way it was done here.</p>
</div>
<p>Getting categories without initiate the engine will only return <cite>[general]</cite></p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">searx.engines</span>
<span class="gp">... </span><span class="nb">list</span><span class="p">(</span><span class="n">searx</span><span class="o">.</span><span class="n">engines</span><span class="o">.</span><span class="n">categories</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span>
<span class="go">[&#39;general&#39;]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">searx.search</span>
<span class="gp">... </span><span class="n">searx</span><span class="o">.</span><span class="n">search</span><span class="o">.</span><span class="n">initialize</span><span class="p">()</span>
<span class="gp">... </span><span class="nb">list</span><span class="p">(</span><span class="n">searx</span><span class="o">.</span><span class="n">engines</span><span class="o">.</span><span class="n">categories</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span>
<span class="go">[&#39;general&#39;, &#39;it&#39;, &#39;science&#39;, &#39;images&#39;, &#39;news&#39;, &#39;videos&#39;, &#39;music&#39;, &#39;files&#39;, &#39;social media&#39;, &#39;map&#39;]</span>
</pre></div>
</div>
<p>Example to use this script:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>python3<span class="w"> </span>searxng_extra/standalone_searx.py<span class="w"> </span>rain
</pre></div>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="searxng_extra.standalone_searx.get_search_query">
<span class="sig-prename descclassname"><span class="pre">searxng_extra.standalone_searx.</span></span><span class="sig-name descname"><span class="pre">get_search_query</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">args</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/argparse.html#argparse.Namespace" title="(in Python v3.12)"><span class="pre">Namespace</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">engine_categories</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.List" title="(in Python v3.12)"><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.12)"><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.12)"><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">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="../../src/searx.search.html#searx.search.SearchQuery" title="searx.search.models.SearchQuery"><span class="pre">SearchQuery</span></a></span></span><a class="reference internal" href="../../_modules/searxng_extra/standalone_searx.html#get_search_query"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.standalone_searx.get_search_query" title="Link to this definition"></a></dt>
<dd><p>Get search results for the query</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searxng_extra.standalone_searx.json_serial">
<span class="sig-prename descclassname"><span class="pre">searxng_extra.standalone_searx.</span></span><span class="sig-name descname"><span class="pre">json_serial</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.12)"><span class="pre">Any</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</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.12)"><span class="pre">Any</span></a></span></span><a class="reference internal" href="../../_modules/searxng_extra/standalone_searx.html#json_serial"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.standalone_searx.json_serial" title="Link to this definition"></a></dt>
<dd><p>JSON serializer for objects not serializable by default json code.</p>
<dl class="field-list simple">
<dt class="field-odd">Raises<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#TypeError" title="(in Python v3.12)"><strong>TypeError</strong></a> raised when <strong>obj</strong> is not serializable</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searxng_extra.standalone_searx.no_parsed_url">
<span class="sig-prename descclassname"><span class="pre">searxng_extra.standalone_searx.</span></span><span class="sig-name descname"><span class="pre">no_parsed_url</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">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/typing.html#typing.List" title="(in Python v3.12)"><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.Dict" title="(in Python v3.12)"><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.12)"><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.12)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.List" title="(in Python v3.12)"><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.Dict" title="(in Python v3.12)"><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.12)"><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.12)"><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/searxng_extra/standalone_searx.html#no_parsed_url"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.standalone_searx.no_parsed_url" title="Link to this definition"></a></dt>
<dd><p>Remove parsed url from dict.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searxng_extra.standalone_searx.parse_argument">
<span class="sig-prename descclassname"><span class="pre">searxng_extra.standalone_searx.</span></span><span class="sig-name descname"><span class="pre">parse_argument</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">args</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.List" title="(in Python v3.12)"><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.12)"><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.12)"><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">category_choices</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.List" title="(in Python v3.12)"><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.12)"><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.12)"><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">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/argparse.html#argparse.Namespace" title="(in Python v3.12)"><span class="pre">Namespace</span></a></span></span><a class="reference internal" href="../../_modules/searxng_extra/standalone_searx.html#parse_argument"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.standalone_searx.parse_argument" title="Link to this definition"></a></dt>
<dd><p>Parse command line.</p>
<dl class="field-list simple">
<dt class="field-odd">Raises<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#SystemExit" title="(in Python v3.12)"><strong>SystemExit</strong></a> Query argument required on <cite>args</cite></p>
</dd>
</dl>
<p>Examples:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">importlib</span>
<span class="gp">... </span><span class="c1"># load module</span>
<span class="gp">... </span><span class="n">spec</span> <span class="o">=</span> <span class="n">importlib</span><span class="o">.</span><span class="n">util</span><span class="o">.</span><span class="n">spec_from_file_location</span><span class="p">(</span>
<span class="gp">... </span> <span class="s1">&#39;utils.standalone_searx&#39;</span><span class="p">,</span> <span class="s1">&#39;utils/standalone_searx.py&#39;</span><span class="p">)</span>
<span class="gp">... </span><span class="n">sas</span> <span class="o">=</span> <span class="n">importlib</span><span class="o">.</span><span class="n">util</span><span class="o">.</span><span class="n">module_from_spec</span><span class="p">(</span><span class="n">spec</span><span class="p">)</span>
<span class="gp">... </span><span class="n">spec</span><span class="o">.</span><span class="n">loader</span><span class="o">.</span><span class="n">exec_module</span><span class="p">(</span><span class="n">sas</span><span class="p">)</span>
<span class="gp">... </span><span class="n">sas</span><span class="o">.</span><span class="n">parse_argument</span><span class="p">()</span>
<span class="go">usage: ptipython [-h] [--category [{general}]] [--lang [LANG]] [--pageno [PAGENO]] [--safesearch [{0,1,2}]] [--timerange [{day,week,month,year}]]</span>
<span class="go"> query</span>
<span class="go">SystemExit: 2</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">sas</span><span class="o">.</span><span class="n">parse_argument</span><span class="p">([</span><span class="s1">&#39;rain&#39;</span><span class="p">])</span>
<span class="go">Namespace(category=&#39;general&#39;, lang=&#39;all&#39;, pageno=1, query=&#39;rain&#39;, safesearch=&#39;0&#39;, timerange=None)</span>
</pre></div>
</div>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searxng_extra.standalone_searx.to_dict">
<span class="sig-prename descclassname"><span class="pre">searxng_extra.standalone_searx.</span></span><span class="sig-name descname"><span class="pre">to_dict</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="../../src/searx.search.html#searx.search.SearchQuery" title="searx.search.models.SearchQuery"><span class="pre">SearchQuery</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.12)"><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.12)"><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.12)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../../_modules/searxng_extra/standalone_searx.html#to_dict"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.standalone_searx.to_dict" title="Link to this definition"></a></dt>
<dd><p>Get result from parsed arguments.</p>
</dd></dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="../engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="#searxng_extra.standalone_searx.get_search_query"><code class="docutils literal notranslate"><span class="pre">get_search_query()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#searxng_extra.standalone_searx.json_serial"><code class="docutils literal notranslate"><span class="pre">json_serial()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#searxng_extra.standalone_searx.no_parsed_url"><code class="docutils literal notranslate"><span class="pre">no_parsed_url()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#searxng_extra.standalone_searx.parse_argument"><code class="docutils literal notranslate"><span class="pre">parse_argument()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#searxng_extra.standalone_searx.to_dict"><code class="docutils literal notranslate"><span class="pre">to_dict()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../index.html">Overview</a>
<ul>
<li><a href="../index.html">Developer documentation</a>
<ul>
<li><a href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a>
<ul>
<li>Previous: <a href="update.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a>
<li>Next: <a href="../../utils/index.html" title="next chapter">DevOps tooling box</a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/dev/searxng_extra/standalone_searx.py.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,347 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>searxng_extra/update/ &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script src="../../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="searxng_extra/standalone_searx.py" href="standalone_searx.py.html" />
<link rel="prev" title="Tooling box searxng_extra" href="index.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="standalone_searx.py.html" title="searxng_extra/standalone_searx.py"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Tooling box searxng_extra"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="searxng-extra-update">
<h1><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code><a class="headerlink" href="#searxng-extra-update" title="Link to this heading"></a></h1>
<p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/__init__.py">[source]</a></p>
<p>Scripts to update static data in <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/">git://searx/data/</a></p>
<section id="update-ahmia-blacklist-py">
<span id="id1"></span><h2><code class="docutils literal notranslate"><span class="pre">update_ahmia_blacklist.py</span></code><a class="headerlink" href="#update-ahmia-blacklist-py" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_ahmia_blacklist.py">[source]</a></p>
<p id="module-searxng_extra.update.update_ahmia_blacklist">This script saves <a class="reference external" href="https://ahmia.fi/blacklist/">Ahmias blacklist</a> for onion sites.</p>
<p>Output file: <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/ahmia_blacklist.txt">git://searx/data/ahmia_blacklist.txt</a> (<a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/data-update.yml">CI Update data
</a>).</p>
</section>
<section id="update-currencies-py">
<h2><code class="docutils literal notranslate"><span class="pre">update_currencies.py</span></code><a class="headerlink" href="#update-currencies-py" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_currencies.py">[source]</a></p>
<p id="module-searxng_extra.update.update_currencies">Fetch currencies from <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/wikidata.py">git://searx/engines/wikidata.py</a> engine.</p>
<p>Output file: <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/currencies.json">git://searx/data/currencies.json</a> (<a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/data-update.yml">CI Update data …</a>).</p>
</section>
<section id="update-engine-descriptions-py">
<h2><code class="docutils literal notranslate"><span class="pre">update_engine_descriptions.py</span></code><a class="headerlink" href="#update-engine-descriptions-py" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_engine_descriptions.py">[source]</a></p>
<p id="module-searxng_extra.update.update_engine_descriptions">Fetch website description from websites and from
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/wikidata.py">git://searx/engines/wikidata.py</a> engine.</p>
<p>Output file: <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/engine_descriptions.json">git://searx/data/engine_descriptions.json</a>.</p>
<dl class="py function">
<dt class="sig sig-object py" id="searxng_extra.update.update_engine_descriptions.get_output">
<span class="sig-prename descclassname"><span class="pre">searxng_extra.update.update_engine_descriptions.</span></span><span class="sig-name descname"><span class="pre">get_output</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searxng_extra/update/update_engine_descriptions.html#get_output"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.update.update_engine_descriptions.get_output" title="Link to this definition"></a></dt>
<dd><p>From descriptions[engine][language] = [description, source]
To</p>
<ul class="simple">
<li><p>output[language][engine] = description_and_source</p></li>
<li><dl class="simple">
<dt>description_and_source can be:</dt><dd><ul>
<li><p>[description, source]</p></li>
<li><p>description (if source = “wikipedia”)</p></li>
<li><p>[f”engine:lang”, “ref”] (reference to another existing description)</p></li>
</ul>
</dd>
</dl>
</li>
</ul>
</dd></dl>
</section>
<section id="update-external-bangs-py">
<h2><code class="docutils literal notranslate"><span class="pre">update_external_bangs.py</span></code><a class="headerlink" href="#update-external-bangs-py" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_external_bangs.py">[source]</a></p>
<p id="module-searxng_extra.update.update_external_bangs">Update <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/external_bangs.json">git://searx/data/external_bangs.json</a> using the duckduckgo bangs
(<a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/data-update.yml">CI Update data …</a>).</p>
<p><a class="reference external" href="https://duckduckgo.com/newbang">https://duckduckgo.com/newbang</a> loads:</p>
<ul class="simple">
<li><p>a javascript which provides the bang version ( <a class="reference external" href="https://duckduckgo.com/bv1.js">https://duckduckgo.com/bv1.js</a> )</p></li>
<li><p>a JSON file which contains the bangs ( <a class="reference external" href="https://duckduckgo.com/bang.v260.js">https://duckduckgo.com/bang.v260.js</a> for example )</p></li>
</ul>
<p>This script loads the javascript, then the bangs.</p>
<p>The javascript URL may change in the future ( for example
<a class="reference external" href="https://duckduckgo.com/bv2.js">https://duckduckgo.com/bv2.js</a> ), but most probably it will requires to update
RE_BANG_VERSION</p>
<dl class="py function">
<dt class="sig sig-object py" id="searxng_extra.update.update_external_bangs.merge_when_no_leaf">
<span class="sig-prename descclassname"><span class="pre">searxng_extra.update.update_external_bangs.</span></span><span class="sig-name descname"><span class="pre">merge_when_no_leaf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">node</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searxng_extra/update/update_external_bangs.html#merge_when_no_leaf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.update.update_external_bangs.merge_when_no_leaf" title="Link to this definition"></a></dt>
<dd><p>Minimize the number of nodes</p>
<p><code class="docutils literal notranslate"><span class="pre">A</span> <span class="pre">-&gt;</span> <span class="pre">B</span> <span class="pre">-&gt;</span> <span class="pre">C</span></code></p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">B</span></code> is child of <code class="docutils literal notranslate"><span class="pre">A</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">C</span></code> is child of <code class="docutils literal notranslate"><span class="pre">B</span></code></p></li>
</ul>
<p>If there are no <code class="docutils literal notranslate"><span class="pre">C</span></code> equals to <code class="docutils literal notranslate"><span class="pre">&lt;LEAF_KEY&gt;</span></code>, then each <code class="docutils literal notranslate"><span class="pre">C</span></code> are merged
into <code class="docutils literal notranslate"><span class="pre">A</span></code>. For example (5 nodes):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">d</span> <span class="o">-&gt;</span> <span class="n">d</span> <span class="o">-&gt;</span> <span class="n">g</span> <span class="o">-&gt;</span> <span class="o">&lt;</span><span class="n">LEAF_KEY</span><span class="o">&gt;</span> <span class="p">(</span><span class="n">ddg</span><span class="p">)</span>
<span class="o">-&gt;</span> <span class="n">i</span> <span class="o">-&gt;</span> <span class="n">g</span> <span class="o">-&gt;</span> <span class="o">&lt;</span><span class="n">LEAF_KEY</span><span class="o">&gt;</span> <span class="p">(</span><span class="n">dig</span><span class="p">)</span>
</pre></div>
</div>
<p>becomes (3 nodes):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">d</span> <span class="o">-&gt;</span> <span class="n">dg</span> <span class="o">-&gt;</span> <span class="o">&lt;</span><span class="n">LEAF_KEY</span><span class="o">&gt;</span>
<span class="o">-&gt;</span> <span class="n">ig</span> <span class="o">-&gt;</span> <span class="o">&lt;</span><span class="n">LEAF_KEY</span><span class="o">&gt;</span>
</pre></div>
</div>
</dd></dl>
</section>
<section id="update-firefox-version-py">
<h2><code class="docutils literal notranslate"><span class="pre">update_firefox_version.py</span></code><a class="headerlink" href="#update-firefox-version-py" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_firefox_version.py">[source]</a></p>
<p id="module-searxng_extra.update.update_firefox_version">Fetch firefox useragent signatures</p>
<p>Output file: <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/useragents.json">git://searx/data/useragents.json</a> (<a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/data-update.yml">CI Update data …</a>).</p>
</section>
<section id="update-engine-traits-py">
<h2><code class="docutils literal notranslate"><span class="pre">update_engine_traits.py</span></code><a class="headerlink" href="#update-engine-traits-py" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_engine_traits.py">[source]</a></p>
<p id="module-searxng_extra.update.update_engine_traits">Update <a class="reference internal" href="../engines/enginelib.html#searx.enginelib.traits.EngineTraitsMap" title="searx.enginelib.traits.EngineTraitsMap"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.enginelib.traits.EngineTraitsMap</span></code></a> and <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/languages.py">git://searx/languages.py</a></p>
<dl class="simple">
<dt><a class="reference internal" href="../engines/enginelib.html#searx.enginelib.traits.EngineTraitsMap.ENGINE_TRAITS_FILE" title="searx.enginelib.traits.EngineTraitsMap.ENGINE_TRAITS_FILE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.enginelib.traits.EngineTraitsMap.ENGINE_TRAITS_FILE</span></code></a>:</dt><dd><p>Persistence of engines traits, fetched from the engines.</p>
</dd>
<dt><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/languages.py">git://searx/languages.py</a></dt><dd><p>Is generated from intersecting each engines supported traits.</p>
</dd>
</dl>
<p>The script <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_engine_traits.py">git://searxng_extra/update/update_engine_traits.py</a> is called in
the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/data-update.yml">CI Update data …</a></p>
<dl class="py class">
<dt class="sig sig-object py" id="searxng_extra.update.update_engine_traits.UnicodeEscape">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searxng_extra.update.update_engine_traits.</span></span><span class="sig-name descname"><span class="pre">UnicodeEscape</span></span><a class="reference internal" href="../../_modules/searxng_extra/update/update_engine_traits.html#UnicodeEscape"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.update.update_engine_traits.UnicodeEscape" title="Link to this definition"></a></dt>
<dd><p>Escape unicode string in <a class="reference external" href="https://docs.python.org/3/library/pprint.html#pprint.pformat" title="(in Python v3.12)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pprint.pformat</span></code></a></p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searxng_extra.update.update_engine_traits.fetch_traits_map">
<span class="sig-prename descclassname"><span class="pre">searxng_extra.update.update_engine_traits.</span></span><span class="sig-name descname"><span class="pre">fetch_traits_map</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searxng_extra/update/update_engine_traits.html#fetch_traits_map"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.update.update_engine_traits.fetch_traits_map" title="Link to this definition"></a></dt>
<dd><p>Fetchs supported languages for each engine and writes json file with those.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searxng_extra.update.update_engine_traits.filter_locales">
<span class="sig-prename descclassname"><span class="pre">searxng_extra.update.update_engine_traits.</span></span><span class="sig-name descname"><span class="pre">filter_locales</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">traits_map</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../engines/enginelib.html#searx.enginelib.traits.EngineTraitsMap" title="searx.enginelib.traits.EngineTraitsMap"><span class="pre">EngineTraitsMap</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searxng_extra/update/update_engine_traits.html#filter_locales"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.update.update_engine_traits.filter_locales" title="Link to this definition"></a></dt>
<dd><p>Filter language &amp; region tags by a threshold.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="searxng_extra.update.update_engine_traits.get_unicode_flag">
<span class="sig-prename descclassname"><span class="pre">searxng_extra.update.update_engine_traits.</span></span><span class="sig-name descname"><span class="pre">get_unicode_flag</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><a class="reference internal" href="../../_modules/searxng_extra/update/update_engine_traits.html#get_unicode_flag"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.update.update_engine_traits.get_unicode_flag" title="Link to this definition"></a></dt>
<dd><p>Determine a unicode flag (emoji) that fits to the <code class="docutils literal notranslate"><span class="pre">locale</span></code></p>
</dd></dl>
</section>
<section id="update-osm-keys-tags-py">
<h2><code class="docutils literal notranslate"><span class="pre">update_osm_keys_tags.py</span></code><a class="headerlink" href="#update-osm-keys-tags-py" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_osm_keys_tags.py">[source]</a></p>
<p id="module-searxng_extra.update.update_osm_keys_tags">Fetch OSM keys and tags.</p>
<p>To get the i18n names, the scripts uses <a class="reference external" href="https://query.wikidata.org/">Wikidata Query Service</a> instead of for
example <a class="reference external" href="https://taginfo.openstreetmap.org/taginfo/apidoc">OSM tags API</a> (side note: the actual change log from
<a class="reference external" href="https://map.atownsend.org.uk/maps/map/changelog.html">map.atownsend.org.uk</a> might be useful to normalize OSM tags).</p>
<p>Output file: <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/osm_keys_tags">git://searx/data/osm_keys_tags</a> (<a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/data-update.yml">CI Update data …</a>).</p>
<dl>
<dt><code class="xref py py-obj docutils literal notranslate"><span class="pre">SPARQL_TAGS_REQUEST</span></code> :</dt><dd><p>Wikidata SPARQL query that returns <em>type-categories</em> and <em>types</em>. The
returned tag is <code class="docutils literal notranslate"><span class="pre">Tag:{category}={type}</span></code> (see <code class="xref py py-func docutils literal notranslate"><span class="pre">get_tags()</span></code>).
Example:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://taginfo.openstreetmap.org/tags/building=house#overview">https://taginfo.openstreetmap.org/tags/building=house#overview</a></p></li>
<li><p><a class="reference external" href="https://wiki.openstreetmap.org/wiki/Tag:building%3Dhouse">https://wiki.openstreetmap.org/wiki/Tag:building%3Dhouse</a>
at the bottom of the infobox (right side), there is a link to wikidata:
<a class="reference external" href="https://www.wikidata.org/wiki/Q3947">https://www.wikidata.org/wiki/Q3947</a>
see property “OpenStreetMap tag or key” (P1282)</p></li>
<li><p><a class="reference external" href="https://wiki.openstreetmap.org/wiki/Tag%3Abuilding%3Dbungalow">https://wiki.openstreetmap.org/wiki/Tag%3Abuilding%3Dbungalow</a>
<a class="reference external" href="https://www.wikidata.org/wiki/Q850107">https://www.wikidata.org/wiki/Q850107</a></p></li>
</ul>
</dd>
<dt><code class="xref py py-obj docutils literal notranslate"><span class="pre">SPARQL_KEYS_REQUEST</span></code> :</dt><dd><p>Wikidata SPARQL query that returns <em>keys</em>. Example with “payment”:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://wiki.openstreetmap.org/wiki/Key%3Apayment">https://wiki.openstreetmap.org/wiki/Key%3Apayment</a>
at the bottom of infobox (right side), there is a link to wikidata:
<a class="reference external" href="https://www.wikidata.org/wiki/Q1148747">https://www.wikidata.org/wiki/Q1148747</a>
link made using the “OpenStreetMap tag or key” property (P1282)
to be confirm: there is a one wiki page per key ?</p></li>
<li><p><a class="reference external" href="https://taginfo.openstreetmap.org/keys/payment#values">https://taginfo.openstreetmap.org/keys/payment#values</a></p></li>
<li><p><a class="reference external" href="https://taginfo.openstreetmap.org/keys/payment:cash#values">https://taginfo.openstreetmap.org/keys/payment:cash#values</a></p></li>
</ul>
<p><code class="docutils literal notranslate"><span class="pre">rdfs:label</span></code> get all the labels without language selection
(as opposed to SERVICE <code class="docutils literal notranslate"><span class="pre">wikibase:label</span></code>).</p>
</dd>
</dl>
</section>
<section id="update-pygments-py">
<h2><code class="docutils literal notranslate"><span class="pre">update_pygments.py</span></code><a class="headerlink" href="#update-pygments-py" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_pygments.py">[source]</a></p>
<p id="module-searxng_extra.update.update_pygments">Update pygments style</p>
<p>Call this script after each upgrade of pygments</p>
<dl class="py class">
<dt class="sig sig-object py" id="searxng_extra.update.update_pygments.Formatter">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searxng_extra.update.update_pygments.</span></span><span class="sig-name descname"><span class="pre">Formatter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searxng_extra/update/update_pygments.html#Formatter"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searxng_extra.update.update_pygments.Formatter" title="Link to this definition"></a></dt>
<dd></dd></dl>
</section>
<section id="update-wikidata-units-py">
<h2><code class="docutils literal notranslate"><span class="pre">update_wikidata_units.py</span></code><a class="headerlink" href="#update-wikidata-units-py" title="Link to this heading"></a></h2>
<p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_wikidata_units.py">[source]</a></p>
<p id="module-searxng_extra.update.update_wikidata_units">Fetch units from <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/wikidata.py">git://searx/engines/wikidata.py</a> engine.</p>
<p>Output file: <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/wikidata_units.json">git://searx/data/wikidata_units.json</a> (<a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/data-update.yml">CI Update data
</a>).</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="../engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="#update-ahmia-blacklist-py"><code class="docutils literal notranslate"><span class="pre">update_ahmia_blacklist.py</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#update-currencies-py"><code class="docutils literal notranslate"><span class="pre">update_currencies.py</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#update-engine-descriptions-py"><code class="docutils literal notranslate"><span class="pre">update_engine_descriptions.py</span></code></a><ul>
<li class="toctree-l5"><a class="reference internal" href="#searxng_extra.update.update_engine_descriptions.get_output"><code class="docutils literal notranslate"><span class="pre">get_output()</span></code></a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#update-external-bangs-py"><code class="docutils literal notranslate"><span class="pre">update_external_bangs.py</span></code></a><ul>
<li class="toctree-l5"><a class="reference internal" href="#searxng_extra.update.update_external_bangs.merge_when_no_leaf"><code class="docutils literal notranslate"><span class="pre">merge_when_no_leaf()</span></code></a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#update-firefox-version-py"><code class="docutils literal notranslate"><span class="pre">update_firefox_version.py</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#update-engine-traits-py"><code class="docutils literal notranslate"><span class="pre">update_engine_traits.py</span></code></a><ul>
<li class="toctree-l5"><a class="reference internal" href="#searxng_extra.update.update_engine_traits.UnicodeEscape"><code class="docutils literal notranslate"><span class="pre">UnicodeEscape</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searxng_extra.update.update_engine_traits.fetch_traits_map"><code class="docutils literal notranslate"><span class="pre">fetch_traits_map()</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searxng_extra.update.update_engine_traits.filter_locales"><code class="docutils literal notranslate"><span class="pre">filter_locales()</span></code></a></li>
<li class="toctree-l5"><a class="reference internal" href="#searxng_extra.update.update_engine_traits.get_unicode_flag"><code class="docutils literal notranslate"><span class="pre">get_unicode_flag()</span></code></a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#update-osm-keys-tags-py"><code class="docutils literal notranslate"><span class="pre">update_osm_keys_tags.py</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#update-pygments-py"><code class="docutils literal notranslate"><span class="pre">update_pygments.py</span></code></a><ul>
<li class="toctree-l5"><a class="reference internal" href="#searxng_extra.update.update_pygments.Formatter"><code class="docutils literal notranslate"><span class="pre">Formatter</span></code></a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#update-wikidata-units-py"><code class="docutils literal notranslate"><span class="pre">update_wikidata_units.py</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="standalone_searx.py.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../../index.html">Overview</a>
<ul>
<li><a href="../index.html">Developer documentation</a>
<ul>
<li><a href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a>
<ul>
<li>Previous: <a href="index.html" title="previous chapter">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a>
<li>Next: <a href="standalone_searx.py.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></ul>
</li></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/dev/searxng_extra/update.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

197
dev/translation.html Normal file
View file

@ -0,0 +1,197 @@
<!DOCTYPE html>
<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Translation &#8212; SearXNG Documentation (2023.12.31+3535377c9)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script src="../_static/documentation_options.js?v=b1d9d925"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Developing in Linux Containers" href="lxcdev.html" />
<link rel="prev" title="Plugins" href="plugins.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="lxcdev.html" title="Developing in Linux Containers"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="plugins.html" title="Plugins"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.12.31+3535377c9)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Translation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="translation">
<span id="id1"></span><h1>Translation<a class="headerlink" href="#translation" title="Link to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title"><a class="reference external" href="https://translate.codeberg.org/projects/searxng/"><img alt="translated" src="https://translate.codeberg.org/widgets/searxng/-/searxng/svg-badge.svg" /></a></p>
<ul class="simple">
<li><p><a class="reference internal" href="../src/searx.babel_extract.html#searx-babel-extract"><span class="std std-ref">Custom message extractor (i18n)</span></a></p></li>
<li><p><a class="reference external" href="https://docs.weblate.org">Weblate</a></p></li>
<li><p>SearXNG <a class="reference external" href="https://github.com/searxng/searxng/tree/translations">translations branch</a></p></li>
<li><p>SearXNG <a class="reference external" href="https://translate.codeberg.org/projects/searxng/searxng/#repository">Weblate repository</a></p></li>
<li><p>Weblate Client: <a class="reference external" href="https://docs.weblate.org/en/latest/wlc.html">wlc</a></p></li>
<li><p>Babel Command-Line: <a class="reference external" href="http://babel.pocoo.org/en/latest/cmdline.html">pybabel</a></p></li>
<li><p><a class="reference external" href="https://docs.weblate.org/en/latest/workflows.html">weblate workflow</a></p></li>
</ul>
</aside>
<p>Translation takes place on <a class="reference external" href="https://translate.codeberg.org/projects/searxng/">translate.codeberg.org</a>.</p>
<p>Translations which has been added by translators on the <a class="reference external" href="https://translate.codeberg.org/projects/searxng/">translate.codeberg.org</a> UI are
committed to Weblates counterpart of the SearXNG <em>origin</em> repository which is
located at <code class="docutils literal notranslate"><span class="pre">https://translate.codeberg.org/git/searxng/searxng</span></code>.</p>
<p>There is no need to clone this repository, <a class="reference internal" href="#searxng-weblate-workflow"><span class="std std-ref">SearXNGs PR workflow to be in sync with Weblate</span></a> take
care of the synchronization with the <em>origin</em>. To avoid merging commits from
the counterpart directly on the <code class="docutils literal notranslate"><span class="pre">master</span></code> branch of <em>SearXNG origin</em>, a <em>pull
request</em> (PR) is created by this workflow.</p>
<p>Weblate monitors the <a class="reference external" href="https://github.com/searxng/searxng/tree/translations">translations branch</a>, not the <code class="docutils literal notranslate"><span class="pre">master</span></code> branch. This
branch is an <a class="reference external" href="https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt---orphanltnewbranchgt">orphan branch</a>, decoupled from the master branch (we already know
orphan branches from the <code class="docutils literal notranslate"><span class="pre">gh-pages</span></code>). The <a class="reference external" href="https://github.com/searxng/searxng/tree/translations">translations branch</a> contains
only the</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">translation/messages.pot</span></code> and the</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">translation/*/messages.po</span></code> files, nothing else.</p></li>
</ul>
<figure class="align-default" id="id3">
<span id="searxng-weblate-workflow"></span><img alt="../_images/translation.svg" src="../_images/translation.svg" /><figcaption>
<p><span class="caption-number">Fig. 3 </span><span class="caption-text">SearXNGs PR workflow to be in sync with Weblate</span><a class="headerlink" href="#id3" title="Link to this image"></a></p>
</figcaption>
</figure>
<dl class="simple">
<dt>Sync from <em>origin</em> to <em>weblate</em>: using <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">weblate.push.translations</span></code></dt><dd><p>For each commit on the <code class="docutils literal notranslate"><span class="pre">master</span></code> branch of SearXNG <em>origin</em> the GitHub job
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/integration.yml">babel / Update translations branch</a> checks for updated translations.</p>
</dd>
<dt>Sync from <em>weblate</em> to <em>origin</em>: using <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">weblate.translations.commit</span></code></dt><dd><p>Every Friday, the GitHub workflow <a class="reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/translations-update.yml">babel / create PR for additions from
weblate</a> creates a PR with the
updated translation files:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">translation/messages.pot</span></code>,</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">translation/*/messages.po</span></code> and</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">translation/*/messages.mo</span></code></p></li>
</ul>
</dd>
</dl>
<section id="id2">
<h2>wlc<a class="headerlink" href="#id2" title="Link to this heading"></a></h2>
<p>All weblate integration is done by GitHub workflows, but if you want to use <a class="reference external" href="https://docs.weblate.org/en/latest/wlc.html">wlc</a>,
copy this content into <a class="reference external" href="https://docs.weblate.org/en/latest/wlc.html#wlc-config">wlc configuration</a> in your HOME <code class="docutils literal notranslate"><span class="pre">~/.config/weblate</span></code></p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[keys]</span>
<span class="na">https</span><span class="o">:</span><span class="s">//translate.codeberg.org/api/ = APIKEY</span>
</pre></div>
</div>
<p>Replace <code class="docutils literal notranslate"><span class="pre">APIKEY</span></code> by your <a class="reference external" href="https://translate.codeberg.org/accounts/profile/#api">API key</a>.</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Translation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id2">wlc</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile &amp; <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="plugins.html" title="previous chapter">Plugins</a>
<li>Next: <a href="lxcdev.html" title="next chapter">Developing in Linux Containers</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/dev/translation.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>