forked from Icycoide/searxng
[mod] unused imports and whitespaces purged
This commit is contained in:
parent
27cae54197
commit
d13c5aa37b
2 changed files with 9 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
from json import loads
|
||||
from urllib import urlencode, quote
|
||||
from urllib import urlencode
|
||||
|
||||
url = 'http://localhost:8090'
|
||||
search_url = '/yacysearch.json?{query}&maximumRecords=10'
|
||||
|
@ -10,7 +10,7 @@ def request(query, params):
|
|||
|
||||
def response(resp):
|
||||
raw_search_results = loads(resp.text)
|
||||
|
||||
|
||||
if not len(raw_search_results):
|
||||
return []
|
||||
|
||||
|
@ -22,10 +22,10 @@ def response(resp):
|
|||
tmp_result = {}
|
||||
tmp_result['title'] = result['title']
|
||||
tmp_result['url'] = result['link']
|
||||
tmp_result['content'] = ''
|
||||
|
||||
tmp_result['content'] = ''
|
||||
|
||||
if len(result['description']):
|
||||
tmp_result['content'] += result['description'] +"<br/>"
|
||||
tmp_result['content'] += result['description'] +"<br/>"
|
||||
|
||||
if len(result['pubDate']):
|
||||
tmp_result['content'] += result['pubDate'] + "<br/>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue