diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2023-04-08 17:03:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-08 17:03:34 +0200 |
| commit | fed2bab65b7830a38052b7f592684a19de16b746 (patch) | |
| tree | 05f266f0c963cec164feb9334fa3fd2bc02b4782 | |
| parent | 71bd091f6b8d527148de81f627883d874228c241 (diff) | |
| parent | 23ac964e35a7d94ee4f0e739b52281944edf076b (diff) | |
Merge pull request #2329 from return42/fix-bing-no-descr
[fix] Bing-WEB: use <span class='algoSlug_icon'> for the description
| -rw-r--r-- | searx/engines/bing.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/searx/engines/bing.py b/searx/engines/bing.py index 0f85c7036..81a0cf6a5 100644 --- a/searx/engines/bing.py +++ b/searx/engines/bing.py @@ -198,13 +198,11 @@ def response(resp): url = link.attrib.get('href') title = extract_text(link) - # Make sure that the element is free of <a href> links and <span class='algoSlug_icon'> content = eval_xpath(result, '(.//p)[1]') for p in content: + # Make sure that the element is free of <a href> links for e in p.xpath('.//a'): e.getparent().remove(e) - for e in p.xpath('.//span[@class="algoSlug_icon"]'): - e.getparent().remove(e) content = extract_text(content) # get the real URL either using the URL shown to user or following the Bing URL |