class MyPipeline(object):

    def process_item(self, item, spider):
        if self.__class__.__name__ not in getattr(spider, 'pipelines', []):
            return item
Scrapy. How to change spider settings after start crawling?