mirror of
https://github.com/searxng/searxng.git
synced 2024-11-15 01:00:12 +01:00
[fix] bing news results return invalid images
Closes: https://github.com/searxng/searxng/issues/3502 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
9a9ca307fe
commit
b8fa4d6195
@ -123,7 +123,9 @@ def response(resp):
|
|||||||
thumbnail = None
|
thumbnail = None
|
||||||
imagelink = eval_xpath_getindex(newsitem, './/a[@class="imagelink"]//img', 0, None)
|
imagelink = eval_xpath_getindex(newsitem, './/a[@class="imagelink"]//img', 0, None)
|
||||||
if imagelink is not None:
|
if imagelink is not None:
|
||||||
thumbnail = 'https://www.bing.com/' + imagelink.attrib.get('src')
|
thumbnail = imagelink.attrib.get('src')
|
||||||
|
if not thumbnail.startswith("https://www.bing.com"):
|
||||||
|
thumbnail = 'https://www.bing.com/' + thumbnail
|
||||||
|
|
||||||
results.append(
|
results.append(
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user