Esempio n. 1
0
def resolve_it(url, title='Video', icon='x'):
    if '.m3u8' in url or 'rtmp:' in url or '.flv' in url or '.mp4' in url or '.ts' in url or url.startswith(
            'plugin://'):
        if '.m3u8' in url and '|' not in url:
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent()})
        if '.ts' in url:
            url = 'plugin://plugin.video.f4mTester/?name=%s&iconImage=%s&streamtype=TSDOWNLOADER&url=' % (
                urllib.quote(title), urllib.quote(icon)) + urllib.quote(url)
        return url

    if '.f4m' in url:
        from resolvers import f4m
        resolved = f4m.resolve(url)
        return resolved

    if url.startswith('acestream://') or url.startswith(
            'sop://') or '.acelive' in url:
        from resolvers import sop_ace
        resolved = sop_ace.resolve(url, title)
        return resolved
    netloc = prepare(urlparse.urlparse(url).netloc)
    if netloc in resolver_dict.keys():
        resolver = resolver_dict[netloc]
        log("Calling resolver: " + resolver)
        exec "from resolvers import %s" % resolver
        resolved = eval(resolver + ".resolve(url)")
        return resolved

    else:
        return
Esempio n. 2
0
def resolve_it(url, title='Video'):
    if '.m3u8' in url or 'rtmp:' in url or '.flv' in url or '.mp4' in url or '.ts' in url or url.startswith('plugin://'):
        if '.m3u8' in url and '|' not in url:
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent()})
        return url

    if '.f4m' in url:
        from resolvers import f4m
        resolved = f4m.resolve(url)
        return resolved

    if url.startswith('acestream://') or url.startswith('sop://') or '.acelive' in url:
        from resolvers import sop_ace
        resolved = sop_ace.resolve(url, title)
        return resolved
    netloc = prepare(urlparse.urlparse(url).netloc)
    if netloc in resolver_dict.keys():
        resolver = resolver_dict[netloc]
        log("Calling resolver: " + resolver)
        exec "from resolvers import %s"%resolver
        resolved = eval(resolver+".resolve(url)")
        return resolved

    else:
       return 
Esempio n. 3
0
def resolve_it(url):
    if '.m3u8' in url or 'rtmp:' in url or '.flv' in url or '.mp4' in url or '.ts' in url or url.startswith(
            'plugin://'):
        if '.m3u8' in url and '|' not in url:
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent()})
        return url

    if '.f4m' in url:
        from resolvers import f4m
        resolved = f4m.resolve(url)
        return resolved

    if url.startswith('acestream://') or url.startswith(
            'sop://') or '.acelive' in url:
        from resolvers import sop_ace
        resolved = sop_ace.resolve(url, 'Video')
        return resolved
    netloc = prepare(urlparse.urlparse(url).netloc)
    if netloc in resolver_dict.keys():
        resolver = resolver_dict[netloc]
        log("Calling resolver: " + resolver)
        exec "from resolvers import %s" % resolver
        resolved = eval(resolver + ".resolve(url)")
        return resolved

    else:
        return
Esempio n. 4
0
def resolve_it(url, title='Video',icon='x'):
    if '.m3u8' in url or 'rtmp:' in url or '.flv' in url or '.mp4' in url or '.ts' in url or url.startswith('plugin://'):
        if '.m3u8' in url and '|' not in url:
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent()})
        if '.ts' in url:
            url = 'plugin://plugin.video.f4mTester/?name=%s&iconImage=%s&streamtype=TSDOWNLOADER&url='%(urllib.quote(title),urllib.quote(icon)) + urllib.quote(url)
        return url

    if '.f4m' in url:
        from resolvers import f4m
        resolved = f4m.resolve(url)
        return resolved

    if url.startswith('acestream://') or url.startswith('sop://') or '.acelive' in url:
        from resolvers import sop_ace
        resolved = sop_ace.resolve(url, title)
        return resolved
    netloc = prepare(urlparse.urlparse(url).netloc)
    if netloc in resolver_dict.keys():
        resolver = resolver_dict[netloc]
        log("Calling resolver: " + resolver)
        exec "from resolvers import %s"%resolver
        resolved = eval(resolver+".resolve(url)")
        return resolved

    else:
       return