Skip to content

Commit 0c5f605

Browse files
author
LucianU
committed
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.
1 parent 7dc521c commit 0c5f605

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scrapy/templates/spiders/xmlfeed.tmpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ class $classname(XMLFeedSpider):
55
name = '$name'
66
allowed_domains = ['$domain']
77
start_urls = ['http://www.$domain/feed.xml']
8+
iterator = 'iternodes' # you can change this; see the docs
9+
itertag = 'item' # change it accordingly
810

9-
def parse_item(self, response, selector):
11+
def parse_node(self, response, selector):
1012
i = ${ProjectName}Item()
1113
#i['url'] = selector.select('url').extract()
1214
#i['name'] = selector.select('name').extract()

0 commit comments

Comments
 (0)