Skip to content

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

adapted project template to use the new Link Extractors location

Pablo Hoffman75cf903e24ab
diff --git a/scrapy/templates/project/module/templates/spider_crawl.tmpl b/scrapy/templates/project/module/templates/spider_crawl.tmpl
index 7db48095a..e20384406 100644
--- a/scrapy/templates/project/module/templates/spider_crawl.tmpl
+++ b/scrapy/templates/project/module/templates/spider_crawl.tmpl
@@ -2,7 +2,7 @@
import re
from scrapy.xpath import HtmlXPathSelector
-from scrapy.link.extractors import RegexLinkExtractor
+from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.contrib.spiders import CrawlSpider, Rule
from $project_name.items import ${ProjectName}Item
@@ -11,7 +11,7 @@ class $classname(CrawlSpider):
start_urls = ['http://www.$site/']
rules = (
- Rule(RegexLinkExtractor(allow=(r'Items/', )), 'parse_item', follow=True),
+ Rule(SgmlLinkExtractor(allow=(r'Items/', )), 'parse_item', follow=True),
)
def parse_item(self, response):