mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[fix] pep/flake8 compatibility
This commit is contained in:
parent
692c0bf5f0
commit
b2492c94f4
23 changed files with 197 additions and 109 deletions
|
|
@ -4,10 +4,12 @@ from urllib import urlencode
|
|||
url = 'http://localhost:8090'
|
||||
search_url = '/yacysearch.json?{query}&maximumRecords=10'
|
||||
|
||||
|
||||
def request(query, params):
|
||||
params['url'] = url + search_url.format(query=urlencode({'query':query}))
|
||||
params['url'] = url + search_url.format(query=urlencode({'query': query}))
|
||||
return params
|
||||
|
||||
|
||||
def response(resp):
|
||||
raw_search_results = loads(resp.text)
|
||||
|
||||
|
|
@ -25,7 +27,7 @@ def response(resp):
|
|||
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