mirror of https://github.com/scrapy/scrapy.git
Alow to disable a downloader handler just like any other component.
This commit is contained in:
parent
f921d2aff1
commit
a1df15b9ce
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue