mirror of https://github.com/scrapy/scrapy.git
AutoThrottle: respect download_delay=0 spider attribute
This commit is contained in:
parent
17cb51315b
commit
1fef9f1132
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in New Issue