'Lazy-load the downloadhandler for a scheme
only on the first request for that scheme.'

def _get_handler(self, scheme):

    if (scheme in self._handlers):
        return self._handlers[scheme]
    if (scheme in self._notconfigured):
        return None
    if (scheme not in self._schemes):
        self._notconfigured[scheme] = 'no    handler    available    for    that    scheme'
        return None
    path = self._schemes[scheme]
    try:
        dhcls = load_object(path)
        dh = dhcls(self._crawler.settings)
    except NotConfigured as ex:
        self._notconfigured[scheme] = str(ex)
        return None
    except Exception as ex:
        logger.error('Loading    "%(clspath)s"    for    scheme    "%(scheme)s"', {'clspath': path, 'scheme': scheme}, exc_info=True, extra={'crawler': self._crawler})
        self._notconfigured[scheme] = str(ex)
        return None
    else:
        self._handlers[scheme] = dh
    return self._handlers[scheme]
