diff --git a/scrapy/trunk/scrapy/contrib/spiders/crawl.py b/scrapy/trunk/scrapy/contrib/spiders/crawl.py index 4056929f2..ff28a4dcf 100644 --- a/scrapy/trunk/scrapy/contrib/spiders/crawl.py +++ b/scrapy/trunk/scrapy/contrib/spiders/crawl.py @@ -67,7 +67,7 @@ class CrawlSpider(BaseSpider): return a list of ScrapedItems and/or Requests""" return [] - def process_spider_output(self, response, results): + def process_results(self, response, results): """This overridable method is called for each result (item or request) returned by the spider, and it's intended to perform any last time processing required before returning the results to the framework core, @@ -107,7 +107,7 @@ class CrawlSpider(BaseSpider): res.extend(self._requests_to_follow(response)) if callback: cb_res = callback(response, **cb_kwargs) or () - cb_res = self.process_spider_output(response, cb_res) + cb_res = self.process_results(response, cb_res) res.extend(cb_res) return res diff --git a/scrapy/trunk/scrapy/contrib/spiders/feed.py b/scrapy/trunk/scrapy/contrib/spiders/feed.py index f59167ed4..9829d3a3f 100644 --- a/scrapy/trunk/scrapy/contrib/spiders/feed.py +++ b/scrapy/trunk/scrapy/contrib/spiders/feed.py @@ -19,7 +19,7 @@ class XMLFeedSpider(BaseSpider): iterator = 'iternodes' itertag = 'item' - def process_spider_output(self, response, results): + def process_results(self, response, results): """This overridable method is called for each result (item or request) returned by the spider, and it's intended to perform any last time processing required before returning the results to the framework core, @@ -40,7 +40,7 @@ class XMLFeedSpider(BaseSpider): ret = [ret] if not isinstance(ret, (list, tuple)): raise UsageError('You cannot return an "%s" object from a spider' % type(ret).__name__) - for result_item in self.process_spider_output(response, ret): + for result_item in self.process_results(response, ret): yield result_item def parse(self, response): @@ -71,7 +71,7 @@ class CSVFeedSpider(BaseSpider): delimiter = None # When this is None, python's csv module's default delimiter is used headers = None - def process_spider_output(self, response, results): + def process_results(self, response, results): """This method has the same purpose as the one in XMLFeedSpider""" return results @@ -86,7 +86,7 @@ class CSVFeedSpider(BaseSpider): ret = [ret] if not isinstance(ret, (list, tuple)): raise UsageError('You cannot return an "%s" object from a spider' % type(ret).__name__) - for result_item in self.process_spider_output(response, ret): + for result_item in self.process_results(response, ret): yield result_item def parse(self, response):