mirror of https://github.com/scrapy/scrapy.git
updated doc: ref/emails.rst and topics/downloader-middleware.rst
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40717
This commit is contained in:
parent
468bfeb278
commit
e316722bb1
|
|
@ -52,7 +52,9 @@ uses `Twisted non-blocking IO`_, like the rest of the framework.
|
|||
|
||||
``body`` is a string with the body of the message
|
||||
|
||||
``attachs`` is a list of tuples containing (attach_name, mimetype, file_object) where:
|
||||
``attachs`` is an iterable of tuples (attach_name, mimetype, file_object)
|
||||
where:
|
||||
|
||||
``attach_name`` is a string with the name will appear on the emails attachment
|
||||
``mimetype`` is the mimetype of the attachment
|
||||
``file_object`` is a readable file object
|
||||
|
|
|
|||
|
|
@ -50,9 +50,16 @@ If returns a Response object, Scrapy won't bother calling ANY other request or
|
|||
exception middleware, or the appropriate download function; it'll return that
|
||||
Response. Response middleware is always called on every response.
|
||||
|
||||
If returns a :class:`~scrapy.http.Request` object, returned request is used to
|
||||
instruct a redirection. Redirection is handled inside middleware scope, and
|
||||
original request don't finish until redirected request is completed.
|
||||
If returns a :class:`~scrapy.http.Request` object, the returned request will be
|
||||
re-scheduled (in the Scheduler) to be downloaded in the future. The callback of
|
||||
the original request will always be called. If the new request has a callback
|
||||
it will be called with the response downloaded, and the output of that callback
|
||||
will then be passed to the original callback. If the new request doesn't have a
|
||||
callback, the response downloaded will be just passed to the original request
|
||||
callback.
|
||||
|
||||
If returns an :exception:`IgnoreRequest` exception, the entire request will be
|
||||
dropped completely and its callback never called.
|
||||
|
||||
|
||||
.. method:: process_response(request, response, spider)
|
||||
|
|
|
|||
Loading…
Reference in New Issue