1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-11-20 17:22:31 +01:00

GraphQL for post locations

This commit is contained in:
André Koch-Kramer 2018-03-29 20:31:39 +02:00
parent 40a87761c9
commit c5b60b8a12

View File

@ -411,7 +411,7 @@ class Post:
if loc_dict is not None: if loc_dict is not None:
location_json = self._instaloader.get_json("explore/locations/{0}/".format(loc_dict["id"]), location_json = self._instaloader.get_json("explore/locations/{0}/".format(loc_dict["id"]),
params={'__a': 1}) params={'__a': 1})
return location_json["location"] return location_json["location"] if "location" in location_json else location_json['graphql']['location']
@staticmethod @staticmethod
def json_encoder(obj) -> Dict[str, Any]: def json_encoder(obj) -> Dict[str, Any]: