Skip to content
This repository was archived by the owner on Jul 10, 2019. It is now read-only.

Commit 40c48b8

Browse files
committed
1 parent 6522cff commit 40c48b8

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

instagram/models.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ def object_from_dictionary(cls, entry):
9696

9797
new_media.comment_count = entry['comments']['count']
9898
new_media.comments = []
99-
for comment in entry['comments']['data']:
100-
new_media.comments.append(Comment.object_from_dictionary(comment))
99+
if entry['comments'].get('data'):
100+
for comment in entry['comments'].get('data'):
101+
new_media.comments.append(Comment.object_from_dictionary(comment))
101102

102103
new_media.users_in_photo = []
103104
if entry.get('users_in_photo'):

python_instagram.egg-info/PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 1.0
22
Name: python-instagram
3-
Version: 1.1.3
3+
Version: 1.1.5
44
Summary: Instagram API client
55
Home-page: http://github.com/Instagram/python-instagram
66
Author: Instagram, Inc
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
simplejson
2-
httplib2
2+
httplib2
3+
six

0 commit comments

Comments
 (0)