Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
    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)
Exemplo n.º 4
0
    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)
Exemplo n.º 5
0
 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)