From b963429ce4017592553d4130008ae8c0669c9beb Mon Sep 17 00:00:00 2001 From: Drew Ritter Date: Wed, 15 Jun 2016 10:00:09 -0700 Subject: [PATCH] patch for https://github.com/facebookarchive/python-instagram/pull/232 --- instagram/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instagram/models.py b/instagram/models.py index d2517ca2..c04d4cd0 100644 --- a/instagram/models.py +++ b/instagram/models.py @@ -96,7 +96,7 @@ def object_from_dictionary(cls, entry): new_media.comment_count = entry['comments']['count'] new_media.comments = [] - for comment in entry['comments']['data']: + for comment in entry['comments'].get('data'): new_media.comments.append(Comment.object_from_dictionary(comment)) new_media.users_in_photo = []