def transform_opinion(self): self.purchased = True if self.purchased == "Opinia potwierdzona zakupem" else False self.useful = int(self.useful) self.useless = int(self.useless) self.content = remove_whitespaces(self.content) self.pros = remove_whitespaces(self.pros) self.cons = remove_whitespaces(self.cons)
def transform_opinion(self): self.purchased = True if self.purchased == "Opinia potwierdzona zakupem" else False self.useful = int(self.useful) self.useless = int(self.useless) self.content = remove_whitespaces(self.content) try: self.pros = remove_whitespaces(self.pros).replace("Zalety. ", "") except AttributeError: pass try: self.cons = remove_whitespaces(self.cons).replace("Wady. ", "") except AttributeError: pass
def transform_opinion(self): self.purchased = (self.purchased == 'Opinia potwierdzona zakupem') self.useful = int(self.useful) self.useless = int(self.useless) self.content = remove_whitespaces(self.content) self.pros = remove_whitespaces(self.pros) self.cons = remove_whitespaces(self.cons) # opinion = Opinion() # print(opinion) # product = Product(None, None, opinions=[opinion]) # print(product)
def transform_opinion(self): self.purchased = (self.purchased == "Opinia potwierdzona zakupem") self.useful = int(self.useful) self.useless = int(self.useless) self.content = remove_whitespaces(self.content) #product = Product("79688141") #product.extract_product() #product.save_product() #print(product)
def transform_opinion(self): self.purchased = (self.purchased == "Opinia potwierdzona zakupem") self.useful = int(self.useful) self.useless = int(self.useless) self.content = remove_whitespaces(self.content)