From 210719af56e540312d0b2855799993145066c0f8 Mon Sep 17 00:00:00 2001 From: Eduardo Kalinowski Date: Tue, 22 Jun 2021 16:50:06 -0300 Subject: [PATCH] Avoid uninitialized variable (#1204) fixes #1203 --- instaloader/instaloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instaloader/instaloader.py b/instaloader/instaloader.py index 7435f26..2ed91fe 100644 --- a/instaloader/instaloader.py +++ b/instaloader/instaloader.py @@ -807,7 +807,7 @@ class Instaloader: last_scraped = latest_stamps.get_last_story_timestamp(name) scraped_timestamp = datetime.now().astimezone() for item in user_story.get_items(): - if last_scraped is not None and item.date_utc.replace(tzinfo=timezone.utc) <= last_scraped: + if latest_stamps is not None and item.date_utc.replace(tzinfo=timezone.utc) <= last_scraped: break if storyitem_filter is not None and not storyitem_filter(item): self.context.log("<{} skipped>".format(item), flush=True)