mirror of https://github.com/scrapy/scrapy.git
removed old .attribute() api from project spider templates until adaptors are stable
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%401046
This commit is contained in:
parent
4a2bca83ce
commit
eb0826e813
|
|
@ -17,9 +17,9 @@ class $classname(CrawlSpider):
|
|||
def parse_item(self, response):
|
||||
i = ${ProjectName}Item()
|
||||
#xs = HtmlXPathSelector(response)
|
||||
#i.attribute('site_id', xs.x('//input[@id="sid"]/@value'))
|
||||
#i.attribute('name', xs.x('//div[@id="name"]'))
|
||||
#i.attribute('description', xs.x('//div[@id="description"]'))
|
||||
#i.site_id = xs.x('//input[@id="sid"]/@value').extract()
|
||||
#i.name = xs.x('//div[@id="name"]').extract()
|
||||
#i.description = xs.x('//div[@id="description"]').extract()
|
||||
return [i]
|
||||
|
||||
SPIDER = $classname()
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ class $classname(CSVFeedSpider):
|
|||
|
||||
def parse_row(self, response, row):
|
||||
i = ${ProjectName}Item()
|
||||
#i.attribute('url', row['url'])
|
||||
#i.attribute('name', row['name'])
|
||||
#i.attribute('description', row['description'])
|
||||
#i.url = row['url']
|
||||
#i.name = row['name']
|
||||
#i.description = row['description']
|
||||
return i
|
||||
|
||||
SPIDER = $classname()
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ class $classname(XMLFeedSpider):
|
|||
|
||||
def parse_item(self, response, xSel):
|
||||
i = ${ProjectName}Item()
|
||||
#i.attribute('url', xSel('url'))
|
||||
#i.attribute('name', xSel('name'))
|
||||
#i.attribute('description', xSel('description'))
|
||||
#i.url = xSel('url'.extract()
|
||||
#i.name = xSel('name').extract()
|
||||
#i.description = xSel('description').extract()
|
||||
return i
|
||||
|
||||
SPIDER = $classname()
|
||||
|
|
|
|||
Loading…
Reference in New Issue