From 3fb945be7b0a3ed42058b21bdec79daa4a3a13f4 Mon Sep 17 00:00:00 2001 From: Ismael Carnales Date: Fri, 6 Feb 2009 20:02:13 +0000 Subject: [PATCH] fixed doc on BaseSpider --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40830 --- scrapy/trunk/scrapy/spider/models.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scrapy/trunk/scrapy/spider/models.py b/scrapy/trunk/scrapy/spider/models.py index b53761623..b6bd11af8 100644 --- a/scrapy/trunk/scrapy/spider/models.py +++ b/scrapy/trunk/scrapy/spider/models.py @@ -50,7 +50,6 @@ class ISpider(Interface, IPlugin) : class BaseSpider(object): """Base class for scrapy spiders. All spiders must inherit from this class. - """ implements(ISpider) @@ -68,14 +67,16 @@ class BaseSpider(object): def start_requests(self, urls=None): """Return the requests to crawl when this spider is opened for scraping. urls contain the urls passed from command line (if any), - otherwise None if the enrie domain was requested for scraping. + otherwise None if the entire domain was requested for scraping. This function must return a list of Requests to be crawled, based on the given urls. The Requests must include a callback function which must return a list of: - * Request's for further crawling - * ScrapedItem's for processing - * Both + + * Request's for further crawling + * ScrapedItem's for processing + * Both + Or None (which will be treated the same way as an empty list) When a Request object is returned, the Request is scheduled, then