I am scraping some data with complex hierarchical info and need to export the result to json.
I defined the items as
class FamilyItem(): name =
Not sure if there's a way to do nested items in scrapy with classes but arrays work fine. You could do something like this:
grandson = Grandson(name = 'Grandson', age = 2) son = Son(name = 'Son', grandsons = [grandson]) item = Item(name = 'Name', son = [son])