From faa32d5773a8a736f68571063b41c37b70a31236 Mon Sep 17 00:00:00 2001 From: M Asenov Date: Sun, 21 Aug 2022 20:08:00 +0100 Subject: [PATCH] fixed xpath selector for appropriate results --- searx/engines/bing_videos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)