Skip to content

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

Document that process_spider_output receives a lazy result (#7939)

Adriana18d58d7b50e
diff --git a/docs/topics/spider-middleware.rst b/docs/topics/spider-middleware.rst
index aa14f6801..78b211dac 100644
--- a/docs/topics/spider-middleware.rst
+++ b/docs/topics/spider-middleware.rst
@@ -122,6 +122,9 @@ one or more of these methods:
This method is an :term:`asynchronous generator` called with the
results from the spider after the spider has processed the response.
+ *result* is lazy: a generator callback runs as *result* is iterated, so
+ code that runs before that iteration runs before the callback body.
+
.. seealso:: :ref:`universal-spider-middleware`.
:param response: the response which generated this output from the