From 37cbc5d72d00e7dc5c4c7cb827af316e7901a954 Mon Sep 17 00:00:00 2001 From: fireattack Date: Thu, 16 Jun 2022 03:18:59 -0500 Subject: [PATCH] Handle StoryImage in StoryItem.url (#1558) --- instaloader/structures.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instaloader/structures.py b/instaloader/structures.py index ba16b0a..5efa541 100644 --- a/instaloader/structures.py +++ b/instaloader/structures.py @@ -1207,7 +1207,8 @@ class StoryItem: @property def url(self) -> str: """URL of the picture / video thumbnail of the StoryItem""" - if self.typename == "GraphStoryImage" and self._context.iphone_support and self._context.is_logged_in: + if self.typename in ["GraphStoryImage", "StoryImage"] and \ + self._context.iphone_support and self._context.is_logged_in: try: orig_url = self._iphone_struct['image_versions2']['candidates'][0]['url'] url = re.sub(r'([?&])se=\d+&?', r'\1', orig_url).rstrip('&')