summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--searx/engines/qwant.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/qwant.py b/searx/engines/qwant.py
index 654a76337..168eb860e 100644
--- a/searx/engines/qwant.py
+++ b/searx/engines/qwant.py
@@ -159,9 +159,12 @@ def parse_web_lite(resp):
dom = lxml.html.fromstring(resp.text)
for item in eval_xpath_list(dom, '//section/article'):
+ if eval_xpath(item, "./span[contains(@class, 'tooltip')]"):
+ # ignore randomly interspersed advertising adds
+ continue
results.append(
{
- 'url': extract_text(eval_xpath(item, './span')),
+ 'url': extract_text(eval_xpath(item, "./span[contains(@class, 'url partner')]")),
'title': extract_text(eval_xpath(item, './h2/a')),
'content': extract_text(eval_xpath(item, './p')),
}