mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[mod] len() removed from conditions
This commit is contained in:
parent
239299d45e
commit
c1d7d30b8e
8 changed files with 19 additions and 17 deletions
|
|
@ -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})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue