From ae39ab9893e3b084ae6475402febcf23405a5b62 Mon Sep 17 00:00:00 2001 From: Arman Yeghiazaryan Date: Wed, 4 Aug 2021 19:28:56 +0400 Subject: [PATCH] Fix Post.location / --geotags (#1244) Closes #1109. --- instaloader/structures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instaloader/structures.py b/instaloader/structures.py index 797af98..12602f4 100644 --- a/instaloader/structures.py +++ b/instaloader/structures.py @@ -553,8 +553,8 @@ class Post: return None location_id = int(loc['id']) if any(k not in loc for k in ('name', 'slug', 'has_public_page', 'lat', 'lng')): - loc = self._context.get_json("explore/locations/{0}/".format(location_id), - params={'__a': 1})['graphql']['location'] + loc.update(self._context.get_json("explore/locations/{0}/".format(location_id), + params={'__a': 1})['native_location_data']['location_info']) self._location = PostLocation(location_id, loc['name'], loc['slug'], loc['has_public_page'], loc['lat'], loc['lng']) return self._location