Scrapy, a fast high-level web crawling & scraping framework for Python.
Document that the main entry point of downloader and spider middlewares is from_crawler()
Adrián Chaves50bf4c60c480
diff --git a/docs/topics/downloader-middleware.rst b/docs/topics/downloader-middleware.rstindex 8dbe249fa..18a0639ce 100644--- a/docs/topics/downloader-middleware.rst+++ b/docs/topics/downloader-middleware.rst@@ -55,8 +55,12 @@ particular setting. See each middleware documentation for more info.Writing your own downloader middleware======================================-Each middleware component is a Python class that defines one or-more of the following methods:+Each downloader middleware is a Python class that defines one or more of the+methods defined below.++The main entry point is the ``from_crawler`` class method, which receives a+:class:`~scrapy.crawler.Crawler` instance. The :class:`~scrapy.crawler.Crawler`+object gives you access, for example, to the :ref:`settings <topics-settings>`... module:: scrapy.downloadermiddlewaresdiff --git a/docs/topics/spider-middleware.rst b/docs/topics/spider-middleware.rstindex 2b7e42771..62b5ca0e8 100644--- a/docs/topics/spider-middleware.rst+++ b/docs/topics/spider-middleware.rst@@ -57,8 +57,12 @@ particular setting. See each middleware documentation for more info.Writing your own spider middleware==================================-Each middleware component is a Python class that defines one or more of the-following methods:+Each spider middleware is a Python class that defines one or more of the+methods defined below.++The main entry point is the ``from_crawler`` class method, which receives a+:class:`~scrapy.crawler.Crawler` instance. The :class:`~scrapy.crawler.Crawler`+object gives you access, for example, to the :ref:`settings <topics-settings>`... module:: scrapy.spidermiddlewares