1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-11-04 09:22:29 +01:00

get_node_metadata() now also catches TypeError

Concerns #26
This commit is contained in:
André Koch-Kramer 2017-08-08 00:43:52 +02:00
parent 5d83a4ccf6
commit 42864997b3

View File

@ -547,7 +547,7 @@ class Instaloader:
media = pic_json["entry_data"]["PostPage"][0]["graphql"]["shortcode_media"] \
if "graphql" in pic_json["entry_data"]["PostPage"][0] \
else pic_json["entry_data"]["PostPage"][0]["media"]
except KeyError as err:
except (KeyError, TypeError) as err:
print(err, file=sys.stderr)
print(json.dumps(pic_json, indent=4), file=sys.stderr)
if tries <= 1: