Skip to content Skip to sidebar Skip to footer

Overriding The Serialize_field() Method In Scrapy

Im using code from Scrapy documentation, with 'Product' class item created from scrapy.exporter import XmlItemExporter class ProductXmlExporter(XmlItemExporter): def serializ

Solution 1:

Not familiar with scrapy but how is the Product class related to ProductXmlExporter? The super keyword does not accept unrelated classes so your call should really be return super(XmlItemExporter, self).serialize_field(field, name, value), assuming you want to call serialize_field method of XmlItemExporter.


Post a Comment for "Overriding The Serialize_field() Method In Scrapy"