Changeset 1848:8a8cce84d4c2

Show
Ignore:
Timestamp:
11/13/09 20:04:39 (10 months ago)
Author:
Pablo Hoffman <pablo@…>
Parents:
1847:090ae224595c (diff), 1846:bbd7752e74f9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Branch:
default
Message:

Automated merge with http://hg.scrapy.org/scrapy-stable/

Files:
4 removed
2 modified

Legend:

Unmodified
Added
Removed
  • docs/topics/signals.rst

    r1822 r1848  
    166166 
    167167.. signal:: request_received 
    168 .. function:: request_received(request, spider, response) 
     168.. function:: request_received(request, spider) 
    169169 
    170170    Sent when the engine receives a :class:`~scrapy.http.Request` from a spider. 
     
    176176    :type spider: :class:`~scrapy.spider.BaseSpider` object 
    177177 
    178     :param response: the :class:`~scrapy.http.Response` fed to the spider which 
    179         generated the request later 
    180     :type response: :class:`~scrapy.http.Response` object 
    181  
    182178request_uploaded 
    183179---------------- 
  • docs/topics/signals.rst

    r1847 r1848  
    3030order. 
    3131 
    32 domain_closed 
     32spider_closed 
    3333------------- 
    3434 
    35 .. signal:: domain_closed 
    36 .. function:: domain_closed(domain, spider, reason) 
    37  
    38     Sent after a spider/domain has been closed. This can be used to release 
    39     per-spider resources reserved on :signal:`domain_opened`. 
    40  
    41     :param domain: a string which contains the domain of the spider which has 
    42         been closed 
    43     :type domain: str 
     35.. signal:: spider_closed 
     36.. function:: spider_closed(spider, reason) 
     37 
     38    Sent after a spider has been closed. This can be used to release per-spider 
     39    resources reserved on :signal:`spider_opened`. 
    4440 
    4541    :param spider: the spider which has been closed 
    4642    :type spider: :class:`~scrapy.spider.BaseSpider` object 
    4743 
    48     :param reason: a string which describes the reason why the domain was closed. If 
    49         it was closed because the domain has completed scraping, it the reason 
    50         is ``'finished'``. Otherwise, if the domain was manually closed by 
    51         calling the ``close_domain`` engine method, then the reason is the one 
     44    :param reason: a string which describes the reason why the spider was closed. If 
     45        it was closed because the spider has completed scraping, it the reason 
     46        is ``'finished'``. Otherwise, if the spider was manually closed by 
     47        calling the ``close_spider`` engine method, then the reason is the one 
    5248        passed in the ``reason`` argument of that method (which defaults to 
    5349        ``'cancelled'``). If the engine was shutdown (for example, by hitting 
     
    5551    :type reason: str 
    5652 
    57 domain_opened 
     53spider_opened 
    5854------------- 
    5955 
    60 .. signal:: domain_opened 
    61 .. function:: domain_opened(domain, spider) 
    62  
    63     Sent after a spider/domain has been opened for crawling. This is typically 
    64     used to reserve per-spider resources, but can be used for any task that 
    65     needs to be performed when a spider/domain is opened. 
    66  
    67     :param domain: a string with the domain of the spider which has been opened 
    68     :type domain: str 
     56.. signal:: spider_opened 
     57.. function:: spider_opened(spider) 
     58 
     59    Sent after a spider has been opened for crawling. This is typically used to 
     60    reserve per-spider resources, but can be used for any task that needs to be 
     61    performed when a spider is opened. 
    6962 
    7063    :param spider: the spider which has been opened 
    7164    :type spider: :class:`~scrapy.spider.BaseSpider` object 
    7265 
    73 domain_idle 
     66spider_idle 
    7467----------- 
    7568 
    76 .. signal:: domain_idle 
    77 .. function:: domain_idle(domain, spider) 
    78  
    79     Sent when a domain has gone idle, which means the spider has no further: 
     69.. signal:: spider_idle 
     70.. function:: spider_idle(spider) 
     71 
     72    Sent when a spider has gone idle, which means the spider has no further: 
    8073 
    8174        * requests waiting to be downloaded 
     
    8477 
    8578    If the idle state persists after all handlers of this signal have finished, 
    86     the engine starts closing the domain. After the domain has finished 
    87     closing, the :signal:`domain_closed` signal is sent. 
    88  
    89     You can, for example, schedule some requests in your :signal:`domain_idle` 
    90     handler to prevent the domain from being closed. 
    91  
    92     :param domain: is a string with the domain of the spider which has gone idle 
    93     :type domain: str 
     79    the engine starts closing the spider. After the spider has finished 
     80    closing, the :signal:`spider_closed` signal is sent. 
     81 
     82    You can, for example, schedule some requests in your :signal:`spider_idle` 
     83    handler to prevent the spider from being closed. 
    9484 
    9585    :param spider: the spider which has gone idle