Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

updated select() method in crawl spider template

Pablo Hoffman16c51353f2d0
diff --git a/scrapy/templates/project/module/templates/spider_crawl.tmpl b/scrapy/templates/project/module/templates/spider_crawl.tmpl
index e20384406..6186714bf 100644
--- a/scrapy/templates/project/module/templates/spider_crawl.tmpl
+++ b/scrapy/templates/project/module/templates/spider_crawl.tmpl
@@ -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()