Scrapy, a fast high-level web crawling & scraping framework for Python.
removed templates from googledir example (to keep it DRY) as they made no sense there
Pablo Hoffman4a2bca83cebd
diff --git a/scrapy/trunk/examples/googledir/googledir/templates/spider_basic.tmpl b/scrapy/trunk/examples/googledir/googledir/templates/spider_basic.tmpldeleted file mode 100644index 75f2478d5..000000000--- a/scrapy/trunk/examples/googledir/googledir/templates/spider_basic.tmpl+++ /dev/null@@ -1,13 +0,0 @@-from scrapy.spider import BaseSpider--class $classname(BaseSpider):- domain_name = "$site"- start_urls = (- 'http://www.$site/',- )-- def parse(self, response):- return ()--SPIDER = $classname()-diff --git a/scrapy/trunk/examples/googledir/googledir/templates/spider_crawl.tmpl b/scrapy/trunk/examples/googledir/googledir/templates/spider_crawl.tmpldeleted file mode 100644index 9f777b231..000000000--- a/scrapy/trunk/examples/googledir/googledir/templates/spider_crawl.tmpl+++ /dev/null@@ -1,25 +0,0 @@-# -*- coding: utf8 -*--import re--from scrapy.xpath import HtmlXPathSelector-from scrapy.link.extractors import RegexLinkExtractor-from scrapy.contrib.spiders import CrawlSpider, Rule-from $project_name.items import ${ProjectName}Item--class $classname(CrawlSpider):- domain_name = '$site'- start_urls = ['http://www.$site/']-- rules = (- Rule(RegexLinkExtractor(allow=(r'Items/', )), 'parse_item', follow=True),- )-- 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"]'))- return [i]--SPIDER = $classname()diff --git a/scrapy/trunk/examples/googledir/googledir/templates/spider_csvfeed.tmpl b/scrapy/trunk/examples/googledir/googledir/templates/spider_csvfeed.tmpldeleted file mode 100644index 2d6ec5991..000000000--- a/scrapy/trunk/examples/googledir/googledir/templates/spider_csvfeed.tmpl+++ /dev/null@@ -1,22 +0,0 @@-# -*- coding: utf8 -*--from scrapy.contrib.spiders import CSVFeedSpider-from $project_name.items import ${ProjectName}Item--class $classname(CSVFeedSpider):- domain_name = '$site'- start_urls = ['http://www.$site/feed.csv']- # headers = ['id', 'name', 'description', 'image_link']- # delimiter = '\t'-- # Do any adaptations you need here- #def adapt_response(self, response):- # return response-- def parse_row(self, response, row):- i = ${ProjectName}Item()- #i.attribute('url', row['url'])- #i.attribute('name', row['name'])- #i.attribute('description', row['description'])- return i--SPIDER = $classname()diff --git a/scrapy/trunk/examples/googledir/googledir/templates/spider_xmlfeed.tmpl b/scrapy/trunk/examples/googledir/googledir/templates/spider_xmlfeed.tmpldeleted file mode 100644index 395204cf5..000000000--- a/scrapy/trunk/examples/googledir/googledir/templates/spider_xmlfeed.tmpl+++ /dev/null@@ -1,16 +0,0 @@-# -*- coding: utf8 -*--from scrapy.contrib.spiders import XMLFeedSpider-from $project_name.items import ${ProjectName}Item--class $classname(XMLFeedSpider):- domain_name = '$site'- start_urls = ['http://www.$site/feed.xml']-- def parse_item(self, response, xSel):- i = ${ProjectName}Item()- #i.attribute('url', xSel('url'))- #i.attribute('name', xSel('name'))- #i.attribute('description', xSel('description'))- return i--SPIDER = $classname()