Merge pull request #1096 from capric98/yahoo

fix: FutureWarning from lxml
This commit is contained in:
Markus Heiser 2022-04-22 16:19:18 +02:00 committed by GitHub
commit 4341ceceb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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})