def get_normal_price(self, product_element: element) -> float: priceStr = product_element.select_one( ".price-box .old-price span.price-old") if priceStr is None: priceStr = product_element.select_one( ".price-box .regular-price span.price") if priceStr: return float(self.parse_price(priceStr.text)) return None
def get_status(self, product_element: element) -> int: button = product_element.select_one( "div.salesperson-category-products li.first div.actions div.add-to-cart button.btn-cart" ) return button is not None
def get_offer_price(self, product_element: element) -> float: priceStr = product_element.select_one( ".price-box p.special-price span.price") if priceStr: return float(self.parse_price(priceStr.text)) return None