From 678f08bc1b6fed5e163add2d0c7406d4b13a520e Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Mon, 25 Apr 2011 09:30:42 -0300 Subject: [PATCH] added warning about using 'parse' as callback in crawl spider rules --- docs/topics/spiders.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/topics/spiders.rst b/docs/topics/spiders.rst index 7f252dc38..dd5f6a6e2 100644 --- a/docs/topics/spiders.rst +++ b/docs/topics/spiders.rst @@ -239,6 +239,11 @@ Crawling rules argument and must return a list containing :class:`~scrapy.item.Item` and/or :class:`~scrapy.http.Request` objects (or any subclass of them). + .. warning:: When writing crawl spider rules, avoid using ``parse`` as + callback, since the :class:`CrawlSpider` uses the ``parse`` method + itself to implement its logic. So if you override the ``parse`` method, + the crawl spider will no longer work. + ``cb_kwargs`` is a dict containing the keyword arguments to be passed to the callback function