scrapinghub/scrapylib — pull request #43 by chekunkov (2014-07-04 12:35:21+00:00)
Title: Handle Crawlera deploy

In this PR I've changed 2 things:

- If middleware detects Crawlera deploy (ConnectionRefusedError) - it adjusts slot download delay until spider gets response from Crawlera.
- Previously original slot delay was never restored - it was set to `0` after a successful response. Now original delay is saved and restored each time spider gets response from Crawlera.