• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python main.removeColoredText函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: PLAY

def PLAY(mname,murl,thumb):

        main.GA("Dramania","Watched") 
        ok=True
        
        r = re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I)
        if r:
            infoLabels =main.GETMETAEpiT(mname,'','')
            video_type='episode'
            season=infoLabels['season']
            episode=infoLabels['episode']
        else:
            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']) }
        try :
                xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
                infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
                if not video_type is 'episode': infoL['originalTitle']=main.removeColoredText(infoLabels['metaName'])
                from resources.universal import playbackengine
                
                if "'," in murl:
                    mname=main.removeColoredText(mname)
                    pl=xbmc.PlayList(1);pl.clear()
                    playlist = sorted(list(set(eval(murl))), key=lambda playlist: playlist[0])
                    for xname,link in playlist:
                        pl.add(getLink(link),xbmcgui.ListItem(mname+' '+xname,thumbnailImage=img))
                    xbmc.Player().play(pl)
                    while xbmc.Player().isPlaying():
                        xbmc.sleep(2500)
                else:
                    stream_url = getLink(murl)
                    # 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":
                        from resources.universal import watchhistory
                        wh = watchhistory.WatchHistory(addon_id)
                        wh.add_item(mname+' '+'[COLOR green]Dramania[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=infoLabels['cover_url'], fanart=infoLabels['backdrop_url'], is_folder=False)
                    player.KeepAlive()
                    return ok
        except Exception, e:
                if stream_url != False:
                        main.ErrorReport(e)
                return ok
开发者ID:charlesjackson261,项目名称:yolo-boo,代码行数:50,代码来源:dramania.py


示例2: PLAYLINK

def PLAYLINK(mname,murl):
    name=main.removeColoredText(mname)
    #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']
    murl=resolveIceLink(murl)
    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:alejusar,项目名称:starthere,代码行数:31,代码来源:icefilms.py


示例3: LISTWATCHEPISODE

def LISTWATCHEPISODE(mname, murl):
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace("   "," ")
        match=re.compile('<a href="([^<]+)"><span class="" >([^<]+)</span>').findall(link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Show list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
        season = re.search('Seas(on)?\.? (\d+)',main.removeColorTags(mname),re.I)
        for url, episode in reversed(match):
            name = mname
            epi= re.search('Ep(isode)?\.? (\d+)(.*)',episode, re.I)
            if(epi):
                e = str(epi.group(2))
                if(len(e)==1): e = "0" + e
                if(season):
                    s = season.group(2)
                    if(len(s)==1): s = "0" + s
                    name = main.removeColoredText(mname).strip()
                    name = name + " " + "S" + s + "E" + e
                    episode = epi.group(3).strip()
            main.addDirTE(name + ' [COLOR red]'+str(episode)+'[/COLOR]','http://watchseries.lt'+url,575,'','','','','','')
            loadedLinks = loadedLinks + 1
            percent = (loadedLinks * 100)/totalLinks
            remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
            dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
            if (dialogWait.iscanceled()):
                return False   
        dialogWait.close()
        del dialogWait
        if selfAddon.getSetting('auto-view') == 'true':
                xbmc.executebuiltin("Container.SetViewMode(%s)" % selfAddon.getSetting('episodes-view'))
开发者ID:fsharath,项目名称:MashUp,代码行数:34,代码来源:watchseries.py


示例4: LISTSTREAMS

def LISTSTREAMS(mname,murl):
    mname=main.removeColoredText(mname)
    id= re.search('(\d{4})(\d{2})(\d{4})',murl)
    xml='http://smb.cdnak.neulion.com/fs/nhl/mobile/feed_new/data/streams/'+str(id.group(1))+'/ipad/'+str(id.group(2))+'_'+str(id.group(3))+'.json'
    link=main.OPENURL(xml)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('  ','')
    match=re.compile('"vod-condensed":{"bitrate0":"([^"]+)"},"vod-continuous":{"bitrate0":"([^"]+)","image":"([^"]+)"},"vod-whole":{"bitrate0":"([^"]+)"}',re.DOTALL).findall(link)
    for cond,cont,thumb,whole in match:
        if '_h_condensed' in cond:
            main.addPlayc(mname+' [COLOR blue]Home Condensed[/COLOR]',cond,396,thumb,'','','','','')
        else:
            main.addPlayc(mname+' [COLOR blue]Away Condensed[/COLOR]',cond,396,thumb,'','','','','')
        if '_h_continuous' in cont:
            main.addPlayc(mname+' [COLOR blue]Home Continuous[/COLOR]',cont,396,thumb,'','','','','')
        else:
            main.addPlayc(mname+' [COLOR blue]Away Continuous[/COLOR]',cont,396,thumb,'','','','','')
        if '_h_whole' in whole:
            main.addPlayc(mname+' [COLOR blue]Home Whole[/COLOR]',whole,396,thumb,'','','','','')
        else:
            main.addPlayc(mname+' [COLOR blue]Away Whole[/COLOR]',whole,396,thumb,'','','','','')
    match2=re.compile('"away".+?"live":{"bitrate0":"([^"]+)"},.+?"image":"([^"]+)"',re.DOTALL).findall(link)
    for live,thumb in match2:
        main.addPlayc(mname+' [COLOR blue]Away Live[/COLOR]',live+'x0xe'+str(murl),396,thumb,'','','','','')
    match3=re.compile('"home".+?"live":{"bitrate0":"([^"]+)"},.+?"image":"([^"]+)"',re.DOTALL).findall(link)
    for live,thumb in match3:
        main.addPlayc(mname+' [COLOR blue]Home LIVE[/COLOR]',live+'x0xe'+str(murl),396,thumb,'','','','','')
开发者ID:alejusar,项目名称:starthere,代码行数:26,代码来源:nhl.py


示例5: LINKLIST2

def LINKLIST2(mname,url):
    if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('href="(.+?)" target="_blank">(.+?)</a>',re.DOTALL).findall(url)
    for url,host in match:
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,314,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
开发者ID:alejusar,项目名称:starthere,代码行数:7,代码来源:dpstreaming.py


示例6: LINKLIST

def LINKLIST(mname,url):
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile("""><img alt="([^<]+)" src="[^<]+" onClick="cargar.?'#player','(.+?)'""",re.DOTALL).findall(link)
    for host,url in match:
        host=host.replace(' Java','').replace('ShockShare','SockShare').replace('.to','')
        print host
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+'[/COLOR]','http://www.estrenosvk.com/player/'+url,310,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
开发者ID:alejusar,项目名称:starthere,代码行数:10,代码来源:fxcine.py


示例7: PlaySceneLogLink

def PlaySceneLogLink(mname,murl):
    main.GA("SceneLog","Watched") 
    ok=True
    r = re.findall('s(\d+)e(\d\d+)',mname,re.I)
    if r:
        infoLabels =main.GETMETAEpiT(mname,'','')
        video_type='episode'
        season=infoLabels['season']
        episode=infoLabels['episode']
    else:
        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']) }
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    try :
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = main.resolve_url(murl)
        infoLabels['title'] = main.removeColoredText(infoLabels['title'])
        infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
        if not video_type is 'episode': infoL['originalTitle']=main.removeColoredText(infoLabels['metaName']) 
        # play with bookmark
        from resources.universal import playbackengine
        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(mname+' '+'[COLOR green]SceneLog[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=infoLabels['cover_url'], fanart=infoLabels['backdrop_url'], is_folder=False)
        main.CloseAllDialogs()
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
                main.ErrorReport(e)
        return ok
开发者ID:charlesjackson261,项目名称:yolo-boo,代码行数:41,代码来源:scenelog.py


示例8: LISTHOSTS

def LISTHOSTS(name,murl,thumb):
    name=main.removeColoredText(name)
    videobug=[]
    yourupload=[]
    video44=[]
    i=1
    j=1
    v=1
    if 'GetDetails' in murl:
        link=main.OPENURL(murl)
        idnum=re.findall('"id":"(.+?)"',link,re.DOTALL)[0]
    else:
        idnum=murl
    link=main.OPENURL('http://api.dramago.com/GetVideos/'+idnum).replace('\/','/')
    collect=re.findall('"(.+?)"',link,re.DOTALL)
    for links in collect:
        if 'videobug' in links:
            link=main.OPENURL(links)
            try:match=re.compile("playlist:.+?url: '(.+?)',",re.DOTALL).findall(link)[0]
            except:match=re.compile('file: "(.+?)",',re.DOTALL).findall(link)[0]
            match=urllib.unquote_plus(match)
            main.addDown2(name+' [COLOR blue]VideoBug Part '+str(i)+'[/COLOR]',match,272,thumb,'')
            videobug.append(('Part '+str(i),match))
            i=i+1
    if videobug:
        main.addDown2(name+' [COLOR blue]VideoBug Play All[/COLOR]',str(videobug),272,thumb,'')  
    for links in collect:
        if 'yourupload' in links:
            link=main.OPENURL(links)
            try:
                match=re.compile('<meta property="og.+?video" content="(.+?)"/>',re.DOTALL).findall(link)
                if len(match)!=0:
                    match=urllib.unquote_plus(match[0])
                    main.addDown2(name+' [COLOR yellow]YourUpload Part '+str(j)+'[/COLOR]',match,272,thumb,'')
                    yourupload.append(('Part '+str(j),match))
                    j=j+1
            except:pass
            
    if yourupload and len(match)!=0:
        main.addDown2(name+' [COLOR yellow]YourUpload Play All[/COLOR]',str(videobug),272,thumb,'')
    for links in collect:
        if 'video44' in links:
            link=main.OPENURL(links)
            try:match=re.compile("playlist:.+?url: '(.+?)',",re.DOTALL).findall(link)[0]
            except:match=re.compile('file: "(.+?)"',re.DOTALL).findall(link)[0]
            match=urllib.unquote_plus(match)
            main.addDown2(name+' [COLOR red]Video44 Part '+str(v)+'[/COLOR]',match,272,thumb,'')
            video44.append(('Part '+str(v),match))
            v=v+1
    if video44:
        main.addDown2(name+' [COLOR red]Video44 Play All[/COLOR]',str(videobug),272,thumb,'')
开发者ID:fsharath,项目名称:MashUp,代码行数:51,代码来源:dramania.py


示例9: LINKLIST

def LINKLIST(mname,url):
    link=main.OPENURL2(url)
    link=link.replace('<iframe src="http://ads.affbuzzads.com','')
    link=main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('<iframe src="(.+?)" frameborder',re.DOTALL).findall(link)
    for url in match:
        hostn=re.compile("http://(.+?)/.+?").findall(url)
        for hname in hostn:
            host=hname.replace('www.','').replace('embed.','').replace('.es','').replace('.in','').replace('.sx','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
            host=host.split('.')[0]
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,314,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
开发者ID:alejusar,项目名称:starthere,代码行数:14,代码来源:dpstreaming.py


示例10: LISTEPISODE

def LISTEPISODE(mname,url):
    link=main.OPENURL(url)
    link=link.replace('\r','').replace('\n','').replace('\t','')
    link=main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('<dd><a href="([^<]+)" class="zoombox.+?" title="([^<]+)">',re.DOTALL).findall(link)
    for url,name in match:
        hostn=re.compile("http://(.+?)/.+?").findall(url)
        for hname in hostn:
            host=hname.replace('www.','').replace('embed.','').replace('.es','').replace('.in','').replace('.sx','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
            host=host.split('.')[0]
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(name+' [COLOR blue]'+host.upper()+' [/COLOR]',url,797,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
开发者ID:Ladeiras,项目名称:AutoUpdate,代码行数:15,代码来源:fullstream2.py


示例11: LINKLIST

def LINKLIST(mname,url):
    link=main.OPENURL(url)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('<iframe src="//www.facebook.com/plugins/likebox.php','').replace('<iframe src="http://creative.rev2pub.com','')
    link=main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('<center><iframe.+?src="(.+?)".+?',re.DOTALL | re.IGNORECASE).findall(link)
    #main.ErrorReport(match)
    for url in match:
        hostn=re.compile("http://(.+?)/.+?").findall(url)
        for hname in hostn:
            host=hname.replace('www.','').replace('embed.','').replace('.es','').replace('.in','').replace('.sx','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
            host=host.split('.')[0]
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,797,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
开发者ID:Ladeiras,项目名称:AutoUpdate,代码行数:16,代码来源:fullstream2.py


示例12: LINKLIST

def LINKLIST(mname,url):
    link=main.OPENURL(url)
    link=link.replace('\r','').replace('\n','').replace('\t','')
    link=main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('<iframe.+?src="(.+?)".+?',re.DOTALL | re.IGNORECASE).findall(link)
    #xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving"+str(match)+" Link)")
    #xbmc.log(msg='-------------------'+str(match)+str(len(match)), level=xbmc.LOGDEBUG)
    for url in match:
        hostn=re.compile("http://(.+?)/.+?").findall(url)
        for hname in hostn:
            host=hname.replace('www.','').replace('embed.','').replace('.es','').replace('.in','').replace('.sx','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
            host=host.split('.')[0]
        #if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,797,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
开发者ID:himag1,项目名称:AutoUpdate,代码行数:17,代码来源:fullstream2.py


示例13: LINK2

def LINK2(mname,murl,thumb,desc):
        SRT=os.path.join(datapath,'Sub.srt')
        if  os.path.exists(SRT):
                os.remove(SRT)
        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']) }
        main.GA("SominalTv","Watched")
        if murl:
                if "'," in murl:
                    print murl
                    mname=main.removeColoredText(mname)
                    pl=xbmc.PlayList(1);pl.clear()
                    playlist = sorted(list(set(eval(murl))), key=lambda playlist: playlist[0])
                    for xname,link in playlist:
                        pl.add(getvideo2(link,answer='x11g'),xbmcgui.ListItem(mname+' '+xname,thumbnailImage=img))
                    xbmc.Player().play(pl)
                    xbmc.Player().setSubtitles(SRT)
                    while xbmc.Player().isPlaying():
                        xbmc.sleep(2500)
                    if selfAddon.getSetting("whistory") == "true":
                        wh.add_item(mname+' '+'[COLOR green]SominalFilms[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
   
                else:
                        stream_url2=getvideo2(murl)
                        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)")
                        infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
                        # play with bookmark
                        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url2, 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)
                        player.setSubtitles(SRT)#inserts Srt file from profile folder
                        #WatchHistory
                        if selfAddon.getSetting("whistory") == "true":
                                wh.add_item(mname+' '+'[COLOR green]SominalFilms[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
                        player.KeepAlive()
                                 

                        return ok
        else:
                        xbmc.executebuiltin("XBMC.Notification(Sorry!,Protected Link,5000)")
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:45,代码来源:sominaltvfilms.py


示例14: LINKLIST

def LINKLIST(mname,url):
    link=main.OPENURL(url)
    link=main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
    match=re.compile('<span class="(.+?)">.+?</span></td><td class="tdcalidad">(.+?)</td><td class=".+?<img src=".+?" alt="(.+?)" />.+?</td>.+?title=".+?" href="(.+?)">',re.DOTALL).findall(link)
    for lang,qua,host,url in match:
        if 'flag flag_0' in lang:
            lang= ' [COLOR red]ESP[/COLOR]'
        if 'flag flag_1' in lang:
            lang= ' [COLOR yellow]LAT[/COLOR]'
        if 'flag flag_2' in lang:
            lang= ' [COLOR purple]ENG[/COLOR]'
        if 'flag flag_3' in lang:
            lang= ' [COLOR green]SUB[/COLOR]'
        if main.supportedHost(host):
            mname=main.removeColoredText(mname)
            main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]'+ lang+' [COLOR aqua]'+qua+'[/COLOR]',url,67,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")    
开发者ID:marduk191,项目名称:plugin.video.movie25,代码行数:18,代码来源:cinevip.py


示例15: LINK

def LINK(mname,murl):      
        if BASE_URL not in murl:
            murl=BASE_URL+murl
        html = main.OPENURL(murl)
        if selfAddon.getSetting("hide-download-instructions") != "true":
            main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
        r = re.compile(r'class="(o.+?)">.+?javascript:show\(\'(.+?)\'\,\'.+?\'\,\s\'(.+?)\'\)\;.+?<b>(.+?)said work',re.M|re.DOTALL).findall(html)
        for status, url, hoster, said in r:
            percentage = said.replace('%','')
            host=hoster
            hoster = hoster.replace('www.','').replace('.in','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
            if int(percentage) in range(0,25):
                title = '[COLOR blue]'+hoster.upper()+'[/COLOR][COLOR red]  '+status+' '+said+'[/COLOR]'
            if int(percentage) in range(25,50):
                title = '[COLOR blue]'+hoster.upper()+'  '+status+' '+said+'[/COLOR]'
            if int(percentage) in range(50,75):
                title = '[COLOR blue]'+hoster.upper()+'[/COLOR][COLOR orange]  '+status+' '+said+'[/COLOR]'
            if int(percentage) in range(75,101):
                title = '[COLOR blue]'+hoster.upper()+'[/COLOR][COLOR=FF67cc33]  '+status+' '+said+'[/COLOR]'
            main.addDown2(main.removeColoredText(mname).strip()+' '+title,'xoxv'+host+'xoxe'+url+'xoxc',1027,art+'/hosts/'+hoster.lower()+'.png',art+'/hosts/'+hoster.lower()+'.png')    
开发者ID:himag1,项目名称:AutoUpdate,代码行数:20,代码来源:tubeplus.py


示例16: LINKLIST

def LINKLIST(mname, url):
    link = main.OPENURL(url)
    link = main.unescapes(link)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]", "", "")
    match = re.compile("""><img alt="([^<]+)" src="[^<]+" onClick="cargar.?'#player','(.+?)'""", re.DOTALL).findall(
        link
    )
    for host, url in match:
        host = host.replace(" Java", "").replace("ShockShare", "SockShare").replace(".to", "")
        print host
        if main.supportedHost(host):
            mname = main.removeColoredText(mname)
            main.addDown2(
                mname + " [COLOR blue]" + host.upper() + "[/COLOR]",
                "http://www.fxcine.com/player/" + url,
                310,
                art + "/hosts/" + host.lower() + ".png",
                art + "/hosts/" + host.lower() + ".png",
            )
开发者ID:philtimmes,项目名称:addons,代码行数:20,代码来源:fxcine.py


示例17: LINK

def LINK(mname, murl):
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting Hosts,1500)")
    if "http://www.tubeplus.me/" not in murl:
        murl = BASE_URL + murl
    html = main.OPENURL(murl)
    if selfAddon.getSetting("hide-download-instructions") != "true":
        main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]", "", "")
    r = re.compile(
        r'class="(o.+?)">.+?javascript:show\(\'(.+?)\'\,\'.+?\'\,\s\'(.+?)\'\)\;.+?<b>(.+?)said work', re.M | re.DOTALL
    ).findall(html)
    for status, url, hoster, said in r:
        percentage = said.replace("%", "")
        host = hoster
        hoster = (
            hoster.replace("www.", "")
            .replace(".in", "")
            .replace(".net", "")
            .replace(".com", "")
            .replace(".to", "")
            .replace(".org", "")
            .replace(".ch", "")
            .replace(".eu", "")
            .replace(".ES", "")
        )
        if int(percentage) in range(0, 25):
            title = "[COLOR blue]" + hoster.upper() + "[/COLOR][COLOR red]  " + status + " " + said + "[/COLOR]"
        if int(percentage) in range(25, 50):
            title = "[COLOR blue]" + hoster.upper() + "  " + status + " " + said + "[/COLOR]"
        if int(percentage) in range(50, 75):
            title = "[COLOR blue]" + hoster.upper() + "[/COLOR][COLOR orange]  " + status + " " + said + "[/COLOR]"
        if int(percentage) in range(75, 101):
            title = "[COLOR blue]" + hoster.upper() + "[/COLOR][COLOR=FF67cc33]  " + status + " " + said + "[/COLOR]"
        main.addDown2(
            main.removeColoredText(mname).strip() + " " + title,
            "xoxv" + host + "xoxe" + url + "xoxc",
            1027,
            art + "/hosts/" + hoster.lower() + ".png",
            art + "/hosts/" + hoster.lower() + ".png",
        )
开发者ID:himag1,项目名称:MashUp,代码行数:39,代码来源:tubeplus.py


示例18: VIDEOLINKSSCEPER

def VIDEOLINKSSCEPER(mname, murl, thumb):
    main.GA("Sceper", "Watched")
    link = main.OPENURL(murl)
    sources = []
    ok = True
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,3000)")
    match = re.compile('<a href="([^<]+)">htt').findall(link)
    for url in match:
        vlink = re.compile("rar").findall(url)
        if len(vlink) == 0:
            match2 = re.compile("http://(.+?)/.+?").findall(url)
            for host in sorted(match2):
                host = host.replace("www.", "")
                match3 = re.compile("720p").findall(url)
                match4 = re.compile("mp4").findall(url)
                if len(match3) > 0:
                    host = host + " [COLOR red]HD[/COLOR]"
                elif len(match4) > 0:
                    host = host + " [COLOR green]SD MP4[/COLOR]"
                else:
                    host = host + " [COLOR blue]SD[/COLOR]"

                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)
    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

        if re.findall("(.+?)\ss(\d+)e(\d+)\s", mname, re.I):
            mname = mname.split("&")[0]
            infoLabels = main.GETMETAEpiT(mname, thumb, "")
            video_type = "episode"
            season = infoLabels["season"]
            episode = infoLabels["episode"]
        else:
            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"]),
        }

        infoL = {"Title": infoLabels["title"], "Plot": infoLabels["plot"], "Genre": infoLabels["genre"]}
        if not video_type is "episode":
            infoL["originalTitle"] = main.removeColoredText(infoLabels["metaName"])
        # 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]Sceper[/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,代码行数:97,代码来源:sceper.py


示例19: LINKSP3

def LINKSP3(mname,murl):
    main.GA("Rls1Click","Watched")
    msg = xbmcgui.DialogProgress()
    msg.create('Please Wait!','')
    msg.update(0,'Collecting hosts')
    link=main.OPENURL(murl)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('&#38;','&')
    sources=[]
    titles=[]
    urls=[]
    ok=True
    paragraphs=re.compile('(?sim)<strong>1-Click</strong>.*?<strong>1GB Links</strong>').findall(link)
    for paragraph in paragraphs:
        urls = re.compile('href="(https?://[^<^\]^"]+)"').findall(paragraph)
#         match=re.compile('<a href="([^<]+)">htt').findall(link)
#     match = match1 + match
    print urls
    hostsmax = len(urls)
    h = 0
    from urlparse import urlparse
    for url in urls:
        h += 1
        percent = (h * 100)/hostsmax
        msg.update(percent,'Collecting hosts - ' + str(percent) + '%')
        if msg.iscanceled(): break
        if '1fichier' in url:
            host = '1fichier'
        else:
            host = urlparse(url).hostname.replace('www.','').partition('.')[0]
        hostname = host
        host = host.upper()
        if main.supportedHost(hostname):
            titles.append(host + ' [COLOR red]1080P[/COLOR]')
            sources.append(url)
    msg.close()
    if (len(sources)==0):
        xbmc.executebuiltin("XBMC.Notification(Sorry!,Could not find a playable link,3000)")
        return
    else:
        dialog = xbmcgui.Dialog()
        index = dialog.select('Choose your stream', titles)
        if index != -1: 
            source = sources[index]
        else: source = None
    try:
        if not source:
            main.CloseAllDialogs()
            return
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
        stream_url = main.resolve_url(source)
        if(stream_url == False):
            return
        
        if re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I):
            mname=mname.split('&')[0]
            infoLabels =main.GETMETAEpiT(mname,'','')
            video_type='episode'
            season=infoLabels['season']
            episode=infoLabels['episode']
        else:
            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']) }
        
        infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']}
        if not video_type is 'episode': infoL['originalTitle']=main.removeColoredText(infoLabels['metaName'])
        # 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]DL4Free[/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:Ladeiras,项目名称:AutoUpdate,代码行数:85,代码来源:rls1click.py


示例20: LINKSP3

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python main.resolve_url函数代码示例发布时间:2022-05-26
下一篇:
Python main.addPlayc函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap