Skip to content

Commit 1fef9f1

Browse files
committed
AutoThrottle: respect download_delay=0 spider attribute
1 parent 17cb513 commit 1fef9f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scrapy/extensions/throttle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _spider_opened(self, spider):
2828

2929
def _min_delay(self, spider):
3030
s = self.crawler.settings
31-
return getattr(spider, 'download_delay', 0.0) or s.getfloat('DOWNLOAD_DELAY')
31+
return getattr(spider, 'download_delay', s.getfloat('DOWNLOAD_DELAY'))
3232

3333
def _max_delay(self, spider):
3434
return self.crawler.settings.getfloat('AUTOTHROTTLE_MAX_DELAY')

0 commit comments

Comments
 (0)