Explicit message for scrapy parse callback

The scrapy parse method raises a NotImplementedError when not defined,
but for new comers it can be hard to debug what might be going wrong.

Adding an explicit message for NotImplementedError will help new users.
This commit is contained in:
kirankoduru 2017-07-29 20:51:54 -04:00 committed by Kiran Koduru
parent a68a8f8fdc
commit be71f98e92
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ class Spider(object_ref):
return Request(url, dont_filter=True)
def parse(self, response):
raise NotImplementedError
raise NotImplementedError('Spider.parse callback is not defined')
@classmethod
def update_settings(cls, settings):