diff options
author | Markus Heiser <markus.heiser@darmarIT.de> | 2022-04-22 16:19:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-22 16:19:18 +0200 |
commit | 4341ceceb48cb04a55e9f6faf6739886c655cc10 (patch) | |
tree | 6e4838b9a7a27e0e4366fbdda52e44195454bcf0 | |
parent | 6ff48859e33911309acf4a6a62eb43a4e73a52d5 (diff) | |
parent | 8c7e6cc98347fe1a1e6f1cb650e9b48cadf07f8a (diff) | |
download | searxng-4341ceceb48cb04a55e9f6faf6739886c655cc10.tar.gz searxng-4341ceceb48cb04a55e9f6faf6739886c655cc10.zip |
Merge pull request #1096 from capric98/yahoo
fix: FutureWarning from lxml
-rw-r--r-- | searx/engines/yahoo.py | 3 |
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}) |