当前位置: 首页>>代码示例>>Python>>正文


Python main.resolve_url函数代码示例

本文整理汇总了Python中resources.libs.main.resolve_url函数的典型用法代码示例。如果您正苦于以下问题:Python resolve_url函数的具体用法?Python resolve_url怎么用?Python resolve_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了resolve_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: LINK

def LINK(name,murl,thumb):
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
    main.GA("Yify","Watched")
    stream_url = False
    ok=True
    infoLabels =main.GETMETAT(name,'','',thumb)
    video_type='movie'
    season=''
    episode=''
    img=infoLabels['cover_url']
    fanart =infoLabels['backdrop_url']
    imdb_id=infoLabels['imdb_id']
    infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }  
    stream_url = main.resolve_url(murl)
    try:
        infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']}
        # play with bookmark
        from resources.universal import playbackengine
        if stream_url: main.CloseAllDialogs()
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory(addon_id)
            wh.add_item(name+' '+'[COLOR green]Yify[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=img, fanart='', is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
开发者ID:Ladeiras,项目名称:AutoUpdate,代码行数:31,代码来源:yify.py

示例2: LINKFX

def LINKFX(name,murl):
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
        main.GA("FXCine","Watched")
        stream_url = False
        ok=True
        infoLabels =main.GETMETAT(name,'','','')
        video_type='movie'
        season=''
        episode=''
        img=infoLabels['cover_url']
        fanart =infoLabels['backdrop_url']
        imdb_id=infoLabels['imdb_id']
        infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }  
        url=getlink(murl)
        stream_url = main.resolve_url(url)
        try:
                    listitem = xbmcgui.ListItem(thumbnailImage='')
                    listitem.setInfo('video', {'Title': name, 'Year': ''} )         
                
                    infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
                    # play with bookmark
                    player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
                    #WatchHistory
                    if selfAddon.getSetting("whistory") == "true":
                        wh.add_item(name+' '+'[COLOR green]FXCine[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img='', fanart='', is_folder=False)
                    player.KeepAlive()
                    return ok
        except Exception, e:
                    if stream_url != False:
                        main.ErrorReport(e)
                    return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:31,代码来源:fxcine.py

示例3: PLAYLINK

def PLAYLINK(mname,murl):
    name=main.removeColoredText(mname)
    murl = murl.lstrip('ice')
    murl = eval(urllib.unquote(murl))
    murl = resolveIceLink(murl)
    main.GA("IceFilms","Watched")
    ok=True
    infoLabels =main.GETMETAT(mname,'','','')
    video_type='movie'
    season=''
    episode=''
    img=infoLabels['cover_url']
    fanart =infoLabels['backdrop_url']
    imdb_id=infoLabels['imdb_id']
    infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
    try:
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = main.resolve_url(murl)
        infoL={'Title': name, 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
        # play with bookmark
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=name,season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory('plugin.video.movie25')
            wh.add_item(mname+' '+'[COLOR green]IceFilms[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
                main.ErrorReport(e)
        return ok
开发者ID:philtimmes,项目名称:addons,代码行数:33,代码来源:icefilms.py

示例4: PLAYMEDIA

def PLAYMEDIA(name,url):
    ok = True
    r = re.findall(r'(.+?)\[COLOR', name)
    name = r[0]
    r=re.findall('Season(.+?)Episode([^<]+)',name)
    if r:
        infoLabels =main.GETMETAEpiT(name,'','')
        video_type='episode'
        season=infoLabels['season']
        episode=infoLabels['episode']
    else:
        infoLabels =main.GETMETAT(name,'','','')
        video_type='movie'
        season=''
        episode=''
    img=infoLabels['cover_url']
    fanart =infoLabels['backdrop_url']
    imdb_id=infoLabels['imdb_id']
    infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
    try:
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = main.resolve_url(url)
        infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
        # play with bookmark
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory(addon_id)
            wh.add_item(name+' '+'[COLOR=FF67cc33]TvRelease[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=str(img), fanart=str(fanart), is_folder=False)
        player.KeepAlive()
        return ok
    except:
        return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:35,代码来源:tvrelease.py

示例5: LINK

def LINK(mname,murl,thumb,desc):
        link=main.OPENURL(murl)
        link=main.unescapes(link)
        ok=True
        try:
            match=re.compile('src="http://www.youtube.com/embed/(.+?).?autoplay=1&cc_load_policy=0.+?"').findall(link)
            if match:
                xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)")
                stream_url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid="+match[0]+"&hd=1"
            match2=re.compile('src="http://player.vimeo.com/video/(.+?)"').findall(link)
            if match2:
                xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                stream_url = main.resolve_url(str('http://vimeo.com/'+match2[0]))
                if(stream_url == False):
                    xbmc.executebuiltin("XBMC.Notification(Sorry!,Link Cannot Be Resolved,5000)")
                    return
            infoL={'Title': mname, 'Plot': desc}
            # play with bookmark
            player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='')
            #WatchHistory
            if selfAddon.getSetting("whistory") == "true":
                wh.add_item(mname+' '+'[COLOR green]Doc-Wire[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
            player.KeepAlive()
            return ok
        except Exception, e:
            if stream_url != False:
                    main.ErrorReport(e)
            else:
                    xbmc.executebuiltin("XBMC.Notification(Sorry!,Link deleted Or unplayable,5000)")
            return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:30,代码来源:documentarywire.py

示例6: LINKSCINEM

def LINKSCINEM(mname,murl,thumb,desc):   
    main.GA("MailRu","Watched")
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
    link=main.OPENURL(murl)
    ok=True
    match = re.compile('<iframe src="(.+?)"').findall(link)
    if match:
        stream_url = main.resolve_url(match[0])

    try:
        if stream_url == False: return                                                            
        infoL={'Title': mname, 'Plot': desc, 'Genre': '', 'originaltitle': mname}
        # play with bookmark
        stream_url=stream_url.replace(' ','%20')
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='')
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory(addon_id)
            #wh.add_item(mname+' '+'[COLOR green]MAILRU[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
        player.KeepAlive()
        return True
    except Exception, e:
        if stream_url != False: main.ErrorReport(e)
        return False
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:26,代码来源:cinemaxx.py

示例7: NovaWeed

def NovaWeed(murl):
        link=main.OPENURL(murl)
        link=main.unescapes(link)
        vw = re.compile('flashvars.advURL="(.+?)";').findall(link)
        vid_url=vw[0]
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
        return main.resolve_url(vid_url)
开发者ID:HIGHWAY99,项目名称:MashUp,代码行数:7,代码来源:animefreak.py

示例8: LINKVD

def LINKVD(name,murl,thumb):
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
        main.GA("Video Documentaire","Watched")
        stream_url = False
        ok=True
        link=main.OPENURL(murl)
        try:
            match=re.compile('''<iframe.+?src="(.+?)".+?</iframe>''',re.DOTALL).findall(link)[0]
            if 'http:' not in match:
                match='http:'+match
            stream_url = main.resolve_url(match.replace('?rel=0',''))
        except:xbmc.executebuiltin("XBMC.Notification(Sorry!,Link Removed or Dead,3000)")
        
        try:
                    listitem = xbmcgui.ListItem(thumbnailImage=thumb)
                    listitem.setInfo('video', {'Title': name, 'Year': ''} )         
                
                    infoL={'Title': name, 'Plot': '', 'Genre': ''}
                    # play with bookmark
                    player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=name,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='')
                    #WatchHistory
                    if selfAddon.getSetting("whistory") == "true":
                        wh.add_item(name+' '+'[COLOR green]Video Documentaire[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infoL, img=thumb, fanart='', is_folder=False)
                    player.KeepAlive()
                    return ok
        except Exception, e:
                    if stream_url != False:
                        main.ErrorReport(e)
                    return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:29,代码来源:videodocumentaire.py

示例9: LINKMOO

def LINKMOO(mname,murl,thumb):
        main.GA("Mooviemaniac","Watched")
        ok=True
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,5000)")
        infoLabels =main.GETMETAT(mname,'','','')
        video_type='movie'
        season=''
        episode=''
        img=infoLabels['cover_url']
        fanart =infoLabels['backdrop_url']
        imdb_id=infoLabels['imdb_id']
        infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
        try:
            stream_url = main.resolve_url(murl)
            if stream_url == False:
                  return                                                            
            infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']}
            # play with bookmark
            stream_url=stream_url.replace(' ','%20')
            from resources.universal import playbackengine
            player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
            #WatchHistory
            if selfAddon.getSetting("whistory") == "true":
                from resources.universal import  watchhistory
                wh = watchhistory.WatchHistory('plugin.video.movie25')
                wh.add_item(mname+' '+'[COLOR green]"Mooviemaniac"[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
            player.KeepAlive()
            return ok
        except Exception, e:
                if stream_url != False:
                        main.ErrorReport(e)
                return ok
开发者ID:philtimmes,项目名称:addons,代码行数:32,代码来源:mooviemaniac.py

示例10: LINKTV4B

def LINKTV4B(mname,murl):
        main.GA("RlsmixTV","Watched")
        ok=True
        infoLabels =main.GETMETAEpiT(mname,'','')
        video_type='episode'
        season=infoLabels['season']
        episode=infoLabels['episode']
        img=infoLabels['cover_url']
        fanart =infoLabels['backdrop_url']
        imdb_id=infoLabels['imdb_id']
        infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
        try:
                xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                stream_url = main.resolve_url(murl)
                
                infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
                # play with bookmark
                player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=str(season), episode=(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
                #WatchHistory
                if selfAddon.getSetting("whistory") == "true":
                    wh.add_item(mname+' '+'[COLOR green]Rlsmix[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
                player.KeepAlive()
                return ok
        except Exception, e:
                if stream_url != False:
                        main.ErrorReport(e)
                return ok
开发者ID:kubakul,项目名称:MashUp,代码行数:27,代码来源:rlsmix.py

示例11: LINKFX

def LINKFX(name, murl):
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
    main.GA("FXCine", "Watched")
    stream_url = False
    ok = True
    infoLabels = main.GETMETAT(name, "", "", "")
    video_type = "movie"
    season = ""
    episode = ""
    img = infoLabels["cover_url"]
    fanart = infoLabels["backdrop_url"]
    imdb_id = infoLabels["imdb_id"]
    infolabels = {
        "supports_meta": "true",
        "video_type": video_type,
        "name": str(infoLabels["title"]),
        "imdb_id": str(infoLabels["imdb_id"]),
        "season": str(season),
        "episode": str(episode),
        "year": str(infoLabels["year"]),
    }
    url = getlink(murl)
    stream_url = main.resolve_url(url)
    try:
        listitem = xbmcgui.ListItem(thumbnailImage="")
        listitem.setInfo("video", {"Title": name, "Year": ""})

        infoL = {"Title": infoLabels["title"], "Plot": infoLabels["plot"], "Genre": infoLabels["genre"]}
        # play with bookmark
        player = playbackengine.PlayWithoutQueueSupport(
            resolved_url=stream_url,
            addon_id=addon_id,
            video_type=video_type,
            title=infoLabels["title"],
            season=season,
            episode=episode,
            year=str(infoLabels["year"]),
            img=img,
            infolabels=infoL,
            watchedCallbackwithParams=main.WatchedCallbackwithParams,
            imdb_id=imdb_id,
        )
        # WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            wh.add_item(
                name + " " + "[COLOR green]FXCine[/COLOR]",
                sys.argv[0] + sys.argv[2],
                infolabels="",
                img="",
                fanart="",
                is_folder=False,
            )
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
开发者ID:philtimmes,项目名称:addons,代码行数:58,代码来源:fxcine.py

示例12: VIDEOLINKSSG

def VIDEOLINKSSG(mname,murl,thumb):
    #main.GA("SG","Watched")
    msg = xbmcgui.DialogProgress()
    msg.create('Please Wait!','')
    msg.update(0,'Collecting hosts')
    sources = []
    ok=True
    infoLabels =main.GETMETAEpiT(mname,thumb,'')
    video_type='episode'
    season=infoLabels['season']
    episode=infoLabels['episode']
    link=main.OPENURL(murl)
    img=infoLabels['cover_url']
    fanart =infoLabels['backdrop_url']
    imdb_id=infoLabels['imdb_id']
    infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('  ','')
    match=re.compile('href="([^"]+)"><img src=".+?" /><span class="link_name_tt">([^<]+)</span>').findall(link)
    hostsmax = len(match)
    h = 0
    import urlresolver
    for url, host in sorted(match):
            host=host.replace('Visit ','')
            h += 1
            percent = (h * 100)/hostsmax
            msg.update(percent,'Collecting hosts - ' + str(percent) + '%')
            if (msg.iscanceled()): break
            hosted_media = urlresolver.HostedMediaFile(url=url, title=host)
            sources.append(hosted_media)                
    if (len(sources)==0):
            xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)")
            return
    else:
            source = urlresolver.choose_source(sources)
    msg.close()
    try:
        if not source:
            main.CloseAllDialogs()
            return
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = main.resolve_url(source.get_url())
        if stream_url == False: return

        infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
        # play with bookmark
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
        #WatchHistory
        if selfAddon.getSetting("whistory") == "true":
            from resources.universal import watchhistory
            wh = watchhistory.WatchHistory('plugin.video.movie25')
            wh.add_item(mname+' '+'[COLOR green]SeriesGate[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
                main.ErrorReport(e)
        return ok
开发者ID:alejusar,项目名称:starthere,代码行数:58,代码来源:seriesgate.py

示例13: PLAYOCW

def PLAYOCW(mname,murl):
        sources=[]
        main.GA("OneclickwatchT","Watched")
        ok=True
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting Hosts,5000)")
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        match=re.compile('<p><a href=".+?" rel=".+?">(.+?)</a></p>').findall(link)
        desc=re.compile('<.+? />Plot:(.+?)<.+? />').findall(link)
        if len(desc)>0:
                descs=desc[0]
        else:
                descs=''
        thumb=re.compile('<img alt="" src="(.+?)"').findall(link)
        if len(thumb)>0:
                thumbs=thumb[0]
        else:
               thumbs=''
        main.CloseAllDialogs()
        import urlresolver 
        for url in match:
                host=re.compile("http://(.+?).com/.+?").findall(url)
                for hname in host:
                        host=hname.replace('www.','')
                hosted_media = urlresolver.HostedMediaFile(url=url, title=host)
                sources.append(hosted_media)
                        
        if (len(sources)==0):
                xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)")
        else:
                source = urlresolver.choose_source(sources)
        try:
                if source:
                        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                        stream_url = main.resolve_url(source.get_url())
                else:
                        stream_url = False
                        return
                infoLabels =main.GETMETAEpiT(mname,thumbs,descs)
                video_type='episode'
                season=infoLabels['season']
                episode=infoLabels['episode']
                img=infoLabels['cover_url']
                fanart =infoLabels['backdrop_url']
                imdb_id=infoLabels['imdb_id']
                infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
                infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
                # play with bookmark
                player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
                #WatchHistory
                if selfAddon.getSetting("whistory") == "true":
                        wh.add_item(mname+' '+'[COLOR green]Oneclickwatch[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
                player.KeepAlive()
                return ok
        except:
                return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:58,代码来源:oneclickwatch.py

示例14: LINKWATCHS

def LINKWATCHS(mname,murl):
        main.GA("Watchseries","Watched")
        ok=True
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        match=re.compile('(.+?)xocx(.+?)xocx').findall(murl)
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Checking Link,3000)")
        for hurl, durl in match:
                furl=geturl('http://watchseries.lt'+hurl)
        link=main.OPENURL(durl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        match2=re.compile('<h1 class=".+?"><a href=".+?">.+?</a> - <a href="(.+?)" title=".+?">.+?</a>').findall(link)
        for xurl in match2:
                link2=main.OPENURL('http://watchseries.lt'+xurl)
                link2=link2.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        descr=re.compile('<b>Description :</b>(.+?)<').findall(link2)
        if len(descr)>0:
                desc=descr[0]
        else:
                desc=''
        thumbs=re.compile('<td style=".+?"><a href=".+?"><img src="(.+?)"').findall(link2)
        if len(thumbs)>0:
                thumb=thumbs[0]
        else:
                thumb=''
        genres=re.compile('<b>Genre: <a href=.+?>(.+?)</a>').findall(link2)
        if len(genres)>0:
                genre=genres[0]
        else:
                genre=''
        infoLabels =main.GETMETAEpiT(mname,thumb,desc)
        video_type='episode'
        season=infoLabels['season']
        episode=infoLabels['episode']
        img=infoLabels['cover_url']
        fanart =infoLabels['backdrop_url']
        imdb_id=infoLabels['imdb_id']
        infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
        try:
                xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                stream_url = main.resolve_url(furl)

                infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
                # play with bookmark
                from resources.universal import playbackengine
                player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
                #WatchHistory
                if selfAddon.getSetting("whistory") == "true":
                    from resources.universal import watchhistory
                    wh = watchhistory.WatchHistory('plugin.video.movie25')
                    wh.add_item(mname+' '+'[COLOR green]WatchSeries[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
                player.KeepAlive()
                return ok
        except Exception, e:
                if stream_url != False:
                        main.ErrorReport(e)
                return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:57,代码来源:watchseries.py

示例15: VIDEOLINKSEXTRA

def VIDEOLINKSEXTRA(mname,murl,thumb,desc):
        main.GA("Extramina","Watched")
        sources = []
        link=main.OPENURL(murl)
        ok=True
        infoLabels =main.GETMETAT(mname,'','',thumb)
        video_type='movie'
        season=''
        episode=''
        img=infoLabels['cover_url']
        fanart =infoLabels['backdrop_url']
        imdb_id=infoLabels['imdb_id']
        infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,5000)")
        match=re.compile('<div class="streamlink"><a target=".+?" href="(.+?)">(.+?)</a></div>').findall(link)
        for url, host in match:
                match3=re.compile('extraminamovies').findall(url)
                if len(match3)>0:
                    link2=main.OPENURL(url)
                    match = re.compile('<iframe src="(.+?)"').findall(link2)
                    if len(match)==0:
                        match = re.compile('src="(.+?)"').findall(link2)
                    for url in match:
                        match2=re.compile('http://(.+?)/.+?').findall(url)
                        for host in match2:
                            host = host.replace('www.','')
                            if host =='putlocker.com':
                                url=url.replace('embed','file')
                hosted_media = urlresolver.HostedMediaFile(url=url, title=host)
                sources.append(hosted_media)        
        if (len(sources)==0):
                xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)")
      
        else:
                source = urlresolver.choose_source(sources)
        try:
                xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                stream_url = main.resolve_url(source.get_url())
                if(stream_url == False):
                    return
                
                infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
                # play with bookmark
                player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
                #WatchHistory
                if selfAddon.getSetting("whistory") == "true":
                    wh.add_item(mname+' '+'[COLOR green]Extramina[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart='', is_folder=False)
                player.KeepAlive()
                return ok
        except Exception, e:
                if stream_url != False:
                        main.ErrorReport(e)
                return ok
开发者ID:HIGHWAY99,项目名称:MashUp,代码行数:53,代码来源:extramina.py


注:本文中的resources.libs.main.resolve_url函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。