Skip to content

Commit

Permalink
Bugfix extract_media_gql
Browse files Browse the repository at this point in the history
  • Loading branch information
adw0rd committed Dec 29, 2020
1 parent ebec060 commit f13f746
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions instagrapi/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ def extract_media_gql(data):
media.pop('thumbnail_url', '')
media.pop('video_url', '')
location = media.pop("location", None)
media['id'] = f"{media.pop('id')}_{user.pk}"
media_id = media.get('id')
media['pk'] = media_id
media['id'] = f"{media_id}_{user.pk}"
return Media(
pk=media['id'],
code=media.get("shortcode"),
taken_at=media["taken_at_timestamp"],
location=extract_location(location) if location else None,
Expand Down

0 comments on commit f13f746

Please sign in to comment.