I am using scrapy to crawl different sites, for each site I have an Item (different information is extracted)
Well, for example I have a generic pipeline (most of information is the same) but now I am crawling some google search response and the pipeline must be different.
For example:
GenericItem uses GenericPipeline
But the GoogleItem uses GoogleItemPipeline, but when the spider is crawling it tries to use GenericPipeline instead of GoogleItemPipeline….how can I specify which pipeline Google spider must use?
Now only one way – check Item type in pipeline and process it or return “as is”
pipelines.py:
items.py: