Exemplo n.º 1
0
def resolve_url(url):
    parsed = urlparse(url)

    if len(parsed.scheme) == 0:
        url = "http://" + url

    for name, plugin in plugins.get_plugins().items():
        if plugin.can_handle_url(url):
            obj = plugin(url)
            return obj
    return None
Exemplo n.º 2
0
def get_plugins():
    return plugins.get_plugins()
Exemplo n.º 3
0
def resolve_url(url):
    for name, plugin in plugins.get_plugins().items():
        if plugin.can_handle_url(url):
            return (name, plugin)
    return None