diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-01-03 14:30:53 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-01-03 14:30:53 +0100 |
commit | 51b9295b84079776e3ea08971ccb3ac159e37477 (patch) | |
tree | 862d88f07cd975a8be0f05ea76b85191f49ed1ae /searx/engines/flickr_noapi.py | |
parent | f602cb8e4dde214d51216fb547eb4dfdee32e191 (diff) | |
parent | 17b6faa4c3c1cf14a327f4a3538fc70dce08b756 (diff) | |
download | searxng-51b9295b84079776e3ea08971ccb3ac159e37477.tar.gz searxng-51b9295b84079776e3ea08971ccb3ac159e37477.zip |
Merge branch 'master' of https://github.com/asciimoo/searx into add-docs
Diffstat (limited to 'searx/engines/flickr_noapi.py')
-rw-r--r-- | searx/engines/flickr_noapi.py | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/searx/engines/flickr_noapi.py b/searx/engines/flickr_noapi.py index 198ac2cff..e1abb378f 100644 --- a/searx/engines/flickr_noapi.py +++ b/searx/engines/flickr_noapi.py @@ -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 |