.oO SearXNG Developer Documentation Oo.
|
Functions | |
request (query, params) | |
response (resp) | |
Variables | |
logging | logger .Logger |
dict | about |
list | categories = ['general'] |
bool | paging = True |
int | number_of_results = 5 |
str | search_type = 'nearmatch' |
bool | srenablerewrites = True |
str | srsort = 'relevance' |
str | srprop = 'sectiontitle|snippet|timestamp|categorysnippet' |
str | base_url = 'https://{language}.wikipedia.org/' |
str | api_path = 'w/api.php' |
str | timestamp_format = '%Y-%m-%dT%H:%M:%SZ' |
The MediaWiki engine is a *generic* engine to **query** Wikimedia wikis by the `MediaWiki Action API`_. For a `query action`_ all Wikimedia wikis have endpoints that follow this pattern:: https://{base_url}/w/api.php?action=query&list=search&format=json .. note:: In its actual state, this engine is implemented to parse JSON result (`format=json`_) from a search query (`list=search`_). If you need other ``action`` and ``list`` types ask SearXNG developers to extend the implementation according to your needs. .. _MediaWiki Action API: https://www.mediawiki.org/wiki/API:Main_page .. _query action: https://www.mediawiki.org/w/api.php?action=help&modules=query .. _`list=search`: https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bsearch .. _`format=json`: https://www.mediawiki.org/w/api.php?action=help&modules=json Configuration ============= Request: - :py:obj:`base_url` - :py:obj:`search_type` - :py:obj:`srenablerewrites` - :py:obj:`srsort` - :py:obj:`srprop` Implementations ===============
searx.engines.mediawiki.request | ( | query, | |
params ) |
Definition at line 113 of file mediawiki.py.
References searx.format.
searx.engines.mediawiki.response | ( | resp | ) |
Definition at line 144 of file mediawiki.py.
dict searx.engines.mediawiki.about |
Definition at line 52 of file mediawiki.py.
str searx.engines.mediawiki.api_path = 'w/api.php' |
Definition at line 103 of file mediawiki.py.
str searx.engines.mediawiki.base_url = 'https://{language}.wikipedia.org/' |
Definition at line 96 of file mediawiki.py.
list searx.engines.mediawiki.categories = ['general'] |
Definition at line 62 of file mediawiki.py.
logging searx.engines.mediawiki.logger .Logger |
Definition at line 47 of file mediawiki.py.
int searx.engines.mediawiki.number_of_results = 5 |
Definition at line 64 of file mediawiki.py.
bool searx.engines.mediawiki.paging = True |
Definition at line 63 of file mediawiki.py.
str searx.engines.mediawiki.search_type = 'nearmatch' |
Definition at line 66 of file mediawiki.py.
bool searx.engines.mediawiki.srenablerewrites = True |
Definition at line 73 of file mediawiki.py.
str searx.engines.mediawiki.srprop = 'sectiontitle|snippet|timestamp|categorysnippet' |
Definition at line 90 of file mediawiki.py.
str searx.engines.mediawiki.srsort = 'relevance' |
Definition at line 81 of file mediawiki.py.
str searx.engines.mediawiki.timestamp_format = '%Y-%m-%dT%H:%M:%SZ' |
Definition at line 109 of file mediawiki.py.