[mod] unused imports and whitespaces purged

This commit is contained in:
asciimoo 2014-01-05 00:46:42 +01:00
parent 27cae54197
commit d13c5aa37b
2 changed files with 9 additions and 11 deletions

View file

@ -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/>"