From b98e9941ae260241099e468a3daa1966adcb65ef Mon Sep 17 00:00:00 2001 From: Alexander Graf <17130992+aandergr@users.noreply.github.com> Date: Sun, 19 Apr 2020 11:30:19 +0200 Subject: [PATCH] Omit media when saving Hashtag JSON --- instaloader/structures.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/instaloader/structures.py b/instaloader/structures.py index 8462a21..0af9c80 100644 --- a/instaloader/structures.py +++ b/instaloader/structures.py @@ -1182,7 +1182,11 @@ class Hashtag: self._has_full_metadata = True def _asdict(self): - return self._node + json_node = self._node.copy() + # remove posts + json_node.pop("edge_hashtag_to_top_posts", None) + json_node.pop("edge_hashtag_to_media", None) + return json_node def __repr__(self): return "".format(self.name)