diff --git a/src/morePromotions.py b/src/morePromotions.py index 588bfb4c..a1986a62 100644 --- a/src/morePromotions.py +++ b/src/morePromotions.py @@ -108,8 +108,6 @@ def completeMorePromotions(self): self.browser.webdriver.execute_script("window.scrollTo(0, 1080)") time.sleep(random.randint(5, 10)) - if promotion["pointProgress"] < promotion["pointProgressMax"]: - incompletePromotions.append((promotionTitle, promotion["promotionType"])) self.browser.utils.resetTabs() time.sleep(2) except Exception: # pylint: disable=broad-except @@ -117,6 +115,9 @@ def completeMorePromotions(self): # Reset tabs in case of an exception self.browser.utils.resetTabs() continue + for promotion in self.browser.utils.getDashboardData()["morePromotions"]: # Have to refresh + if promotion["pointProgress"] < promotion["pointProgressMax"]: + incompletePromotions.append((promotion["title"], promotion["promotionType"])) if incompletePromotions: Utils.sendNotification("Incomplete promotions(s)", incompletePromotions) logging.info("[MORE PROMOS] Exiting")