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
2dc2e1e8
Commit
2dc2e1e8
authored
Jan 02, 2020
by
Adam Tauber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] skip invalid encoded attributes
parent
2292e6e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
flickr_noapi.py
searx/engines/flickr_noapi.py
+17
-9
No files found.
searx/engines/flickr_noapi.py
View file @
2dc2e1e8
...
...
@@ -109,14 +109,22 @@ def response(resp):
else
:
url
=
build_flickr_url
(
photo
[
'ownerNsid'
],
photo
[
'id'
])
results
.
append
({
'url'
:
url
,
'title'
:
title
,
'img_src'
:
img_src
,
'thumbnail_src'
:
thumbnail_src
,
'content'
:
content
,
'author'
:
author
,
'source'
:
source
,
'img_format'
:
img_format
,
'template'
:
'images.html'
})
result
=
{
'url'
:
url
,
'img_src'
:
img_src
,
'thumbnail_src'
:
thumbnail_src
,
'source'
:
source
,
'img_format'
:
img_format
,
'template'
:
'images.html'
}
try
:
result
[
'author'
]
=
author
.
encode
(
'utf-8'
)
result
[
'title'
]
=
title
.
encode
(
'utf-8'
)
result
[
'content'
]
=
content
.
encode
(
'utf-8'
)
except
:
result
[
'author'
]
=
''
result
[
'title'
]
=
''
result
[
'content'
]
=
''
results
.
append
(
result
)
return
results
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