add profile image to user results

This commit is contained in:
ta 2022-08-17 14:30:59 +07:00
parent b6fd7cd571
commit c8acd4a3b6

View File

@ -62,7 +62,12 @@ def response(resp):
for user in json_res['users'].values():
results.append(
{'title': user['name'], 'content': user['description'], 'url': 'https://twitter.com/' + user['screen_name']}
{
'title': user['name'],
'content': user['description'],
'url': 'https://twitter.com/' + user['screen_name'],
'img_src': user['profile_image_url_https'],
}
)
return results