# Path: kibitzr/fetcher/loader.py
# def load_promoters():
#     """Return list of available promoters"""
#     builtins = [
#         RequestsPromoter,
#         FirefoxPromoter,
#         ScriptPromoter,
#     ]
#     return builtins + load_extensions()


from kibitzr.exceptions import ConfigurationError
from .loader import load_promoters
"""
Kibitzr supports a number of fetchers and the list can be extended by plugins.

In the nutshell each fetcher takes conf and returns a tuple: ok, content.
where ok is boolean meaning success, and content is a Unicode string with fetch result.

Each fetcher has a promoter.
Promoter knows if the fetcher is applicable for given conf and
sets a priority for conflict resolution.

Promoter instance is initialized with conf and delegates calls to fetcher.
"""




PROMOTERS = None


def fetcher_factory(conf):
    """Return initialized fetcher capable of processing given conf."""
    global PROMOTERS
    applicable = []
    if not PROMOTERS:

# Path: kibitzr/fetcher/loader.py
# def load_promoters():
#     """Return list of available promoters"""
#     builtins = [
#         RequestsPromoter,
#         FirefoxPromoter,
#         ScriptPromoter,
#     ]
#     return builtins + load_extensions()


# Path: kibitzr/fetcher/factory.py
from kibitzr.exceptions import ConfigurationError
from .loader import load_promoters

"""
Kibitzr supports a number of fetchers and the list can be extended by plugins.

In the nutshell each fetcher takes conf and returns a tuple: ok, content.
where ok is boolean meaning success, and content is a Unicode string with fetch result.

Each fetcher has a promoter.
Promoter knows if the fetcher is applicable for given conf and
sets a priority for conflict resolution.

Promoter instance is initialized with conf and delegates calls to fetcher.
"""




PROMOTERS = None


def fetcher_factory(conf):
    """Return initialized fetcher capable of processing given conf."""
    global PROMOTERS
    applicable = []
    if not PROMOTERS:

        PROMOTERS = load_promoters()