.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
__init__ (self, name, url_id=None, url_path_prefix=None, kwargs=None) | |
get_str (self, result, language) | |
![]() | |
__init__ (self, name) | |
get_select (self) | |
get_label (self, language) | |
get_where (self) | |
get_wikibase_label (self) | |
get_group_by (self) | |
__repr__ (self) | |
Public Attributes | |
url_id = url_id | |
url_path_prefix = url_path_prefix | |
kwargs = kwargs | |
![]() | |
name = name | |
Static Public Attributes | |
str | HTTP_WIKIMEDIA_IMAGE = 'http://commons.wikimedia.org/wiki/Special:FilePath/' |
Static Private Attributes | |
str | __slots__ = 'url_id', 'url_path_prefix', 'kwargs' |
Definition at line 599 of file wikidata.py.
searx.engines.wikidata.WDURLAttribute.__init__ | ( | self, | |
name, | |||
url_id = None, | |||
url_path_prefix = None, | |||
kwargs = None ) |
:param url_id: ID matching one key in ``external_urls.json`` for converting IDs to full URLs. :param url_path_prefix: Path prefix if the values are of format ``account@domain``. If provided, value are rewritten to ``https://<domain><url_path_prefix><account>``. For example:: WDURLAttribute('P4033', url_path_prefix='/@') Adds Property `P4033 <https://www.wikidata.org/wiki/Property:P4033>`_ to the wikidata query. This field might return for example ``libreoffice@fosstodon.org`` and the URL built from this is then: - account: ``libreoffice`` - domain: ``fosstodon.org`` - result url: https://fosstodon.org/@libreoffice
Definition at line 605 of file wikidata.py.
References __init__().
Referenced by __init__().
searx.engines.wikidata.WDURLAttribute.get_str | ( | self, | |
result, | |||
language ) |
Reimplemented from searx.engines.wikidata.WDAttribute.
Definition at line 630 of file wikidata.py.
References searx.engines.wikidata.WDAttribute.name, url_id, and url_path_prefix.
|
staticprivate |
Definition at line 603 of file wikidata.py.
|
static |
Definition at line 601 of file wikidata.py.
searx.engines.wikidata.WDURLAttribute.kwargs = kwargs |
Definition at line 628 of file wikidata.py.
searx.engines.wikidata.WDURLAttribute.url_id = url_id |
Definition at line 626 of file wikidata.py.
Referenced by get_str().
searx.engines.wikidata.WDURLAttribute.url_path_prefix = url_path_prefix |
Definition at line 627 of file wikidata.py.
Referenced by get_str().