So I am writing a validator for my Scrapy data and want the spider to stop crawling if the data is in an incorrect format. I am doing this in Pipeline.py.
I have already tried calling CloseSpider, close_spider and crawler._signal_shutdown(9,0) (which have been used in other tutorials but for some reason don't work in pipeline.py). I am aware that the spider does not finish straight away but all the above methods seem to yield some sort of error. Is there just a straight forward way to kill the crawler?