forked from Icycoide/searxng
[feat] add Quark autocomplete support
Co-authored-by: Bnyro <bnyro@tutanota.com>
This commit is contained in:
parent
7b4612e862
commit
08885d0614
3 changed files with 17 additions and 1 deletions
|
@ -164,6 +164,20 @@ def qihu360search(query, _lang):
|
|||
return results
|
||||
|
||||
|
||||
def quark(query, _lang):
|
||||
# Quark search autocompleter
|
||||
url = f"https://sugs.m.sm.cn/web?{urlencode({'q': query})}"
|
||||
response = get(url)
|
||||
|
||||
results = []
|
||||
|
||||
if response.ok:
|
||||
data = response.json()
|
||||
for item in data.get('r', []):
|
||||
results.append(item['w'])
|
||||
return results
|
||||
|
||||
|
||||
def seznam(query, _lang):
|
||||
# seznam search autocompleter
|
||||
url = 'https://suggest.seznam.cz/fulltext/cs?{query}'
|
||||
|
@ -286,6 +300,7 @@ backends = {
|
|||
'duckduckgo': duckduckgo,
|
||||
'google': google_complete,
|
||||
'mwmbl': mwmbl,
|
||||
'quark': quark,
|
||||
'qwant': qwant,
|
||||
'seznam': seznam,
|
||||
'sogou': sogou,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue