[mod] len() removed from conditions

This commit is contained in:
asciimoo 2014-02-11 13:13:51 +01:00
parent 239299d45e
commit c1d7d30b8e
8 changed files with 19 additions and 17 deletions

View file

@ -35,7 +35,7 @@ def response(resp):
title = link.text_content()
content = ''
if len(result.xpath('./p[@class="desc"]')):
if result.xpath('./p[@class="desc"]'):
content = result.xpath('./p[@class="desc"]')[0].text_content()
results.append({'url': url, 'title': title, 'content': content})