Modified FOLLOW_LINKS setting name to a more appropiate one

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40389
This commit is contained in:
elpolilla 2008-11-20 13:10:06 +00:00
parent 99c4c06380
commit 77a917df6b
2 changed files with 3 additions and 3 deletions

View File

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

View File

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