Skip to content

Commit

Permalink
fix: Update print method default color and adjust cart status logic
Browse files Browse the repository at this point in the history
  • Loading branch information
techtanic committed Nov 3, 2024
1 parent e683833 commit 7a1ec1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 7a1ec1d

Please sign in to comment.