mirror of https://github.com/scrapy/scrapy.git
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.
This commit is contained in:
parent
7dc521c56e
commit
0c5f605b0e
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue