.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
mwmbl.py
Go to the documentation of this file.
1
# SPDX-License-Identifier: AGPL-3.0-or-later
2
"""Mwmbl_ is a non-profit, ad-free, free-libre and free-lunch search engine with
3
a focus on useability and speed.
4
5
.. hint::
6
7
At the moment it is little more than an idea together with a proof of concept
8
implementation of the web front-end and search technology on a small index.
9
Mwmbl_ does not support regions, languages, safe-search or time range.
10
search.
11
12
.. _Mwmbl: https://github.com/mwmbl/mwmbl
13
14
"""
15
16
from
urllib.parse
import
urlencode
17
18
about = {
19
"website"
:
'https://github.com/mwmbl/mwmbl'
,
20
"use_official_api"
:
True
,
21
"require_api_key"
:
False
,
22
"results"
:
'JSON'
,
23
}
24
paging =
False
25
categories = [
'general'
]
26
27
api_url =
"https://api.mwmbl.org/api/v1"
28
29
30
def
request
(query, params):
31
params[
'url'
] = f
"{api_url}/search/?{urlencode({'s': query})}"
32
return
params
33
34
35
def
response
(resp):
36
results = []
37
38
json_results = resp.json()
39
40
for
result
in
json_results:
41
title_parts = [title[
'value'
]
for
title
in
result[
'title'
]]
42
results.append(
43
{
44
'url'
: result[
'url'
],
45
'title'
:
''
.join(title_parts),
46
'content'
: result[
'extract'
][0][
'value'
],
47
}
48
)
49
50
return
results
searx.engines.mwmbl.response
response(resp)
Definition
mwmbl.py:35
searx.engines.mwmbl.request
request(query, params)
Definition
mwmbl.py:30
searxng
searx
engines
mwmbl.py
Generated on Sat Nov 16 2024 00:10:57 for .oO SearXNG Developer Documentation Oo. by
1.12.0