mirror of
https://github.com/searxng/searxng.git
synced 2024-12-23 01:36:29 +00: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
1 changed files with 3 additions and 1 deletions
|
@ -123,7 +123,9 @@ def response(resp):
|
|||
thumbnail = None
|
||||
imagelink = eval_xpath_getindex(newsitem, './/a[@class="imagelink"]//img', 0, 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(
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue