mirror of https://github.com/scrapy/scrapy.git
Merge pull request #3626 from Gallaecio/middlewares-from-crawler
[MRG+1] Document that the main entry point of downloader and spider middlewar…
This commit is contained in:
commit
d346b8cb0f
|
|
@ -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.downloadermiddlewares
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue