mirror of https://github.com/scrapy/scrapy.git
improve docs for DownloaderMiddleware.process_response
This commit is contained in:
parent
163592ee40
commit
39e5da5f66
|
|
@ -87,19 +87,20 @@ single Python class that defines one or more of the following methods:
|
|||
|
||||
.. method:: process_response(request, response, spider)
|
||||
|
||||
:meth:`process_response` should return a :class:`~scrapy.http.Response`
|
||||
object or raise a :exc:`~scrapy.exceptions.IgnoreRequest` exception.
|
||||
:meth:`process_response` should return either a :class:`~scrapy.http.Response`
|
||||
object, a :class:`~scrapy.http.Request` object or
|
||||
raise a :exc:`~scrapy.exceptions.IgnoreRequest` exception.
|
||||
|
||||
If it returns a :class:`~scrapy.http.Response` (it could be the same given
|
||||
response, or a brand-new one), that response will continue to be processed
|
||||
with the :meth:`process_response` of the next middleware in the pipeline.
|
||||
|
||||
If it returns an :exc:`~scrapy.exceptions.IgnoreRequest` exception, the
|
||||
response will be dropped completely and its callback never called.
|
||||
|
||||
If it returns a :class:`~scrapy.http.Request` object, the returned request will be
|
||||
rescheduled to be downloaded in the future.
|
||||
|
||||
If it returns an :exc:`~scrapy.exceptions.IgnoreRequest` exception, the
|
||||
response will be dropped completely and its callback never called.
|
||||
|
||||
:param request: the request that originated the response
|
||||
:type request: is a :class:`~scrapy.http.Request` object
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue