diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2022-10-02 23:52:11 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2023-03-24 10:37:42 +0100 |
commit | a7fe22770a830cafa4d74a7d5e6ae848c18a9f75 (patch) | |
tree | c9200b2253c4bfac9c651fc47880ea38d0fff677 /searx/data/engine_traits.json | |
parent | 6e5f22e5583cfc2a413e0afac66d3c5ea9f628b1 (diff) | |
download | searxng-a7fe22770a830cafa4d74a7d5e6ae848c18a9f75.tar.gz searxng-a7fe22770a830cafa4d74a7d5e6ae848c18a9f75.zip |
[mod] Peertube: re-engineered & upgrade to data_type: traits_v1
- fetch_traits(): Fetch languages from peertube's search-index source code.
[mod] Include migration of the request methode from 'supported_languages'
to 'traits' (EngineTraits) object.
[fix] old supported_languages_url is no longer valid since the sources
has been moved to a different path.
- fixed code to pass pylint
- request(): complete re-implementation based on the API docs [1]
- response(): complete re-implementation, adds serveral fields missed before
- add source code documentation
[1] https://docs.joinpeertube.org/api-rest-reference.html#tag/Search/operation/searchVideos
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/data/engine_traits.json')
-rw-r--r-- | searx/data/engine_traits.json | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/searx/data/engine_traits.json b/searx/data/engine_traits.json index cb84a5c90..658b7582f 100644 --- a/searx/data/engine_traits.json +++ b/searx/data/engine_traits.json @@ -1468,31 +1468,32 @@ "peertube": { "all_locale": null, "custom": {}, - "data_type": "supported_languages", - "languages": {}, + "data_type": "traits_v1", + "languages": { + "ca": "ca", + "cs": "cs", + "de": "de", + "el": "el", + "en": "en", + "eo": "eo", + "es": "es", + "eu": "eu", + "fi": "fi", + "fr": "fr", + "gd": "gd", + "it": "it", + "ja": "ja", + "nl": "nl", + "pl": "pl", + "pt": "pt", + "ru": "ru", + "sv": "sv", + "zh": "zh", + "zh_Hans": "zh", + "zh_Hant": "zh" + }, "regions": {}, - "supported_languages": [ - "ca", - "cs", - "de", - "el", - "en", - "eo", - "es", - "eu", - "fi", - "fr", - "gd", - "it", - "ja", - "nl", - "oc", - "pl", - "pt", - "ru", - "sv", - "zh" - ] + "supported_languages": {} }, "qwant": { "all_locale": null, @@ -4531,4 +4532,4 @@ "zh_cht" ] } -}
\ No newline at end of file +} |