Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Fix autothrottle in order to modify also inactive downloader slots, so cases fixed by inactive slots patch will work ok also when using autothrottle

olveyrae6d7afa13b31
diff --git a/scrapy/contrib/throttle.py b/scrapy/contrib/throttle.py
index 423f3726c..ba462a55d 100644
--- a/scrapy/contrib/throttle.py
+++ b/scrapy/contrib/throttle.py
@@ -106,7 +106,7 @@ class AutoThrottle(object):
key = urlparse_cached(request).hostname or ''
if downloader.ip_concurrency:
key = dnscache.get(key, key)
- return key, downloader.slots.get(key)
+ return key, downloader.slots.get(key) or downloader.inactive_slots.get(key)
def _check_concurrency(self, slot, latency):
latencies = self.last_latencies