1
0
mirror of https://github.com/searxng/searxng.git synced 2024-07-05 00:40:15 +02:00

Merge pull request #1686 from asenov/fix-bing_bideos

[fix] Bing videos search Index error
This commit is contained in:
Markus Heiser 2022-08-22 08:10:46 +02:00 committed by GitHub
commit b84ee9ac60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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