forked from Ponysearch/Ponysearch
Merge pull request #1096 from capric98/yahoo
fix: FutureWarning from lxml
This commit is contained in:
commit
4341ceceb4
1 changed files with 1 additions and 2 deletions
|
@ -142,8 +142,7 @@ def response(resp):
|
|||
title = extract_text(title)[offset:]
|
||||
|
||||
content = eval_xpath_getindex(result, './/div[contains(@class, "compText")]', 0, default='')
|
||||
if content:
|
||||
content = extract_text(content)
|
||||
content = extract_text(content, allow_none=True)
|
||||
|
||||
# append result
|
||||
results.append({'url': url, 'title': title, 'content': content})
|
||||
|
|
Loading…
Reference in a new issue