From 0c5f605b0e3c68c4d4cfc419af453ac04eaaa141 Mon Sep 17 00:00:00 2001 From: LucianU Date: Tue, 11 Jan 2011 17:23:46 -0200 Subject: [PATCH] The xmlfeed.tmpl file didn't use the naming convention specific of the XMLFeedSpider. Namely, it used parse_item (which has been deprecated) instead of parse_node and it didn't show the iterator and itertag attributes. --- scrapy/templates/spiders/xmlfeed.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scrapy/templates/spiders/xmlfeed.tmpl b/scrapy/templates/spiders/xmlfeed.tmpl index 5e16d2325..915affee5 100644 --- a/scrapy/templates/spiders/xmlfeed.tmpl +++ b/scrapy/templates/spiders/xmlfeed.tmpl @@ -5,8 +5,10 @@ class $classname(XMLFeedSpider): name = '$name' allowed_domains = ['$domain'] start_urls = ['http://www.$domain/feed.xml'] + iterator = 'iternodes' # you can change this; see the docs + itertag = 'item' # change it accordingly - def parse_item(self, response, selector): + def parse_node(self, response, selector): i = ${ProjectName}Item() #i['url'] = selector.select('url').extract() #i['name'] = selector.select('name').extract()