summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2022-04-22 16:19:18 +0200
committerGitHub <noreply@github.com>2022-04-22 16:19:18 +0200
commit4341ceceb48cb04a55e9f6faf6739886c655cc10 (patch)
tree6e4838b9a7a27e0e4366fbdda52e44195454bcf0
parent6ff48859e33911309acf4a6a62eb43a4e73a52d5 (diff)
parent8c7e6cc98347fe1a1e6f1cb650e9b48cadf07f8a (diff)
downloadsearxng-4341ceceb48cb04a55e9f6faf6739886c655cc10.tar.gz
searxng-4341ceceb48cb04a55e9f6faf6739886c655cc10.zip
Merge pull request #1096 from capric98/yahoo
fix: FutureWarning from lxml
-rw-r--r--searx/engines/yahoo.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
index 6bf1932e4..c13ce6d78 100644
--- a/searx/engines/yahoo.py
+++ b/searx/engines/yahoo.py
@@ -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})