summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM Asenov <m.assenov@gmail.com>2022-08-21 20:08:00 +0100
committerM Asenov <m.assenov@gmail.com>2022-08-21 20:08:00 +0100
commitfaa32d5773a8a736f68571063b41c37b70a31236 (patch)
tree1ad3284ac0f872dd368e6666c9bb061af596908e
parent5ed40af3ba08604c714a893b5424f25584f81ece (diff)
fixed xpath selector for appropriate results
-rw-r--r--searx/engines/bing_videos.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/bing_videos.py b/searx/engines/bing_videos.py
index 9be8eeaef..85071de21 100644
--- a/searx/engines/bing_videos.py
+++ b/searx/engines/bing_videos.py
@@ -80,7 +80,7 @@ def response(resp):
dom = html.fromstring(resp.text)
- for result in dom.xpath('//div[@class="dg_u"]'):
+ for result in dom.xpath('//div[@class="dg_u"]/div[contains(@class, "mc_vtvc")]'):
metadata = loads(result.xpath('.//div[@class="vrhdata"]/@vrhm')[0])
info = ' - '.join(result.xpath('.//div[@class="mc_vtvc_meta_block"]//span/text()')).strip()
content = '{0} - {1}'.format(metadata['du'], info)