diff options
| author | Aine <aine@etke.cc> | 2023-10-08 23:27:43 +0300 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2023-10-09 13:25:13 +0200 |
| commit | 213cb74378a02a0863c3028d6817751124c62183 (patch) | |
| tree | 9db11fc1d9690637b15e38dcc9c3c08ac03b65e3 /searx/engines/matrixrooms.py | |
| parent | 48cb58bd2ec4eb9cb4ba416f7ece75c3c6c41e55 (diff) | |
[fix] matrixrooms add proper MRS integration
Related:
- https://github.com/searxng/searxng/issues/2918
Diffstat (limited to 'searx/engines/matrixrooms.py')
| -rw-r--r-- | searx/engines/matrixrooms.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/searx/engines/matrixrooms.py b/searx/engines/matrixrooms.py deleted file mode 100644 index 06c4d99a9..000000000 --- a/searx/engines/matrixrooms.py +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-License-Identifier: AGPL-3.0-or-later -# lint: pylint -"""Matrixrooms.info (social media) -""" - -from urllib.parse import quote_plus - -about = { - "website": 'https://matrixrooms.info', - "wikidata_id": 'Q107565255', - "official_api_documentation": None, - "use_official_api": False, - "require_api_key": False, - "results": 'JSON', -} -paging = True -categories = ['social media'] - -base_url = "https://apicdn.matrixrooms.info" -matrix_url = "https://matrix.to" -page_size = 20 - - -def request(query, params): - params['url'] = f"{base_url}/search/{quote_plus(query)}/{page_size}/{(params['pageno']-1)*page_size}" - return params - - -def response(resp): - results = [] - - for result in resp.json(): - results.append( - { - 'url': matrix_url + '/#/' + result['alias'], - 'title': result['name'], - 'content': result['topic'] - + f" // {result['members']} members" - + f" // {result['alias']}" - + f" // {result['server']}", - 'thumbnail': result['avatar_url'], - } - ) - - return results |