From 66c257362dd0b7c521c57daa29ddeaa10c31f10e Mon Sep 17 00:00:00 2001 From: Seamus Mullan <43112447+SeamusMullan@users.noreply.github.com> Date: Wed, 3 Jul 2024 06:19:16 +0000 Subject: [PATCH] Fix for issue #1085 (#2214) Implement check for post.mediacount before checking if posts have been downloaded. --------- Co-authored-by: Alexander Graf <17130992+aandergr@users.noreply.github.com> --- instaloader/instaloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instaloader/instaloader.py b/instaloader/instaloader.py index 062c983..7543df1 100644 --- a/instaloader/instaloader.py +++ b/instaloader/instaloader.py @@ -722,7 +722,7 @@ class Instaloader: # Download the image(s) / video thumbnail and videos within sidecars if desired downloaded = True if post.typename == 'GraphSidecar': - if self.download_pictures or self.download_videos: + if (self.download_pictures or self.download_videos) and post.mediacount > 0: if not _all_already_downloaded( filename_template, enumerate( (post.get_is_videos()[i]