forked from Ponysearch/Ponysearch
Uses the raw url for the image result, rather than the full
size result.
This commit is contained in:
parent
cd7849ffc8
commit
72d063d27d
1 changed files with 8 additions and 7 deletions
|
@ -29,11 +29,12 @@ def response(resp):
|
||||||
results = []
|
results = []
|
||||||
json_data = loads(resp.text)
|
json_data = loads(resp.text)
|
||||||
|
|
||||||
|
if 'results' in json_data:
|
||||||
for result in json_data['results']:
|
for result in json_data['results']:
|
||||||
results.append({'template': 'images.html',
|
results.append({'template': 'images.html',
|
||||||
'url': result['links']['html'],
|
'url': result['links']['html'],
|
||||||
'thumbnail_src': result['urls']['thumb'],
|
'thumbnail_src': result['urls']['thumb'],
|
||||||
'img_src': result['urls']['full'],
|
'img_src': result['urls']['raw'],
|
||||||
'title': result['description'],
|
'title': result['description'],
|
||||||
'content': ''})
|
'content': ''})
|
||||||
return results
|
return results
|
||||||
|
|
Loading…
Reference in a new issue