(self, spider: Spider)
return self.slot.closing
Close a spider being scraped and release its resources
Close a spider being scraped and release its resources
Close a spider being scraped and release its resources
def close_spider(self, spider: Spider) -> Deferred:
        """Close a spider being scraped and release its resources"""
        if self.slot is None:
            raise RuntimeError("Scraper slot not assigned")
        self.slot.closing = Deferred()
        self.slot.closing.addCallback(self.itemproc.close_spider)
        self._check_if_closing(spider)
        return self.slot.closing
def close_spider ( self , spider : Spider ) -> Deferred : if self . slot is None : raise RuntimeError ( "Scraper slot not assigned" ) self . slot . closing = Deferred ( ) self . slot . closing . addCallback ( self . itemproc . close_spider ) self . _check_if_closing ( spider ) return self . slot . closing