mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 16:29:17 +02:00
[enh] fix pep8, improve syntax highlighting
This commit is contained in:
parent
d810763107
commit
af8dac93a8
3 changed files with 29 additions and 27 deletions
|
@ -31,15 +31,18 @@ def request(query, params):
|
|||
# get response from search-request
|
||||
def response(resp):
|
||||
results = []
|
||||
|
||||
|
||||
search_results = loads(resp.text)
|
||||
|
||||
# parse results
|
||||
for result in search_results['results']:
|
||||
href = result['url']
|
||||
title = "[" + result['type'] + "] " + result['namespace'] + " " + result['name']
|
||||
content = '<span class="highlight">[' + result['type'] + "] " + result['name'] + " " + result['synopsis'] + "</span><br />" + result['description']
|
||||
|
||||
title = "[" + result['type'] + "] " +\
|
||||
result['namespace'] + " " + result['name']
|
||||
content = '<span class="highlight">[' + result['type'] + "] " +\
|
||||
result['name'] + " " + result['synopsis'] +\
|
||||
"</span><br />" + result['description']
|
||||
|
||||
# append result
|
||||
results.append({'url': href,
|
||||
'title': title,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue