Skip to content

Commit

Permalink
Merge pull request #58 from jwaterhouse/fix_web_media_likes_count
Browse files Browse the repository at this point in the history
Support looking for media likes count under "edge_media_preview_like"
  • Loading branch information
ping authored Mar 3, 2018
2 parents 731ad53 + 4603f4b commit 31755e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion instagram_web_api/compatpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def media(cls, media, drop_incompat_keys=False):
media['videos'] = videos
media['likes'] = {
'count': (media.get('likes', {})
or media.get('edge_liked_by', {})).get('count', 0),
or media.get('edge_liked_by', {})
or media.get('edge_media_preview_like', {})).get('count', 0),
'data': []
}
media['comments'] = {
Expand Down

0 comments on commit 31755e0

Please sign in to comment.