mirror of
https://github.com/searxng/searxng
synced 2024-11-18 15:26:25 +00:00
Merge pull request #1469 from bourrel/fix_bing_images
Fix bing image thumbnail path
This commit is contained in:
commit
cf8e224601
@ -88,9 +88,7 @@ def response(resp):
|
|||||||
|
|
||||||
url = json_data.get('purl')
|
url = json_data.get('purl')
|
||||||
img_src = json_data.get('murl')
|
img_src = json_data.get('murl')
|
||||||
|
thumbnail = json_data.get('turl')
|
||||||
thumb_json_data = loads(_quote_keys_regex.sub(r'\1"\2": \3', link.attrib.get('mad')))
|
|
||||||
thumbnail = thumb_json_data.get('turl')
|
|
||||||
|
|
||||||
# append result
|
# append result
|
||||||
results.append({'template': 'images.html',
|
results.append({'template': 'images.html',
|
||||||
|
@ -52,7 +52,7 @@ class TestBingImagesEngine(SearxTestCase):
|
|||||||
<li>
|
<li>
|
||||||
<div>
|
<div>
|
||||||
<div class="imgpt">
|
<div class="imgpt">
|
||||||
<a m='{"purl":"page_url","murl":"img_url"}' mad='{"turl":"thumb_url"}'>
|
<a m='{"purl":"page_url","murl":"img_url","turl":"thumb_url"}'>
|
||||||
<img src="" alt="alt text" />
|
<img src="" alt="alt text" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -60,7 +60,7 @@ class TestBingImagesEngine(SearxTestCase):
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="imgpt">
|
<div class="imgpt">
|
||||||
<a m='{"purl":"page_url2","murl":"img_url2"}' mad='{"turl":"thumb_url2"}'>
|
<a m='{"purl":"page_url2","murl":"img_url2","turl":"thumb_url2"}'>
|
||||||
<img src="" alt="alt text 2" />
|
<img src="" alt="alt text 2" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -71,7 +71,7 @@ class TestBingImagesEngine(SearxTestCase):
|
|||||||
<li>
|
<li>
|
||||||
<div>
|
<div>
|
||||||
<div class="imgpt">
|
<div class="imgpt">
|
||||||
<a m='{"purl":"page_url3","murl":"img_url3"}' mad='{"turl":"thumb_url3"}'>
|
<a m='{"purl":"page_url3","murl":"img_url3","turl":"thumb_url3"}'>
|
||||||
<img src="" alt="alt text 3" />
|
<img src="" alt="alt text 3" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user