提交 7d68b084 编写于 作者: M Mikhail Korobov

DOC document download_timeout Request.meta key and download_timeout spider attribute.

上级 9af61d5d
......@@ -263,7 +263,14 @@ DownloadTimeoutMiddleware
.. class:: DownloadTimeoutMiddleware
This middleware sets the download timeout for requests specified in the
:setting:`DOWNLOAD_TIMEOUT` setting.
:setting:`DOWNLOAD_TIMEOUT` setting or :attr:`download_timeout`
spider attribute.
.. note::
You can also set download timeout per-request using
:reqmeta:`download_timeout` Request.meta key; this is supported
even when DownloadTimeoutMiddleware is disabled.
HttpAuthMiddleware
------------------
......
......@@ -229,6 +229,7 @@ Those are:
* :reqmeta:`redirect_urls`
* :reqmeta:`bindaddress`
* :reqmeta:`dont_obey_robotstxt`
* :reqmeta:`download_timeout`
.. reqmeta:: bindaddress
......@@ -237,6 +238,15 @@ bindaddress
The IP of the outgoing IP address to use for the performing the request.
.. reqmeta:: download_timeout
download_timeout
----------------
The amount of time (in secs) that the downloader will wait before timing out.
See also: :setting:`DOWNLOAD_TIMEOUT`.
.. _topics-request-response-ref-request-subclasses:
Request subclasses
......
......@@ -416,6 +416,12 @@ Default: ``180``
The amount of time (in secs) that the downloader will wait before timing out.
.. note::
This timeout can be set per spider using :attr:`download_timeout`
spider attribute and per-request using :reqmeta:`download_timeout`
Request.meta key.
.. setting:: DUPEFILTER_CLASS
DUPEFILTER_CLASS
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册