Skip to content Skip to sidebar Skip to footer

Custom Signal Not Being Handled By Scrapy Internal API

I am trying to handle a custom signal 'signalizers.item_extracted' in a Scrapy extension 'MyExtension' which is successfully enabled when scrapy starts. Here is my code: signalizer

Solution 1:

After reading a few Scrapy's source code i figured out the problem was on creating a new Signal manager instance instead of using crawler's one:

spider.crawler.signals.send_catch_log(signal=signalizers.item_extracted, item=item, spider=spider)

Now It is properly handled by the extension


Post a Comment for "Custom Signal Not Being Handled By Scrapy Internal API"