1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-26 12:03:40 +00:00

adapted project template to use the new Link Extractors location

This commit is contained in:
Pablo Hoffman 2009-07-28 12:27:25 -03:00
parent 64d9155572
commit 75cf903e24

View File

@ -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):