From c5b60b8a127a311a2e1c171b95cb8ebab0199142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Koch-Kramer?= Date: Thu, 29 Mar 2018 20:31:39 +0200 Subject: [PATCH] GraphQL for post locations --- instaloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instaloader.py b/instaloader.py index 1e20af5..7fd2126 100755 --- a/instaloader.py +++ b/instaloader.py @@ -411,7 +411,7 @@ class Post: if loc_dict is not None: location_json = self._instaloader.get_json("explore/locations/{0}/".format(loc_dict["id"]), params={'__a': 1}) - return location_json["location"] + return location_json["location"] if "location" in location_json else location_json['graphql']['location'] @staticmethod def json_encoder(obj) -> Dict[str, Any]: