提交 6ed08d23 编写于 作者: P Paul Tremberth

Add note for DEPTH_PRIORITY

上级 1c831088
...@@ -276,6 +276,8 @@ DEPTH_LIMIT ...@@ -276,6 +276,8 @@ DEPTH_LIMIT
Default: ``0`` Default: ``0``
Scope: ``scrapy.spidermiddlewares.depth.DepthMiddleware``
The maximum depth that will be allowed to crawl for any site. If zero, no limit The maximum depth that will be allowed to crawl for any site. If zero, no limit
will be imposed. will be imposed.
...@@ -286,9 +288,20 @@ DEPTH_PRIORITY ...@@ -286,9 +288,20 @@ DEPTH_PRIORITY
Default: ``0`` Default: ``0``
An integer that is used to adjust the request priority based on its depth. Scope: ``scrapy.spidermiddlewares.depth.DepthMiddleware``
An integer that is used to adjust the request priority based on its depth:
- **a positive value will decrease the priority**
- a negative value will increase priority
If zero (default), no priority adjustment is made from depth.
If zero, no priority adjustment is made from depth. .. note::
This setting adjusts priority **in the opposite way** compared to
other priority settings :setting:`REDIRECT_PRIORITY_ADJUST`
and :setting:`RETRY_PRIORITY_ADJUST`.
.. setting:: DEPTH_STATS .. setting:: DEPTH_STATS
...@@ -297,6 +310,8 @@ DEPTH_STATS ...@@ -297,6 +310,8 @@ DEPTH_STATS
Default: ``True`` Default: ``True``
Scope: ``scrapy.spidermiddlewares.depth.DepthMiddleware``
Whether to collect maximum depth stats. Whether to collect maximum depth stats.
.. setting:: DEPTH_STATS_VERBOSE .. setting:: DEPTH_STATS_VERBOSE
...@@ -306,6 +321,8 @@ DEPTH_STATS_VERBOSE ...@@ -306,6 +321,8 @@ DEPTH_STATS_VERBOSE
Default: ``False`` Default: ``False``
Scope: ``scrapy.spidermiddlewares.depth.DepthMiddleware``
Whether to collect verbose depth stats. If this is enabled, the number of Whether to collect verbose depth stats. If this is enabled, the number of
requests for each depth is collected in the stats. requests for each depth is collected in the stats.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册