Scrapy, a fast high-level web crawling & scraping framework for Python.
added setting: AUTOTHROTTLE_ENABLED
Pablo Hoffmandcc28b71868e
diff --git a/scrapy/contrib/throttle.py b/scrapy/contrib/throttle.pyindex a66d86f25..3782efc29 100644--- a/scrapy/contrib/throttle.py+++ b/scrapy/contrib/throttle.py@@ -1,5 +1,7 @@from scrapy.xlib.pydispatch import dispatcherfrom scrapy.utils.python import setattr_default+from scrapy.conf import settings+from scrapy.exceptions import NotConfiguredfrom scrapy import signalsclass AutoThrottle(object):@@ -64,6 +66,8 @@ class AutoThrottle(object):DEBUG = 0def __init__(self):+ if not settings.getbool('AUTOTHROTTLE_ENABLED', True):+ raise NotConfigureddispatcher.connect(self.spider_opened, signal=signals.spider_opened)dispatcher.connect(self.spider_closed, signal=signals.spider_closed)dispatcher.connect(self.response_received, signal=signals.response_received)