@@ -13,6 +13,10 @@
1313from urllib import urlencode
1414from json import loads
1515import re
16+from searx.engines import logger
17+
18+
19+logger = logger.getChild('flickr-noapi')
1620
1721categories = ['images']
1822
@@ -62,10 +66,11 @@ def response(resp):
6266 # From the biggest to the lowest format
6367 for image_size in image_sizes:
6468 if image_size in photo['sizes']:
65− img_src = photo['sizes'][image_size]['displayUrl']
69+ img_src = photo['sizes'][image_size]['url']
6670 break
6771
6872 if not img_src:
73+ logger.debug('cannot find valid image size: {0}'.format(repr(photo)))
6974 continue
7075
7176 if 'id' not in photo['owner']:
@@ -73,9 +78,9 @@ def response(resp):
7378
7479# For a bigger thumbnail, keep only the url_z, not the url_n
7580 if 'n' in photo['sizes']:
76− thumbnail_src = photo['sizes']['n']['displayUrl']
81+ thumbnail_src = photo['sizes']['n']['url']
7782 elif 'z' in photo['sizes']:
78− thumbnail_src = photo['sizes']['z']['displayUrl']
83+ thumbnail_src = photo['sizes']['z']['url']
7984 else:
8085 thumbnail_src = img_src
8186