From a1df15b9cea35c3a215778e57d199977fe3da59a Mon Sep 17 00:00:00 2001 From: Rolando Espinoza La fuente Date: Wed, 6 Nov 2013 21:21:35 -0400 Subject: [PATCH] Alow to disable a downloader handler just like any other component. --- scrapy/core/downloader/handlers/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scrapy/core/downloader/handlers/__init__.py b/scrapy/core/downloader/handlers/__init__.py index b743220c9..fba64fd71 100644 --- a/scrapy/core/downloader/handlers/__init__.py +++ b/scrapy/core/downloader/handlers/__init__.py @@ -15,6 +15,10 @@ class DownloadHandlers(object): handlers = crawler.settings.get('DOWNLOAD_HANDLERS_BASE') handlers.update(crawler.settings.get('DOWNLOAD_HANDLERS', {})) for scheme, clspath in handlers.iteritems(): + # Allow to disable a handler just like any other + # component (extension, middlware, etc). + if clspath is None: + continue cls = load_object(clspath) try: dh = cls(crawler.settings)