Created
May 8, 2015 11:36
-
-
Save autrilla/702542a0df529ab61ea2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scrapy | |
| from scrapy.contrib.spiders import CrawlSpider, Rule | |
| from scrapy.contrib.linkextractors import LinkExtractor | |
| class StoreSpider(CrawlSpider): | |
| name = 'store' | |
| allowed_domains =['tiendaganadera.com', 'tiendaagricola.com'] | |
| start_urls = ['http://tiendaganadera.com/home.php', | |
| 'http://tiendaagricola.com/home.php'] | |
| rules = ( | |
| Rule(LinkExtractor(allow=('tiendaganadera.com', 'tiendaagricola.com'),)), | |
| ) | |
| def parse(self, response): | |
| self.log('Parsing ' + response.url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment