diff options
author | Adam Tauber <asciimoo@gmail.com> | 2020-06-15 19:15:24 +0200 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2020-06-15 19:15:24 +0200 |
commit | 32f7877235f87f1dcfabc271e5c92539bbcdac9a (patch) | |
tree | be3e91750a7386d890e9276e7b555f12c162592b /searx/engines/flickr_noapi.py | |
parent | 4ca0d8cb0fd6c0e6b1301a6e8577aea6d928e9dc (diff) | |
download | searxng-32f7877235f87f1dcfabc271e5c92539bbcdac9a.tar.gz searxng-32f7877235f87f1dcfabc271e5c92539bbcdac9a.zip |
[fix] resolve flickr_noapi encoding issues
Diffstat (limited to 'searx/engines/flickr_noapi.py')
-rw-r--r-- | searx/engines/flickr_noapi.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/searx/engines/flickr_noapi.py b/searx/engines/flickr_noapi.py index c8ee34f7a..1cbb3e0a9 100644 --- a/searx/engines/flickr_noapi.py +++ b/searx/engines/flickr_noapi.py @@ -117,14 +117,10 @@ def response(resp): 'img_format': img_format, 'template': 'images.html' } - try: - result['author'] = author - result['title'] = title - result['content'] = content - except: - result['author'] = '' - result['title'] = '' - result['content'] = '' + result['author'] = author.encode('utf-8', 'ignore').decode('utf-8') + result['source'] = source.encode('utf-8', 'ignore').decode('utf-8') + result['title'] = title.encode('utf-8', 'ignore').decode('utf-8') + result['content'] = content.encode('utf-8', 'ignore').decode('utf-8') results.append(result) return results |