Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
searx-engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
searx-engine
Commits
cf8e2246
Unverified
Commit
cf8e2246
authored
Jan 01, 2019
by
Noémi Ványi
Committed by
GitHub
Jan 01, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1469 from bourrel/fix_bing_images
Fix bing image thumbnail path
parents
442772a6
73ec2ba7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
bing_images.py
searx/engines/bing_images.py
+1
-3
test_bing_images.py
tests/unit/engines/test_bing_images.py
+3
-3
No files found.
searx/engines/bing_images.py
View file @
cf8e2246
...
...
@@ -88,9 +88,7 @@ def response(resp):
url
=
json_data
.
get
(
'purl'
)
img_src
=
json_data
.
get
(
'murl'
)
thumb_json_data
=
loads
(
_quote_keys_regex
.
sub
(
r'\1"\2": \3'
,
link
.
attrib
.
get
(
'mad'
)))
thumbnail
=
thumb_json_data
.
get
(
'turl'
)
thumbnail
=
json_data
.
get
(
'turl'
)
# append result
results
.
append
({
'template'
:
'images.html'
,
...
...
tests/unit/engines/test_bing_images.py
View file @
cf8e2246
...
...
@@ -52,7 +52,7 @@ class TestBingImagesEngine(SearxTestCase):
<li>
<div>
<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" />
</a>
</div>
...
...
@@ -60,7 +60,7 @@ class TestBingImagesEngine(SearxTestCase):
</div>
<div>
<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" />
</a>
</div>
...
...
@@ -71,7 +71,7 @@ class TestBingImagesEngine(SearxTestCase):
<li>
<div>
<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" />
</a>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment