.oO SearXNG Developer Documentation Oo.
|
Functions | |
init (engine_settings) | |
request (query, params) | |
response (resp) | |
Variables | |
str | engine_type = 'online' |
bool | send_accept_language_header = True |
list | categories = ['general'] |
bool | disabled = True |
float | timeout = 2.0 |
bool | paging = True |
int | page_size = 20 |
str | search_api = 'https://api.artic.edu/api/v1/artworks/search?' |
str | image_api = 'https://www.artic.edu/iiif/2/' |
dict | about |
_my_online_engine = None | |
Within this module we implement a *demo online engine*. Do not look to close to the implementation, its just a simple example which queries `The Art Institute of Chicago <https://www.artic.edu>`_ To get in use of this *demo* engine add the following entry to your engines list in ``settings.yml``: .. code:: yaml - name: my online engine engine: demo_online shortcut: demo disabled: false
searx.engines.demo_online.init | ( | engine_settings | ) |
Initialization of the (online) engine. If no initialization is needed, drop this init function.
Definition at line 47 of file demo_online.py.
searx.engines.demo_online.request | ( | query, | |
params ) |
Build up the ``params`` for the online request. In this example we build a URL to fetch images from `artic.edu <https://artic.edu>`__
Definition at line 56 of file demo_online.py.
searx.engines.demo_online.response | ( | resp | ) |
Parse out the result items from the response. In this example we parse the response from `api.artic.edu <https://artic.edu>`__ and filter out all images.
Definition at line 73 of file demo_online.py.
|
protected |
Definition at line 44 of file demo_online.py.
dict searx.engines.demo_online.about |
Definition at line 33 of file demo_online.py.
list searx.engines.demo_online.categories = ['general'] |
Definition at line 23 of file demo_online.py.
bool searx.engines.demo_online.disabled = True |
Definition at line 24 of file demo_online.py.
str searx.engines.demo_online.engine_type = 'online' |
Definition at line 21 of file demo_online.py.
str searx.engines.demo_online.image_api = 'https://www.artic.edu/iiif/2/' |
Definition at line 31 of file demo_online.py.
int searx.engines.demo_online.page_size = 20 |
Definition at line 28 of file demo_online.py.
bool searx.engines.demo_online.paging = True |
Definition at line 27 of file demo_online.py.
str searx.engines.demo_online.search_api = 'https://api.artic.edu/api/v1/artworks/search?' |
Definition at line 30 of file demo_online.py.
bool searx.engines.demo_online.send_accept_language_header = True |
Definition at line 22 of file demo_online.py.
float searx.engines.demo_online.timeout = 2.0 |
Definition at line 25 of file demo_online.py.