From 7a1ec1db6ead900a2c7f7a660d455a4907014acf Mon Sep 17 00:00:00 2001 From: Techtanic <64263079+techtanic@users.noreply.github.com> Date: Sun, 3 Nov 2024 12:37:21 +0530 Subject: [PATCH] fix: Update print method default color and adjust cart status logic --- base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base.py b/base.py index dfaef06..ceda6b4 100644 --- a/base.py +++ b/base.py @@ -415,7 +415,7 @@ def __init__(self, interface: str, debug: bool = False): self.client.headers.update(headers) self.debug = debug - def print(self, content: str, color: str, **kargs): + def print(self, content: str, color: str="red", **kargs): colours_dict = { "yellow": fy, "red": fr, @@ -960,7 +960,7 @@ def discounted_checkout(self, coupon, course_id) -> dict: "price": {"amount": 0, "currency": self.currency.upper()}, } ], - "is_cart": True, + "is_cart": False, }, } headers = { @@ -1045,7 +1045,7 @@ def process_coupon(self, course_id, coupon_code, amount): self.enrolled_courses[course_id] = self.get_now_to_utc() self.amount_saved_c += amount self.save_course() - time.sleep(3.75) + time.sleep(3.7) elif checkout_response["status"] == "failed": message = checkout_response["message"] if "item_already_subscribed" in message: