Reputation: 11
My spider yields two types of items, which are then processed by a pipeline. Is there a way for the pipeline to identify each type of item (other than through the keys). Some sort of metadata type or title field?
Upvotes: 0
Views: 307
Reputation: 10666
In your pipelines.py
:
def process_item(self, item, spider):
if isinstance(item, YourItemType1):
# code to process Item Type 1
Upvotes: 1