.oO SearXNG Developer Documentation Oo.
|
Functions | |
init (engine_settings=None) | |
Dict[str, Any] | request (str query, Dict[str, Any] params) |
List[Dict[str, Any]] | response (httpx.Response resp) |
Dict[str, Any] | build_result (etree.Element item) |
str|None | _map_result_url (str|None guid, str|None comments) |
str|None | _map_leechers (str|None leechers, str|None seeders, str|None peers) |
datetime|None | _map_published_date (str|None pubDate) |
str|None | _map_torrent_file (str|None link, str|None enclosure_url) |
str|None | _map_magnet_link (str|None magneturl, str|None guid, str|None enclosure_url, str|None link) |
str|None | get_attribute (etree.Element item, str property_name) |
str|None | get_torznab_attribute (etree.Element item, str attribute_name) |
Variables | |
logging | logger .Logger |
dict | about |
list | categories = ['files'] |
bool | paging = False |
bool | time_range_support = False |
str | base_url = '' |
str | api_key = '' |
list | torznab_categories = [] |
bool | show_torrent_files = False |
bool | show_magnet_links = True |
Torznab_ is an API specification that provides a standardized way to query torrent site for content. It is used by a number of torrent applications, including Prowlarr_ and Jackett_. Using this engine together with Prowlarr_ or Jackett_ allows you to search a huge number of torrent sites which are not directly supported. Configuration ============= The engine has the following settings: ``base_url``: Torznab endpoint URL. ``api_key``: The API key to use for authentication. ``torznab_categories``: The categories to use for searching. This is a list of category IDs. See Prowlarr-categories_ or Jackett-categories_ for more information. ``show_torrent_files``: Whether to show the torrent file in the search results. Be careful as using this with Prowlarr_ or Jackett_ leaks the API key. This should be used only if you are querying a Torznab endpoint without authentication or if the instance is private. Be aware that private trackers may ban you if you share the torrent file. Defaults to ``false``. ``show_magnet_links``: Whether to show the magnet link in the search results. Be aware that private trackers may ban you if you share the magnet link. Defaults to ``true``. .. _Torznab: https://torznab.github.io/spec-1.3-draft/index.html .. _Prowlarr: https://github.com/Prowlarr/Prowlarr .. _Jackett: https://github.com/Jackett/Jackett .. _Prowlarr-categories: https://wiki.servarr.com/en/prowlarr/cardigann-yml-definition#categories .. _Jackett-categories: https://github.com/Jackett/Jackett/wiki/Jackett-Categories Implementations ===============
|
protected |
Definition at line 183 of file torznab.py.
Referenced by searx.engines.torznab.build_result().
|
protected |
Definition at line 208 of file torznab.py.
Referenced by searx.engines.torznab.build_result().
|
protected |
Definition at line 191 of file torznab.py.
Referenced by searx.engines.torznab.build_result().
|
protected |
Definition at line 175 of file torznab.py.
Referenced by searx.engines.torznab.build_result().
|
protected |
Definition at line 200 of file torznab.py.
Referenced by searx.engines.torznab.build_result().
Dict[str, Any] searx.engines.torznab.build_result | ( | etree.Element | item | ) |
Build a result from a XML item.
Definition at line 131 of file torznab.py.
References searx.engines.torznab._map_leechers(), searx.engines.torznab._map_magnet_link(), searx.engines.torznab._map_published_date(), searx.engines.torznab._map_result_url(), searx.engines.torznab._map_torrent_file(), searx.engines.torznab.get_attribute(), and searx.engines.torznab.get_torznab_attribute().
Referenced by searx.engines.torznab.response().
str | None searx.engines.torznab.get_attribute | ( | etree.Element | item, |
str | property_name ) |
Get attribute from item.
Definition at line 225 of file torznab.py.
Referenced by searx.engines.torznab.build_result().
str | None searx.engines.torznab.get_torznab_attribute | ( | etree.Element | item, |
str | attribute_name ) |
Get torznab special attribute from item.
Definition at line 233 of file torznab.py.
References searx.format.
Referenced by searx.engines.torznab.build_result().
searx.engines.torznab.init | ( | engine_settings = None | ) |
Initialize the engine.
Definition at line 90 of file torznab.py.
Dict[str, Any] searx.engines.torznab.request | ( | str | query, |
Dict[str, Any] | params ) |
Build the request params.
Definition at line 96 of file torznab.py.
List[Dict[str, Any]] searx.engines.torznab.response | ( | httpx.Response | resp | ) |
Parse the XML response and return a list of results.
Definition at line 112 of file torznab.py.
References searx.engines.torznab.build_result().
dict searx.engines.torznab.about |
Definition at line 68 of file torznab.py.
str searx.engines.torznab.api_key = '' |
Definition at line 83 of file torznab.py.
str searx.engines.torznab.base_url = '' |
Definition at line 82 of file torznab.py.
list searx.engines.torznab.categories = ['files'] |
Definition at line 76 of file torznab.py.
logging searx.engines.torznab.logger .Logger |
Definition at line 65 of file torznab.py.
bool searx.engines.torznab.paging = False |
Definition at line 77 of file torznab.py.
bool searx.engines.torznab.show_magnet_links = True |
Definition at line 87 of file torznab.py.
bool searx.engines.torznab.show_torrent_files = False |
Definition at line 86 of file torznab.py.
bool searx.engines.torznab.time_range_support = False |
Definition at line 78 of file torznab.py.
list searx.engines.torznab.torznab_categories = [] |
Definition at line 85 of file torznab.py.