mirror of https://github.com/searxng/searxng.git
370 lines
33 KiB
HTML
370 lines
33 KiB
HTML
|
<!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 — SearXNG Documentation (2024.11.23+0f9694c90)</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/autodoc_pydantic.css" />
|
|||
|
<script src="../../../_static/documentation_options.js?v=1b1224d6"></script>
|
|||
|
<script src="../../../_static/doctools.js?v=9a2dae69"></script>
|
|||
|
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
|||
|
<script data-project="searxng" data-version="2024.11.23+0f9694c90" src="../../../_static/describe_version.js?v=fa7f30d0"></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">
|
|||
|
<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 (2024.11.23+0f9694c90)</a> »</li>
|
|||
|
<li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li>
|
|||
|
<li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</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 browser’s
|
|||
|
<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 .. Wikipedia’s 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 Wikipedia’s <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">'wiki_netloc'</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span>
|
|||
|
<span class="s2">"en"</span><span class="p">:</span> <span class="s2">"en.wikipedia.org"</span><span class="p">,</span>
|
|||
|
<span class="o">..</span>
|
|||
|
<span class="s2">"gsw"</span><span class="p">:</span> <span class="s2">"als.wikipedia.org"</span><span class="p">,</span>
|
|||
|
<span class="o">..</span>
|
|||
|
<span class="s2">"zh"</span><span class="p">:</span> <span class="s2">"zh.wikipedia.org"</span><span class="p">,</span>
|
|||
|
<span class="s2">"zh-classical"</span><span class="p">:</span> <span class="s2">"zh-classical.wikipedia.org"</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 encyclopedia’s 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">
|
|||
|
<div class="sphinxsidebarwrapper">
|
|||
|
|
|||
|
|
|||
|
<p class="logo"><a href="../../../index.html">
|
|||
|
<img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/>
|
|||
|
</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">SearXNG’s 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="alpinelinux.html">Alpine Linux Packages</a></li>
|
|||
|
<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s 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="discourse.html">Discourse Forums</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="geizhals.html">Geizhals</a></li>
|
|||
|
<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li>
|
|||
|
<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</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="mullvad_leta.html">Mullvad-Leta</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="presearch.html">Presearch Engine</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="void.html">Void Linux binary packages</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 & <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>
|
|||
|
<search 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>
|
|||
|
</search>
|
|||
|
<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">
|
|||
|
© Copyright SearXNG team.
|
|||
|
</div>
|
|||
|
</body>
|
|||
|
</html>
|