mirror of https://github.com/scrapy/scrapy.git
Rule.process_request: docs
This commit is contained in:
parent
22fda61d62
commit
b30ca379b6
|
|
@ -402,10 +402,12 @@ Crawling rules
|
|||
of links extracted from each response using the specified ``link_extractor``.
|
||||
This is mainly used for filtering purposes.
|
||||
|
||||
``process_request`` is a callable, or a string (in which case a method from
|
||||
the spider object with that name will be used) which will be called with
|
||||
every request extracted by this rule, and must return a request or None (to
|
||||
filter out the request).
|
||||
``process_request`` is a callable (or a string, in which case a method from
|
||||
the spider object with that name will be used) which will be called for
|
||||
every request extracted by this rule. This callable should take a Request object
|
||||
as first positional argument and, optionally, the Response object from which the
|
||||
Request originated as second positional argument. It must return a request or None
|
||||
(to filter out the request).
|
||||
|
||||
CrawlSpider example
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
|||
Loading…
Reference in New Issue