From c1d7d30b8ec2950a6338f0b99ebe9bdc094fdb73 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Tue, 11 Feb 2014 13:13:51 +0100 Subject: [mod] len() removed from conditions --- searx/engines/yacy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'searx/engines/yacy.py') diff --git a/searx/engines/yacy.py b/searx/engines/yacy.py index a4a41ac3b..efdf846ac 100644 --- a/searx/engines/yacy.py +++ b/searx/engines/yacy.py @@ -13,7 +13,7 @@ def request(query, params): def response(resp): raw_search_results = loads(resp.text) - if not len(raw_search_results): + if not raw_search_results: return [] search_results = raw_search_results.get('channels', {})[0].get('items', []) @@ -26,10 +26,10 @@ def response(resp): tmp_result['url'] = result['link'] tmp_result['content'] = '' - if len(result['description']): + if result['description']: tmp_result['content'] += result['description'] + "
" - if len(result['pubDate']): + if result['pubDate']: tmp_result['content'] += result['pubDate'] + "
" if result['size'] != '-1': -- cgit v1.2.3