diff options
| author | Mathieu Brunot <mathieu.brunot@monogramm.io> | 2020-01-14 15:43:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-14 15:43:43 +0100 |
| commit | 24472ce71832a2b516e0c96fe73587208eb33c65 (patch) | |
| tree | 830e82e0781c96068110052dafb8047fb8622565 /searx/engines/flickr_noapi.py | |
| parent | 359c18f9e633fe4cf1062bb2e7507840065e6ca5 (diff) | |
| parent | bda189565589b0065152f5a9fba4565404f9bd9a (diff) | |
Merge branch 'master' into docker/opencontainers
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..c8ee34f7a 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 + result['title'] = title + result['content'] = content + except: + result['author'] = '' + result['title'] = '' + result['content'] = '' + results.append(result) return results |