Packaging by columns in CSV

I'm learning Scrapy and taking the first steps, and I can't figure out how to do column packing when exporting parsed data to CSV. For example, I'm parsing an online store and there each product has a huge number of characteristics (attributes), I need each of these attributes to be in a separate column in the CSV file. I think that you need to parse all the characteristics with HTML tags in one field and then specify in which tag the attribute name is, and in which the value is the attribute name is the name of the column, and the attribute name is the name of the column. You will get each characteristic (attribute) of the product in a separate column.

How do I do this?

Author: Kromster, 2019-09-25

1 answers

To help you, XPath-String text () - returns a set of text nodes.

 0
Author: Wertartem, 2019-09-27 11:27:04