I write few spiders in the same project, which call the same pipeline class.
In pipeline code like this:
def process_item(self, item, spider):
if spider.name == 'spider1':
# do something
if spider.name == 'spider2':
# do something
...
And it works, before I let my new spiedrX call it.
And the code my spiderX call just like how other spider call:
# just like this kind of way
for book in books:
item = BookItem();
# assignment
yield item
Then it doesn't call pipeline but others can, I can't figure out why.
When I run spiderX, there is a line scrapy output:
2016-07-17 22:30:15 [scrapy] INFO: Enabled item pipelines:
['dgut_spider.pipelines.CustomPipeline']
It means that pipeline can work I guess
Any suggestions will appreciate.
Edit: just my new spiderX can't call pipeline, others can.