mirror of https://github.com/scrapy/scrapy.git
updated select() method in crawl spider template
This commit is contained in:
parent
9ae3a1946d
commit
16c51353f2
|
|
@ -17,9 +17,9 @@ class $classname(CrawlSpider):
|
|||
def parse_item(self, response):
|
||||
i = ${ProjectName}Item()
|
||||
#xs = HtmlXPathSelector(response)
|
||||
#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()
|
||||
#i.site_id = xs.select('//input[@id="sid"]/@value').extract()
|
||||
#i.name = xs.select('//div[@id="name"]').extract()
|
||||
#i.description = xs.select('//div[@id="description"]').extract()
|
||||
return [i]
|
||||
|
||||
SPIDER = $classname()
|
||||
|
|
|
|||
Loading…
Reference in New Issue