Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Document the error argument of spider_closed. (#8357)

Andrey Rakhmatullin97d08de945ea
diff --git a/docs/topics/signals.rst b/docs/topics/signals.rst
index 3164dbe75..8eb628c2d 100644
--- a/docs/topics/signals.rst
+++ b/docs/topics/signals.rst
@@ -275,11 +275,14 @@ spider_closed
~~~~~~~~~~~~~
.. signal:: spider_closed
-.. function:: spider_closed(spider, reason)
+.. function:: spider_closed(spider, reason, error)
Sent after a spider has been closed. This can be used to release per-spider
resources reserved on :signal:`spider_opened`.
+ .. versionchanged:: VERSION
+ Added the *error* argument.
+
This signal supports :ref:`asynchronous handlers <signal-deferred>`.
:param spider: the spider which has been closed
@@ -294,6 +297,10 @@ spider_closed
Ctrl-C to stop it) the reason will be ``'shutdown'``.
:type reason: str
+ :param error: whether the crawl failed, see the
+ :stat:`finish_reason_error` stat
+ :type error: bool
+
spider_opened
~~~~~~~~~~~~~