mirror of
https://github.com/searx/searx
synced 2025-03-11 00:50:05 +01:00
Deploy searx/searx to github.com/searx/searx.git:gh-pages
This commit is contained in:
parent
f0769756e7
commit
488bcab13c
102
_modules/index.html
Normal file
102
_modules/index.html
Normal file
@ -0,0 +1,102 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<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>Overview: module code — Searx Documentation (Searx-0.17.0.tex)</title>
|
||||
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/language_data.js"></script>
|
||||
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
|
||||
<script src="../_static/sphinx_tabs/tabs.js"></script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
|
||||
|
||||
</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="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.17.0.tex)</a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href="">Overview: module code</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<h1>All modules for which code is available</h1>
|
||||
<ul><li><a href="standalone_searx.html">standalone_searx</a></li>
|
||||
</ul>
|
||||
|
||||
<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/searx_logo_small.png" alt="Logo"/>
|
||||
</a></p>
|
||||
|
||||
|
||||
<h3>Project Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/searx/searx">Source</a>
|
||||
|
||||
<li><a href="https://github.com/searx/searx/wiki">Wiki</a>
|
||||
|
||||
<li><a href="https://searx.space/">Public instances</a>
|
||||
|
||||
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
|
||||
</ul><h3>Navigation</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Overview</a>
|
||||
|
||||
</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" />
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2015-2020, Adam Tauber, Noémi Ványi.
|
||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
||||
</div>
|
||||
<script src="../_static/version_warning_offset.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
326
_modules/standalone_searx.html
Normal file
326
_modules/standalone_searx.html
Normal file
@ -0,0 +1,326 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<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>standalone_searx — Searx Documentation (Searx-0.17.0.tex)</title>
|
||||
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/language_data.js"></script>
|
||||
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
|
||||
<script src="../_static/sphinx_tabs/tabs.js"></script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
|
||||
|
||||
</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="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.17.0.tex)</a> »</li>
|
||||
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Module code</a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href="">standalone_searx</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<h1>Source code for standalone_searx</h1><div class="highlight"><pre>
|
||||
<span></span>#!/usr/bin/env python
|
||||
"""Script to run searx from terminal.
|
||||
|
||||
Getting categories without initiate the engine will only return `['general']`
|
||||
|
||||
>>> import searx.engines
|
||||
... list(searx.engines.categories.keys())
|
||||
['general']
|
||||
>>> import searx
|
||||
... searx.engines.initialize_engines(searx.settings['engines'])
|
||||
... list(searx.engines.categories.keys())
|
||||
['general', 'it', 'science', 'images', 'news', 'videos', 'music', 'files', 'social media', 'map']
|
||||
|
||||
Example to use this script:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ SEARX_DEBUG=1 python3 utils/standalone_searx.py rain
|
||||
|
||||
Example to run it from python:
|
||||
|
||||
>>> import importlib
|
||||
... import json
|
||||
... import sys
|
||||
... import searx
|
||||
... import searx.engines
|
||||
... search_query = 'rain'
|
||||
... # initialize engines
|
||||
... searx.engines.initialize_engines(searx.settings['engines'])
|
||||
... # load engines categories once instead of each time the function called
|
||||
... engine_cs = list(searx.engines.categories.keys())
|
||||
... # load module
|
||||
... spec = importlib.util.spec_from_file_location(
|
||||
... 'utils.standalone_searx', 'utils/standalone_searx.py')
|
||||
... sas = importlib.util.module_from_spec(spec)
|
||||
... spec.loader.exec_module(sas)
|
||||
... # use function from module
|
||||
... prog_args = sas.parse_argument([search_query], category_choices=engine_cs)
|
||||
... search_q = sas.get_search_query(prog_args, engine_categories=engine_cs)
|
||||
... res_dict = sas.to_dict(search_q)
|
||||
... sys.stdout.write(json.dumps(
|
||||
... res_dict, sort_keys=True, indent=4, ensure_ascii=False,
|
||||
... default=sas.json_serial))
|
||||
{
|
||||
"answers": [],
|
||||
"infoboxes": [ {...} ],
|
||||
"paging": true,
|
||||
"results": [... ],
|
||||
"results_number": 820000000.0,
|
||||
"search": {
|
||||
"lang": "all",
|
||||
"pageno": 1,
|
||||
"q": "rain",
|
||||
"safesearch": 0,
|
||||
"timerange": null
|
||||
},
|
||||
"suggestions": [...]
|
||||
}
|
||||
""" # noqa: E501
|
||||
# pylint: disable=pointless-string-statement
|
||||
'''
|
||||
searx is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
searx is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with searx. If not, see < http://www.gnu.org/licenses/ >.
|
||||
|
||||
(C) 2016- by Alexandre Flament, <alex@al-f.net>
|
||||
'''
|
||||
# pylint: disable=wrong-import-position
|
||||
import argparse
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from json import dumps
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import searx
|
||||
import searx.engines
|
||||
import searx.preferences
|
||||
import searx.query
|
||||
import searx.search
|
||||
import searx.webadapter
|
||||
|
||||
EngineCategoriesVar = Optional[List[str]]
|
||||
|
||||
|
||||
<div class="viewcode-block" id="get_search_query"><a class="viewcode-back" href="../utils/standalone_searx.py.html#standalone_searx.get_search_query">[docs]</a>def get_search_query(
|
||||
args: argparse.Namespace, engine_categories: EngineCategoriesVar = None
|
||||
) -> searx.search.SearchQuery:
|
||||
"""Get search results for the query"""
|
||||
if engine_categories is None:
|
||||
engine_categories = list(searx.engines.categories.keys())
|
||||
try:
|
||||
category = args.category.decode('utf-8')
|
||||
except AttributeError:
|
||||
category = args.category
|
||||
form = {
|
||||
"q": args.query,
|
||||
"categories": category,
|
||||
"pageno": str(args.pageno),
|
||||
"language": args.lang,
|
||||
"time_range": args.timerange
|
||||
}
|
||||
preferences = searx.preferences.Preferences(
|
||||
['oscar'], engine_categories, searx.engines.engines, [])
|
||||
preferences.key_value_settings['safesearch'].parse(args.safesearch)
|
||||
|
||||
search_query = searx.webadapter.get_search_query_from_webapp(
|
||||
preferences, form)[0]
|
||||
return search_query</div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="no_parsed_url"><a class="viewcode-back" href="../utils/standalone_searx.py.html#standalone_searx.no_parsed_url">[docs]</a>def no_parsed_url(results: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
|
||||
"""Remove parsed url from dict."""
|
||||
for result in results:
|
||||
del result['parsed_url']
|
||||
return results</div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="json_serial"><a class="viewcode-back" href="../utils/standalone_searx.py.html#standalone_searx.json_serial">[docs]</a>def json_serial(obj: Any) -> Any:
|
||||
"""JSON serializer for objects not serializable by default json code.
|
||||
|
||||
:raise TypeError: raised when **obj** is not serializable
|
||||
"""
|
||||
if isinstance(obj, datetime):
|
||||
serial = obj.isoformat()
|
||||
return serial
|
||||
if isinstance(obj, bytes):
|
||||
return obj.decode('utf8')
|
||||
if isinstance(obj, set):
|
||||
return list(obj)
|
||||
raise TypeError("Type ({}) not serializable".format(type(obj)))</div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="to_dict"><a class="viewcode-back" href="../utils/standalone_searx.py.html#standalone_searx.to_dict">[docs]</a>def to_dict(search_query: searx.search.SearchQuery) -> Dict[str, Any]:
|
||||
"""Get result from parsed arguments."""
|
||||
result_container = searx.search.Search(search_query).search()
|
||||
result_container_json = {
|
||||
"search": {
|
||||
"q": search_query.query,
|
||||
"pageno": search_query.pageno,
|
||||
"lang": search_query.lang,
|
||||
"safesearch": search_query.safesearch,
|
||||
"timerange": search_query.time_range,
|
||||
},
|
||||
"results": no_parsed_url(result_container.get_ordered_results()),
|
||||
"infoboxes": result_container.infoboxes,
|
||||
"suggestions": list(result_container.suggestions),
|
||||
"answers": list(result_container.answers),
|
||||
"paging": result_container.paging,
|
||||
"results_number": result_container.results_number()
|
||||
}
|
||||
return result_container_json</div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="parse_argument"><a class="viewcode-back" href="../utils/standalone_searx.py.html#standalone_searx.parse_argument">[docs]</a>def parse_argument(
|
||||
args: Optional[List[str]]=None,
|
||||
category_choices: EngineCategoriesVar=None
|
||||
) -> argparse.Namespace:
|
||||
"""Parse command line.
|
||||
|
||||
:raise SystemExit: Query argument required on `args`
|
||||
|
||||
Examples:
|
||||
|
||||
>>> import importlib
|
||||
... # load module
|
||||
... spec = importlib.util.spec_from_file_location(
|
||||
... 'utils.standalone_searx', 'utils/standalone_searx.py')
|
||||
... sas = importlib.util.module_from_spec(spec)
|
||||
... spec.loader.exec_module(sas)
|
||||
... sas.parse_argument()
|
||||
usage: ptipython [-h] [--category [{general}]] [--lang [LANG]] [--pageno [PAGENO]] [--safesearch [{0,1,2}]] [--timerange [{day,week,month,year}]]
|
||||
query
|
||||
SystemExit: 2
|
||||
>>> sas.parse_argument(['rain'])
|
||||
Namespace(category='general', lang='all', pageno=1, query='rain', safesearch='0', timerange=None)
|
||||
""" # noqa: E501
|
||||
if not category_choices:
|
||||
category_choices = list(searx.engines.categories.keys())
|
||||
parser = argparse.ArgumentParser(description='Standalone searx.')
|
||||
parser.add_argument('query', type=str,
|
||||
help='Text query')
|
||||
parser.add_argument('--category', type=str, nargs='?',
|
||||
choices=category_choices,
|
||||
default='general',
|
||||
help='Search category')
|
||||
parser.add_argument('--lang', type=str, nargs='?', default='all',
|
||||
help='Search language')
|
||||
parser.add_argument('--pageno', type=int, nargs='?', default=1,
|
||||
help='Page number starting from 1')
|
||||
parser.add_argument(
|
||||
'--safesearch', type=str, nargs='?',
|
||||
choices=['0', '1', '2'], default='0',
|
||||
help='Safe content filter from none to strict')
|
||||
parser.add_argument(
|
||||
'--timerange', type=str,
|
||||
nargs='?', choices=['day', 'week', 'month', 'year'],
|
||||
help='Filter by time range')
|
||||
return parser.parse_args(args)</div>
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
searx.engines.initialize_engines(searx.settings['engines'])
|
||||
engine_cs = list(searx.engines.categories.keys())
|
||||
prog_args = parse_argument(category_choices=engine_cs)
|
||||
search_q = get_search_query(prog_args, engine_categories=engine_cs)
|
||||
res_dict = to_dict(search_q)
|
||||
sys.stdout.write(dumps(
|
||||
res_dict, sort_keys=True, indent=4, ensure_ascii=False,
|
||||
default=json_serial))
|
||||
</pre></div>
|
||||
|
||||
<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/searx_logo_small.png" alt="Logo"/>
|
||||
</a></p>
|
||||
|
||||
|
||||
<h3>Project Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/searx/searx">Source</a>
|
||||
|
||||
<li><a href="https://github.com/searx/searx/wiki">Wiki</a>
|
||||
|
||||
<li><a href="https://searx.space/">Public instances</a>
|
||||
|
||||
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
|
||||
</ul><h3>Navigation</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Overview</a>
|
||||
<ul>
|
||||
<li><a href="index.html">Module 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" />
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2015-2020, Adam Tauber, Noémi Ványi.
|
||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
||||
</div>
|
||||
<script src="../_static/version_warning_offset.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -16,6 +16,7 @@ developers.
|
||||
filtron.sh
|
||||
morty.sh
|
||||
lxc.sh
|
||||
standalone_searx.py
|
||||
|
||||
.. _toolboxing common:
|
||||
|
||||
|
11
_sources/utils/standalone_searx.py.rst.txt
Normal file
11
_sources/utils/standalone_searx.py.rst.txt
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
.. _standalone_searx.py:
|
||||
|
||||
=============================
|
||||
``utils/standalone_searx.py``
|
||||
=============================
|
||||
|
||||
.. automodule:: standalone_searx
|
||||
:members:
|
||||
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="architecture.html" title="Architecture"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="filtron.html" title="How to protect an instance"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -33,6 +33,9 @@
|
||||
<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="../dev/index.html" title="Developer documentation"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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 builtin"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="morty.html" title="How to setup result proxy"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="installation.html" title="Installation"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -33,6 +33,9 @@
|
||||
<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="installation-docker.html" title="Docker installation"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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-searx.html" title="How to update"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -33,6 +33,9 @@
|
||||
<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="installation-apache.html" title="Install with apache"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -33,6 +33,9 @@
|
||||
<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="installation-uwsgi.html" title="uwsgi"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -33,6 +33,9 @@
|
||||
<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="installation-nginx.html" title="Install with nginx"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="installation-searx.html" title="Step by step installation"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="Engines"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="buildhosts.html" title="Buildhosts"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="api.html" title="Administration API"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -33,6 +33,9 @@
|
||||
<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="settings.html" title="settings.yml"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="intro-offline.html" title="Preparation for offline engines"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -30,6 +30,9 @@
|
||||
<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="private-engines.html" title="Limit access to your searx engines"
|
||||
accesskey="P">previous</a> |</li>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Developing in Linux containers [202006]" href="lxcdev-202006.html" />
|
||||
<link rel="prev" title="utils/lxc.sh" href="../utils/lxc.sh.html" />
|
||||
<link rel="prev" title="utils/standalone_searx.py" href="../utils/standalone_searx.py.html" />
|
||||
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
|
||||
|
||||
</head><body>
|
||||
@ -31,11 +31,14 @@
|
||||
<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-202006.html" title="Developing in Linux containers [202006]"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="../utils/lxc.sh.html" title="utils/lxc.sh"
|
||||
<a href="../utils/standalone_searx.py.html" title="utils/standalone_searx.py"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.17.0.tex)</a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href="">Blog</a></li>
|
||||
@ -122,7 +125,7 @@
|
||||
<ul>
|
||||
<li><a href="../index.html">Overview</a>
|
||||
<ul>
|
||||
<li>Previous: <a href="../utils/lxc.sh.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span></code></a>
|
||||
<li>Previous: <a href="../utils/standalone_searx.py.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">utils/standalone_searx.py</span></code></a>
|
||||
<li>Next: <a href="lxcdev-202006.html" title="next chapter">Developing in Linux containers [202006]</a>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="private-engines.html" title="Limit access to your searx engines"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -33,6 +33,9 @@
|
||||
<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="python3.html" title="Introducing Python 3 support"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="command-line-engines.html" title="Running shell commands to fetch results"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="admin.html" title="Searx admin interface"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="Tooling box utils/*"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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 Targets"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="#" 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="nav-item nav-item-0"><a href="index.html">Searx Documentation (Searx-0.17.0.tex)</a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href="">Index</a></li>
|
||||
</ul>
|
||||
@ -45,12 +48,59 @@
|
||||
<h1 id="index">Index</h1>
|
||||
|
||||
<div class="genindex-jumpbox">
|
||||
<a href="#P"><strong>P</strong></a>
|
||||
<a href="#G"><strong>G</strong></a>
|
||||
| <a href="#J"><strong>J</strong></a>
|
||||
| <a href="#M"><strong>M</strong></a>
|
||||
| <a href="#N"><strong>N</strong></a>
|
||||
| <a href="#P"><strong>P</strong></a>
|
||||
| <a href="#R"><strong>R</strong></a>
|
||||
| <a href="#S"><strong>S</strong></a>
|
||||
| <a href="#T"><strong>T</strong></a>
|
||||
|
||||
</div>
|
||||
<h2 id="G">G</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="utils/standalone_searx.py.html#standalone_searx.get_search_query">get_search_query() (in module standalone_searx)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="J">J</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="utils/standalone_searx.py.html#standalone_searx.json_serial">json_serial() (in module standalone_searx)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="M">M</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li>
|
||||
module
|
||||
|
||||
<ul>
|
||||
<li><a href="utils/standalone_searx.py.html#module-standalone_searx">standalone_searx</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="N">N</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="utils/standalone_searx.py.html#standalone_searx.no_parsed_url">no_parsed_url() (in module standalone_searx)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="P">P</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="utils/standalone_searx.py.html#standalone_searx.parse_argument">parse_argument() (in module standalone_searx)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li>
|
||||
Python Enhancement Proposals
|
||||
@ -75,6 +125,27 @@
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="S">S</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li>
|
||||
standalone_searx
|
||||
|
||||
<ul>
|
||||
<li><a href="utils/standalone_searx.py.html#module-standalone_searx">module</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="T">T</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="utils/standalone_searx.py.html#standalone_searx.to_dict">to_dict() (in module standalone_searx)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
|
||||
|
||||
<div class="clearer"></div>
|
||||
|
@ -30,6 +30,9 @@
|
||||
<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="user/index.html" title="User documentation"
|
||||
accesskey="N">next</a> |</li>
|
||||
@ -109,6 +112,7 @@ digital rights</p></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="utils/filtron.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/filtron.sh</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="utils/morty.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/morty.sh</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="utils/lxc.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="utils/standalone_searx.py.html"><code class="docutils literal notranslate"><span class="pre">utils/standalone_searx.py</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="utils/index.html#common-commands-environment">Common commands & environment</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="utils/index.html#tooling-box-setup">Tooling box setup</a></li>
|
||||
</ul>
|
||||
|
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
124
py-modindex.html
Normal file
124
py-modindex.html
Normal file
@ -0,0 +1,124 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<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>Python Module Index — Searx Documentation (Searx-0.17.0.tex)</title>
|
||||
<link rel="stylesheet" href="_static/searx.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/sphinx_tabs/tabs.css" />
|
||||
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/language_data.js"></script>
|
||||
<script src="_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
|
||||
<script src="_static/sphinx_tabs/tabs.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
||||
<script>DOCUMENTATION_OPTIONS.URL_ROOT = './';</script>
|
||||
|
||||
|
||||
<script>
|
||||
DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true;
|
||||
</script>
|
||||
|
||||
|
||||
</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="#" title="Python Module Index"
|
||||
>modules</a> |</li>
|
||||
<li class="nav-item nav-item-0"><a href="index.html">Searx Documentation (Searx-0.17.0.tex)</a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href="">Python Module Index</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
|
||||
<h1>Python Module Index</h1>
|
||||
|
||||
<div class="modindex-jumpbox">
|
||||
<a href="#cap-s"><strong>s</strong></a>
|
||||
</div>
|
||||
|
||||
<table class="indextable modindextable">
|
||||
<tr class="pcap"><td></td><td> </td><td></td></tr>
|
||||
<tr class="cap" id="cap-s"><td></td><td>
|
||||
<strong>s</strong></td><td></td></tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<a href="utils/standalone_searx.py.html#module-standalone_searx"><code class="xref">standalone_searx</code></a></td><td>
|
||||
<em></em></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<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/searx_logo_small.png" alt="Logo"/>
|
||||
</a></p>
|
||||
|
||||
|
||||
<h3>Project Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/searx/searx">Source</a>
|
||||
|
||||
<li><a href="https://github.com/searx/searx/wiki">Wiki</a>
|
||||
|
||||
<li><a href="https://searx.space/">Public instances</a>
|
||||
|
||||
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
|
||||
</ul><h3>Navigation</h3>
|
||||
<ul>
|
||||
<li><a href="index.html">Overview</a>
|
||||
|
||||
</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" />
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2015-2020, Adam Tauber, Noémi Ványi.
|
||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
||||
</div>
|
||||
<script src="_static/version_warning_offset.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -36,6 +36,9 @@
|
||||
<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="nav-item nav-item-0"><a href="index.html">Searx Documentation (Searx-0.17.0.tex)</a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href="">Search</a></li>
|
||||
</ul>
|
||||
|
File diff suppressed because one or more lines are too long
@ -31,6 +31,9 @@
|
||||
<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_syntax.html" title="Search syntax"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="../admin/index.html" title="Administrator documentation"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="own-instance.html" title="Why use a private instance?"
|
||||
accesskey="N">next</a> |</li>
|
||||
|
@ -33,6 +33,9 @@
|
||||
<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="morty.sh.html" title="utils/morty.sh"
|
||||
accesskey="N">next</a> |</li>
|
||||
@ -222,18 +225,18 @@ inspect service
|
||||
show service status and log
|
||||
option
|
||||
set one of the available options
|
||||
apache (http://10.20.0.78/searx)
|
||||
apache (http://10.20.0.37/searx)
|
||||
:install: apache site with a reverse proxy (ProxyPass)
|
||||
:remove: apache site searx.conf
|
||||
nginx (http://10.20.0.78/searx)
|
||||
nginx (http://10.20.0.37/searx)
|
||||
:install: nginx site with a reverse proxy (ProxyPass)
|
||||
:remove: nginx site searx.conf
|
||||
|
||||
filtron rules: /etc/filtron/rules.json
|
||||
|
||||
If needed, set PUBLIC_URL of your WEB service in the '.config.sh' file::
|
||||
PUBLIC_URL : http://10.20.0.78/searx
|
||||
PUBLIC_HOST : 10.20.0.78
|
||||
PUBLIC_URL : http://10.20.0.37/searx
|
||||
PUBLIC_HOST : 10.20.0.37
|
||||
SERVICE_USER : filtron
|
||||
FILTRON_TARGET : 127.0.0.1:8888
|
||||
FILTRON_API : 127.0.0.1:4005
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="searx.sh.html" title="utils/searx.sh"
|
||||
accesskey="N">next</a> |</li>
|
||||
@ -81,6 +84,7 @@ developers.</p>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#searx-suite">searx suite</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">utils/standalone_searx.py</span></code></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="common-commands-environment">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<script src="../_static/language_data.js"></script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Blog" href="../blog/index.html" />
|
||||
<link rel="next" title="utils/standalone_searx.py" href="standalone_searx.py.html" />
|
||||
<link rel="prev" title="utils/morty.sh" href="morty.sh.html" />
|
||||
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
|
||||
|
||||
@ -32,7 +32,10 @@
|
||||
<a href="../genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="../blog/index.html" title="Blog"
|
||||
<a href="../py-modindex.html" title="Python Module Index"
|
||||
>modules</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="standalone_searx.py.html" title="utils/standalone_searx.py"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="morty.sh.html" title="utils/morty.sh"
|
||||
@ -195,7 +198,7 @@ install
|
||||
:base: prepare LXC; install basic packages
|
||||
:suite: install LXC searx suite into all (or <name>) containers
|
||||
|
||||
LXC suite: searx --> http://10.20.0.78/searx
|
||||
LXC suite: searx --> http://10.20.0.37/searx
|
||||
suite includes searx, morty & filtron
|
||||
suite images:
|
||||
ubu1604 ubu1804 ubu1910 ubu2004 fedora31 archlinux centos7
|
||||
@ -341,7 +344,7 @@ lxc_suite_info<span class="o">()</span> <span class="o">{</span>
|
||||
<li><a href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a>
|
||||
<ul>
|
||||
<li>Previous: <a href="morty.sh.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">utils/morty.sh</span></code></a>
|
||||
<li>Next: <a href="../blog/index.html" title="next chapter">Blog</a></ul>
|
||||
<li>Next: <a href="standalone_searx.py.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">utils/standalone_searx.py</span></code></a></ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -33,6 +33,9 @@
|
||||
<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="lxc.sh.html" title="utils/lxc.sh"
|
||||
accesskey="N">next</a> |</li>
|
||||
@ -224,22 +227,22 @@ inspect service
|
||||
option
|
||||
set one of the available options
|
||||
:new-key: set new morty key
|
||||
apache : http://10.20.0.78/morty/
|
||||
apache : http://10.20.0.37/morty/
|
||||
:install: apache site with a reverse proxy (ProxyPass)
|
||||
:remove: apache site morty.conf
|
||||
nginx (http://10.20.0.78/morty/)
|
||||
nginx (http://10.20.0.37/morty/)
|
||||
:install: nginx site with a reverse proxy (ProxyPass)
|
||||
:remove: nginx site morty.conf
|
||||
|
||||
If needed, set the environment variables in the '.config.sh' file::
|
||||
PUBLIC_URL_MORTY: http://10.20.0.78/morty/
|
||||
PUBLIC_URL_MORTY: http://10.20.0.37/morty/
|
||||
MORTY_LISTEN: 127.0.0.1:3000
|
||||
SERVICE_USER: morty
|
||||
|
||||
To activate result and image proxy in searx, edit settings.yml (read:
|
||||
https://searx.github.io/searx/admin/morty.html)::
|
||||
result_proxy:
|
||||
url : http://10.20.0.78/morty/
|
||||
url : http://10.20.0.37/morty/
|
||||
server:
|
||||
image_proxy : True
|
||||
</pre></div>
|
||||
|
@ -31,6 +31,9 @@
|
||||
<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="filtron.sh.html" title="utils/filtron.sh"
|
||||
accesskey="N">next</a> |</li>
|
||||
@ -114,8 +117,8 @@ apache
|
||||
searx settings: /etc/searx/settings.yml
|
||||
|
||||
If needed, set PUBLIC_URL of your WEB service in the '.config.sh' file::
|
||||
PUBLIC_URL : http://10.20.0.78/searx
|
||||
SEARX_INSTANCE_NAME : searx@10.20.0.78
|
||||
PUBLIC_URL : http://10.20.0.37/searx
|
||||
SEARX_INSTANCE_NAME : searx@10.20.0.37
|
||||
SERVICE_USER : searx
|
||||
SEARX_INTERNAL_HTTP : http://127.0.0.1:8888
|
||||
</pre></div>
|
||||
|
226
utils/standalone_searx.py.html
Normal file
226
utils/standalone_searx.py.html
Normal file
@ -0,0 +1,226 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<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>utils/standalone_searx.py — Searx Documentation (Searx-0.17.0.tex)</title>
|
||||
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
|
||||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/language_data.js"></script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Blog" href="../blog/index.html" />
|
||||
<link rel="prev" title="utils/lxc.sh" href="lxc.sh.html" />
|
||||
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
|
||||
|
||||
</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="../blog/index.html" title="Blog"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="lxc.sh.html" title="utils/lxc.sh"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.17.0.tex)</a> »</li>
|
||||
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a> »</li>
|
||||
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">utils/standalone_searx.py</span></code></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-standalone_searx">
|
||||
<span id="utils-standalone-searx-py"></span><span id="standalone-searx-py"></span><h1><code class="docutils literal notranslate"><span class="pre">utils/standalone_searx.py</span></code><a class="headerlink" href="#module-standalone_searx" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Script to run searx from terminal.</p>
|
||||
<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">>>> </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">['general']</span>
|
||||
<span class="gp">>>> </span><span class="kn">import</span> <span class="nn">searx</span>
|
||||
<span class="gp">... </span><span class="n">searx</span><span class="o">.</span><span class="n">engines</span><span class="o">.</span><span class="n">initialize_engines</span><span class="p">(</span><span class="n">searx</span><span class="o">.</span><span class="n">settings</span><span class="p">[</span><span class="s1">'engines'</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">['general', 'it', 'science', 'images', 'news', 'videos', 'music', 'files', 'social media', 'map']</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Example to use this script:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nv">SEARX_DEBUG</span><span class="o">=</span><span class="m">1</span> python3 utils/standalone_searx.py rain
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Example to run it from python:</p>
|
||||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">importlib</span>
|
||||
<span class="gp">... </span><span class="kn">import</span> <span class="nn">json</span>
|
||||
<span class="gp">... </span><span class="kn">import</span> <span class="nn">sys</span>
|
||||
<span class="gp">... </span><span class="kn">import</span> <span class="nn">searx</span>
|
||||
<span class="gp">... </span><span class="kn">import</span> <span class="nn">searx.engines</span>
|
||||
<span class="gp">... </span><span class="n">search_query</span> <span class="o">=</span> <span class="s1">'rain'</span>
|
||||
<span class="gp">... </span><span class="c1"># initialize engines</span>
|
||||
<span class="gp">... </span><span class="n">searx</span><span class="o">.</span><span class="n">engines</span><span class="o">.</span><span class="n">initialize_engines</span><span class="p">(</span><span class="n">searx</span><span class="o">.</span><span class="n">settings</span><span class="p">[</span><span class="s1">'engines'</span><span class="p">])</span>
|
||||
<span class="gp">... </span><span class="c1"># load engines categories once instead of each time the function called</span>
|
||||
<span class="gp">... </span><span class="n">engine_cs</span> <span class="o">=</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="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">'utils.standalone_searx'</span><span class="p">,</span> <span class="s1">'utils/standalone_searx.py'</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="c1"># use function from module</span>
|
||||
<span class="gp">... </span><span class="n">prog_args</span> <span class="o">=</span> <span class="n">sas</span><span class="o">.</span><span class="n">parse_argument</span><span class="p">([</span><span class="n">search_query</span><span class="p">],</span> <span class="n">category_choices</span><span class="o">=</span><span class="n">engine_cs</span><span class="p">)</span>
|
||||
<span class="gp">... </span><span class="n">search_q</span> <span class="o">=</span> <span class="n">sas</span><span class="o">.</span><span class="n">get_search_query</span><span class="p">(</span><span class="n">prog_args</span><span class="p">,</span> <span class="n">engine_categories</span><span class="o">=</span><span class="n">engine_cs</span><span class="p">)</span>
|
||||
<span class="gp">... </span><span class="n">res_dict</span> <span class="o">=</span> <span class="n">sas</span><span class="o">.</span><span class="n">to_dict</span><span class="p">(</span><span class="n">search_q</span><span class="p">)</span>
|
||||
<span class="gp">... </span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span>
|
||||
<span class="gp">... </span> <span class="n">res_dict</span><span class="p">,</span> <span class="n">sort_keys</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">indent</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">ensure_ascii</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
|
||||
<span class="gp">... </span> <span class="n">default</span><span class="o">=</span><span class="n">sas</span><span class="o">.</span><span class="n">json_serial</span><span class="p">))</span>
|
||||
<span class="go">{</span>
|
||||
<span class="go"> "answers": [],</span>
|
||||
<span class="go"> "infoboxes": [ {...} ],</span>
|
||||
<span class="go"> "paging": true,</span>
|
||||
<span class="go"> "results": [... ],</span>
|
||||
<span class="go"> "results_number": 820000000.0,</span>
|
||||
<span class="go"> "search": {</span>
|
||||
<span class="go"> "lang": "all",</span>
|
||||
<span class="go"> "pageno": 1,</span>
|
||||
<span class="go"> "q": "rain",</span>
|
||||
<span class="go"> "safesearch": 0,</span>
|
||||
<span class="go"> "timerange": null</span>
|
||||
<span class="go"> },</span>
|
||||
<span class="go"> "suggestions": [...]</span>
|
||||
<span class="go">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<dl class="py function">
|
||||
<dt id="standalone_searx.get_search_query">
|
||||
<code class="sig-prename descclassname">standalone_searx.</code><code class="sig-name descname">get_search_query</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">args</span><span class="p">:</span> <span class="n"><a class="reference external" href="https://docs.python.org/3/library/argparse.html#argparse.Namespace" title="(in Python v3.9)">argparse.Namespace</a></span></em>, <em class="sig-param"><span class="n">engine_categories</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>List<span class="p">[</span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)">str</a><span class="p">]</span><span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> → searx.search.SearchQuery<a class="reference internal" href="../_modules/standalone_searx.html#get_search_query"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#standalone_searx.get_search_query" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get search results for the query</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="standalone_searx.json_serial">
|
||||
<code class="sig-prename descclassname">standalone_searx.</code><code class="sig-name descname">json_serial</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span><span class="p">:</span> <span class="n">Any</span></em><span class="sig-paren">)</span> → Any<a class="reference internal" href="../_modules/standalone_searx.html#json_serial"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#standalone_searx.json_serial" title="Permalink 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</dt>
|
||||
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#TypeError" title="(in Python v3.9)"><strong>TypeError</strong></a> – raised when <strong>obj</strong> is not serializable</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="standalone_searx.no_parsed_url">
|
||||
<code class="sig-prename descclassname">standalone_searx.</code><code class="sig-name descname">no_parsed_url</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">results</span><span class="p">:</span> <span class="n">List<span class="p">[</span>Dict<span class="p">[</span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)">str</a><span class="p">, </span>Any<span class="p">]</span><span class="p">]</span></span></em><span class="sig-paren">)</span> → List<span class="p">[</span>Dict<span class="p">[</span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)">str</a><span class="p">, </span>Any<span class="p">]</span><span class="p">]</span><a class="reference internal" href="../_modules/standalone_searx.html#no_parsed_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#standalone_searx.no_parsed_url" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Remove parsed url from dict.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="standalone_searx.parse_argument">
|
||||
<code class="sig-prename descclassname">standalone_searx.</code><code class="sig-name descname">parse_argument</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">args</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>List<span class="p">[</span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)">str</a><span class="p">]</span><span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category_choices</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>List<span class="p">[</span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)">str</a><span class="p">]</span><span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> → <a class="reference external" href="https://docs.python.org/3/library/argparse.html#argparse.Namespace" title="(in Python v3.9)">argparse.Namespace</a><a class="reference internal" href="../_modules/standalone_searx.html#parse_argument"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#standalone_searx.parse_argument" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Parse command line.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Raises</dt>
|
||||
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#SystemExit" title="(in Python v3.9)"><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">>>> </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">'utils.standalone_searx'</span><span class="p">,</span> <span class="s1">'utils/standalone_searx.py'</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">>>> </span><span class="n">sas</span><span class="o">.</span><span class="n">parse_argument</span><span class="p">([</span><span class="s1">'rain'</span><span class="p">])</span>
|
||||
<span class="go">Namespace(category='general', lang='all', pageno=1, query='rain', safesearch='0', timerange=None)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="standalone_searx.to_dict">
|
||||
<code class="sig-prename descclassname">standalone_searx.</code><code class="sig-name descname">to_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">search_query</span><span class="p">:</span> <span class="n">searx.search.SearchQuery</span></em><span class="sig-paren">)</span> → Dict<span class="p">[</span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)">str</a><span class="p">, </span>Any<span class="p">]</span><a class="reference internal" href="../_modules/standalone_searx.html#to_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#standalone_searx.to_dict" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get result from parsed arguments.</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<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/searx_logo_small.png" alt="Logo"/>
|
||||
</a></p>
|
||||
|
||||
|
||||
<h3>Project Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/searx/searx">Source</a>
|
||||
|
||||
<li><a href="https://github.com/searx/searx/wiki">Wiki</a>
|
||||
|
||||
<li><a href="https://searx.space/">Public instances</a>
|
||||
|
||||
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
|
||||
</ul><h3>Navigation</h3>
|
||||
<ul>
|
||||
<li><a href="../index.html">Overview</a>
|
||||
<ul>
|
||||
<li><a href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a>
|
||||
<ul>
|
||||
<li>Previous: <a href="lxc.sh.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span></code></a>
|
||||
<li>Next: <a href="../blog/index.html" title="next chapter">Blog</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" />
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2015-2020, Adam Tauber, Noémi Ványi.
|
||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
||||
</div>
|
||||
<script src="../_static/version_warning_offset.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user