From 1fef9f113237630664ef05645127ca50662d71b6 Mon Sep 17 00:00:00 2001 From: Mikhail Korobov Date: Fri, 26 Jun 2015 19:09:26 +0500 Subject: [PATCH] AutoThrottle: respect download_delay=0 spider attribute --- scrapy/extensions/throttle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/extensions/throttle.py b/scrapy/extensions/throttle.py index 46273353b..d2ff8665e 100644 --- a/scrapy/extensions/throttle.py +++ b/scrapy/extensions/throttle.py @@ -28,7 +28,7 @@ class AutoThrottle(object): def _min_delay(self, spider): s = self.crawler.settings - return getattr(spider, 'download_delay', 0.0) or s.getfloat('DOWNLOAD_DELAY') + return getattr(spider, 'download_delay', s.getfloat('DOWNLOAD_DELAY')) def _max_delay(self, spider): return self.crawler.settings.getfloat('AUTOTHROTTLE_MAX_DELAY')