1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-10-03 22:07:11 +02:00

Handle StoryImage in StoryItem.url (#1558)

This commit is contained in:
fireattack 2022-06-16 03:18:59 -05:00 committed by GitHub
parent 853e860363
commit 37cbc5d72d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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('&')