From 77a917df6ba9a5490f5a3bff8fb048c9ef2d2148 Mon Sep 17 00:00:00 2001 From: elpolilla Date: Thu, 20 Nov 2008 13:10:06 +0000 Subject: [PATCH] Modified FOLLOW_LINKS setting name to a more appropiate one --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40389 --- scrapy/trunk/scrapy/command/commands/crawl.py | 2 +- scrapy/trunk/scrapy/contrib/spiders.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scrapy/trunk/scrapy/command/commands/crawl.py b/scrapy/trunk/scrapy/command/commands/crawl.py index 1292ac9c6..9d42e15ac 100644 --- a/scrapy/trunk/scrapy/command/commands/crawl.py +++ b/scrapy/trunk/scrapy/command/commands/crawl.py @@ -32,7 +32,7 @@ class Command(ScrapyCommand): settings.overrides['RESTRICT_TO_URLS'] = args if opts.nofollow: - settings.overrides['FOLLOW_LINKS'] = False + settings.overrides['CRAWLSPIDER_FOLLOW_LINKS'] = False if opts.record or opts.recorddir: # self.replay is used for preventing Replay signals handler from diff --git a/scrapy/trunk/scrapy/contrib/spiders.py b/scrapy/trunk/scrapy/contrib/spiders.py index 98e589585..30f5bce83 100644 --- a/scrapy/trunk/scrapy/contrib/spiders.py +++ b/scrapy/trunk/scrapy/contrib/spiders.py @@ -58,7 +58,7 @@ class CrawlSpider(BaseSpider): def _parse_wrapper(self, response, callback): res = [] - if settings.getbool('FOLLOW_LINKS', True): + if settings.getbool('CRAWLSPIDER_FOLLOW_LINKS', True): res.extend(self._links_to_follow(response)) res.extend(callback(response) if callback else ()) for entry in res: @@ -75,7 +75,7 @@ class CrawlSpider(BaseSpider): ret = [] for name in extractor_names: extractor = getattr(self, name) - if settings.getbool('FOLLOW_LINKS', True): + if settings.getbool('CRAWLSPIDER_FOLLOW_LINKS', True): ret.extend(self._links_to_follow(response)) callback_name = 'parse_%s' % name[6:] if hasattr(self, callback_name):