def proc_1(value):
# data processing
return value
def proc_2(value):
# data processing
return value
def proc_3(value):
# data processing
return value
Class MyFields(scrapy.items):
f1 = scrapy.Field(output_processor=proc_1)
f2 = scrapy.Field(output_processor=proc_2)
f3 = scrapy.Field(output_processor=proc_3)
#...
class TestPipeline(object):
def process_item(self, item, spider):
# data processing
return item
и так
и даже так