allow to set download delay as a scrapy setting

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40255
This commit is contained in:
olveyra 2008-09-18 20:11:30 +00:00
parent cfb56e39bb
commit 6ce7ae4df8
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ class Downloader(object):
return
# Instanciate site specific handling based on info provided by spider
delay = getattr(spider, 'download_delay', None)
delay = settings.getint('DOWNLOAD_DELAY', None) or getattr(spider, 'download_delay', None)
maxcr = getattr(spider, 'max_concurrent_requests', settings.getint('REQUESTS_PER_DOMAIN'))
site = SiteDetails(download_delay=delay, max_concurrent_requests=maxcr)
self.sites[domain] = site