Exemplo n.º 1
0
    def parse_item(self, response):
        data = data_extractor.extractItems(self, response, self.getters)
        try:
            print '\n\n\n\n\n',repr(data),'\n\n\n\n'
            worth = data_processor.extract_decimals(data['worth'])
            price = data_processor.extract_decimals(data['price'])
            savings = worth - price
            data['discount'] = (savings/worth)*100
        except:
            data['discount'] = None
        return data


        
Exemplo n.º 2
0
 def parse_item(self, response):
     return data_extractor.extractItems(self, response, self.getters)