one topic again ^^ Based on recommendations here, I've implemented my bot the following and tested it all in shell :
name_list = response.css("h2.label.title::text").extract()packaging_list = response.css("div.label.packaging::text").extract()ean = response.css("h1.page-title::text").extract_first()product_price = ''.join(response.css('.product-pricing__main-price ::text').extract())company = "carrefour"for name, packaging, price in zip(name_list, packaging_list, product_price):item = ScrapybotItem()item['ean'] = eanitem['desc'] = name.replace("\n","").strip() + " " + packagingitem['price'] = priceitem['company'] = companyyield item
Problem is with price field.
For price in shell, I have for instance :
In [2]: product_price
Out[2]: '\n 5,65€\n\n \n '
Output from script for same product :
{'company': 'carrefour',
'desc': "Gel nettoyant anti-imperfections 5 en 1 L'Oréal Paris Men Expert le "'tube de 150ml','ean': '\n 1 résultat pour « 3600522418634 »\n','price': '\n'}
Do you know why don't I get result for prices with script ?