Skip to content

Commit f13f746

Browse files
committed
Bugfix extract_media_gql
1 parent ebec060 commit f13f746

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

instagrapi/extractors.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ def extract_media_gql(data):
9090
media.pop('thumbnail_url', '')
9191
media.pop('video_url', '')
9292
location = media.pop("location", None)
93-
media['id'] = f"{media.pop('id')}_{user.pk}"
93+
media_id = media.get('id')
94+
media['pk'] = media_id
95+
media['id'] = f"{media_id}_{user.pk}"
9496
return Media(
95-
pk=media['id'],
9697
code=media.get("shortcode"),
9798
taken_at=media["taken_at_timestamp"],
9899
location=extract_location(location) if location else None,

0 commit comments

Comments
 (0)