Пример #1
0
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
Пример #2
0
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")
Пример #3
0
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")
Пример #4
0
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")
Пример #5
0
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") 
Пример #6
0
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
Пример #7
0
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")
Пример #8
0
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,'','','','','')
Пример #9
0
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
Пример #10
0
def LISTWATCHEPISODE(mname, murl):
        link=main.OPENURL(murl)
        link=link.replace('\r','').replace('\n','').replace('\t','').replace("&nbsp;&nbsp;&nbsp;"," ")
        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'))
Пример #11
0
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,789,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
Пример #12
0
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")
Пример #13
0
def LISTWATCHEPISODE(mname, murl, index=False):
    link = main.OPENURL(murl)
    link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(
        "&nbsp;&nbsp;&nbsp;", " ")
    print mname
    xname = re.findall('(Season .+?)', mname)[0]
    print xname
    match = re.compile(
        '<a title=".+?- ' + xname +
        ' -.+?" 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()
        if index == 'True':
            name = re.sub('(\d{4})', '',
                          name.replace(' (', '').replace(')', ''))
            main.addDirTE(name + ' [COLOR red]' + str(episode) + '[/COLOR]',
                          'http://watchseries.ag' + url, 21, '', '', '', '',
                          '', '')
        else:
            main.addDirTE(name + ' [COLOR red]' + str(episode) + '[/COLOR]',
                          'http://watchseries.ag' + 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'))
Пример #14
0
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
Пример #15
0
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,'')
Пример #16
0
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") 
Пример #17
0
def LISTSTREAMS(mname,murl):
    mname=main.removeColoredText(mname)
    awayteam= mname.split(' at ')[0]
    hometeam= mname.split(' at ')[1]
    match=re.compile('<live bitrate="0">([^<]+ipad.m3u8)</live>',re.DOTALL).findall(murl)
    if len(match)==0:
        link=main.OPENURL('http://breadwinka.com/get_games.php?client=nhl&playerclient=hop')
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('  ','')
        match=re.compile('<home_team>'+hometeam.replace(' ','')+'</home_team><away_team>'+awayteam.replace(' ','')+'</away_team><assignments><assignment.+?name="away"><ipad_url>(.+?)</ipad_url></assignment><assignment.+?name="home"><ipad_url>(.+?)</ipad_url>',re.DOTALL).findall(link)
        for away,home in match:
            pass
        print home
        link=main.OPENURL(home)
        url1=home.split('_hd')[0]
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        home=re.compile('BANDWIDTH=\d+(.+?.mp4.m3u8)',re.DOTALL).findall(link)
        for i in home:
            f= i.split('_hd_')[1]
            bitrate=f.split('_ipad_')[0]
            final= url1+'_hd_'+f
            main.addPlayc(hometeam+' Home'+' '+bitrate+' Kbps',final,396,art+'/nhl.png','','','','','')
        link2=main.OPENURL(away)
        url2=away.split('_hd')[0]
        link2=link2.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        away=re.compile('BANDWIDTH=\d+(.+?.mp4.m3u8)',re.DOTALL).findall(link2)
        for i in away:
            f= i.split('_hd_')[1]
            bitrate=f.split('_ipad_')[0]
            final= url2+'_hd_'+f
            main.addPlayc(awayteam+' Away'+' '+bitrate+' Kbps',final,396,art+'/nhl.png','','','','','')
    else:
        url1=match[0].split('_hd')[0]
        link=main.OPENURL(match[0])
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        home=re.compile('BANDWIDTH=\d+(.+?_ipad.m3u8)',re.DOTALL).findall(link)
        for i in home:
            f= i.split('_hd_')[1]
            bitrate=f.split('_ipad.m3u8')[0]
            final= url1+'_hd_'+f
            main.addPlayc(hometeam+' Home'+' '+bitrate+' Kbps',final,396,art+'/nhl.png','','','','','')
        url2=match[1].split('_hd')[0]
        link2=main.OPENURL(match[1])
        link2=link2.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
        away=re.compile('BANDWIDTH=\d+(.+?_ipad.m3u8)',re.DOTALL).findall(link2)
        for i in away:
            f= i.split('_hd_')[1]
            bitrate=f.split('_ipad.m3u8')[0]
            final= url2+'_hd_'+f
            main.addPlayc(awayteam+' Away'+' '+bitrate+' Kbps',final,396,art+'/nhl.png','','','','','')
Пример #18
0
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") 
Пример #19
0
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") 
Пример #20
0
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).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,789,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png") 
Пример #21
0
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") 
Пример #22
0
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, '', '', '', '',
                      '')
Пример #23
0
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)")
Пример #24
0
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)")
Пример #25
0
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")    
Пример #26
0
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")
Пример #27
0
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')    
Пример #28
0
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",
            )
Пример #29
0
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')    
Пример #30
0
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",
        )
Пример #31
0
def LISTHOSTS(name,murl,thumb):
    name=main.removeColoredText(name)
    collect=[]
    videobug=[]
    yourupload=[]
    video44=[]
    play44=[]
    videoweed=[]
    cheesestream=[]
    videofun=[]
    byzoo=[]
    yucache=[]
    i=1
    j=1
    v=1
    p=1
    vw=1
    c=1
    vf=1
    b=1
    y=1

    link=main.OPENURL(murl).replace('\/','/').replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace(' class="selected"','').replace('&rarr;','')
    """parts=re.compile('<li><a href="(http://www.animetoon.tv/.+?/\d-\d+).+?>(Part.+?)</a>').findall(link)
    print len(parts)
    if part_pages:
        for url,pname in part_pages:
            match=re.compile('</ul></div><div><.+?src="(.+?)"').findall(main.OPENURL(url))
            for url in match:
                collect.append(url)"""
    try:
        count=1
        match=re.findall('<div><iframe src="(.+?)"',link,re.I)
        for url in match:
            parts=re.compile('<li><a href="http://www.animetoon.tv/.+?/'+str(count)+'-([^<]+)">Part(.+?)</a>').findall(link)
            if len(parts)>1:
                for item,num in parts:
                    furl=url.replace('part_1','part_'+str(item))
                    collect.append(furl)
            else:
                collect.append(url)
            count=count+1
    
    except: pass
    for links in collect:
        if 'byzoo' in links:
            main.addDown2(name+' [COLOR tan]Byzoo Part '+str(b)+'[/COLOR]',links,379,thumb,'')
            byzoo.append(('Part '+str(b),links))
            b=b+1
    if byzoo and len(byzoo)>1:
        main.addDown2(name+' [COLOR tan]Byzoo Play All[/COLOR]',str(byzoo),379,thumb,'')  
    for links in collect:
        if 'videobug' in links or 'easyvideo' in links:
            main.addDown2(name+' [COLOR blue]VideoBug Part '+str(i)+'[/COLOR]',links,379,thumb,'')
            videobug.append(('Part '+str(i),links))
            i=i+1
    if videobug and len(videobug)>1:
        main.addDown2(name+' [COLOR blue]VideoBug Play All[/COLOR]',str(videobug),379,thumb,'')  
    for links in collect:
        if 'yourupload' in links:
            main.addDown2(name+' [COLOR yellow]YourUpload Part '+str(j)+'[/COLOR]',links,379,thumb,'')
            yourupload.append(('Part '+str(j),links))
            j=j+1          
    if yourupload and len(yourupload)>1:
        main.addDown2(name+' [COLOR yellow]YourUpload Play All[/COLOR]',str(yourupload),379,thumb,'')
    for links in collect:
        if 'video44' in links or 'video66' in links:
            main.addDown2(name+' [COLOR red]Video44 Part '+str(v)+'[/COLOR]',links,379,thumb,'')
            video44.append(('Part '+str(v),links))
            v=v+1
    if video44 and len(video44)>1:
        main.addDown2(name+' [COLOR red]Video44 Play All[/COLOR]',str(video44),379,thumb,'')
    for links in collect:
        if 'play44' in links or 'play66' in links or 'playbb' in links:
            main.addDown2(name+' [COLOR green]Play44 Part '+str(p)+'[/COLOR]',links,379,thumb,'')
            play44.append(('Part '+str(p),links))
            p=p+1
    if play44 and len(play44)>1:
        main.addDown2(name+' [COLOR green]Play44 Play All[/COLOR]',str(play44),379,thumb,'')
    for links in collect:
        if 'videoweed' in links:
            main.addDown2(name+' [COLOR aqua]Videoweed Part '+str(vw)+'[/COLOR]',links,379,thumb,'')
            videoweed.append(('Part '+str(vw),links))
            vw=vw+1
    if videoweed and len(videoweed)>1:
        main.addDown2(name+' [COLOR aqua]Videoweed Play All[/COLOR]',str(videoweed),379,thumb,'')
    for links in collect:
        if 'cheesestream' in links:
            main.addDown2(name+' [COLOR purple]Cheesestream Part '+str(c)+'[/COLOR]',links,379,thumb,'')
            cheesestream.append(('Part '+str(c),links))
            c=c+1
    if cheesestream and len(cheesestream)>1:
        main.addDown2(name+' [COLOR purple]Cheesestream Play All[/COLOR]',str(cheesestream),379,thumb,'')
    for links in collect:
        if 'videofun' in links:
            main.addDown2(name+' [COLOR maroon]Videofun Part '+str(vf)+'[/COLOR]',links,379,thumb,'')
            videofun.append(('Part '+str(vf),links))
            vf=vf+1
    if videofun and len(videofun)>1:
        main.addDown2(name+' [COLOR maroon]Videofun Play All[/COLOR]',str(videofun),379,thumb,'')
    for links in collect:
        if 'yucache' in links:
            main.addDown2(name+' [COLOR maroon]Yucache Part '+str(y)+'[/COLOR]',links,379,thumb,'')
            yucache.append(('Part '+str(y),links))
            y=y+1
    if yucache:
        main.addDown2(name+' [COLOR maroon]Yucache Play All[/COLOR]',str(yucache),379,thumb,'')
Пример #32
0
def LISTHOSTS(name,murl,thumb):
    name=main.removeColoredText(name)
    videobug=[]
    yourupload=[]
    video44=[]
    play44=[]
    videoweed=[]
    cheesestream=[]
    videofun=[]
    yucache=[]
    i=1
    j=1
    v=1
    p=1
    vw=1
    c=1
    vf=1
    y=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 or 'easyvideo' in links:
            main.addDown2(name+' [COLOR blue]VideoBug Part '+str(i)+'[/COLOR]',links,272,thumb,'')
            videobug.append(('Part '+str(i),links))
            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:
            main.addDown2(name+' [COLOR yellow]YourUpload Part '+str(j)+'[/COLOR]',links,272,thumb,'')
            yourupload.append(('Part '+str(j),links))
            j=j+1          
    if yourupload :
        main.addDown2(name+' [COLOR yellow]YourUpload Play All[/COLOR]',str(yourupload),272,thumb,'')
    for links in collect:
        if 'video44' in links or 'video66' in links:
            main.addDown2(name+' [COLOR red]Video44 Part '+str(v)+'[/COLOR]',links,272,thumb,'')
            video44.append(('Part '+str(v),links))
            v=v+1
    if video44:
        main.addDown2(name+' [COLOR red]Video44 Play All[/COLOR]',str(video44),272,thumb,'')
    for links in collect:
        if 'play44' in links or 'play66' in links or 'playbb' in links:
            main.addDown2(name+' [COLOR green]Play44 Part '+str(p)+'[/COLOR]',links,272,thumb,'')
            play44.append(('Part '+str(p),links))
            p=p+1
    if play44:
        main.addDown2(name+' [COLOR green]Play44 Play All[/COLOR]',str(play44),272,thumb,'')
    for links in collect:
        if 'videoweed' in links:
            main.addDown2(name+' [COLOR aqua]Videoweed Part '+str(vw)+'[/COLOR]',links,272,thumb,'')
            videoweed.append(('Part '+str(vw),links))
            vw=vw+1
    if videoweed:
        main.addDown2(name+' [COLOR aqua]Videoweed Play All[/COLOR]',str(videoweed),272,thumb,'')
    for links in collect:
        if 'cheesestream' in links:
            main.addDown2(name+' [COLOR purple]Cheesestream Part '+str(c)+'[/COLOR]',links,272,thumb,'')
            cheesestream.append(('Part '+str(c),links))
            c=c+1
    if cheesestream:
        main.addDown2(name+' [COLOR purple]Cheesestream Play All[/COLOR]',str(cheesestream),272,thumb,'')
    for links in collect:
        if 'videofun' in links:
            main.addDown2(name+' [COLOR maroon]Videofun Part '+str(vf)+'[/COLOR]',links,272,thumb,'')
            videofun.append(('Part '+str(vf),links))
            vf=vf+1
    if videofun:
        main.addDown2(name+' [COLOR maroon]Videofun Play All[/COLOR]',str(videofun),272,thumb,'')
    for links in collect:
        if 'yucache' in links:
            main.addDown2(name+' [COLOR maroon]Yucache Part '+str(y)+'[/COLOR]',links,272,thumb,'')
            yucache.append(('Part '+str(y),links))
            y=y+1
    if yucache:
        main.addDown2(name+' [COLOR maroon]Yucache Play All[/COLOR]',str(yucache),272,thumb,'')
Пример #33
0
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:
            print url
            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)")
      
        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
                
                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
Пример #34
0
def LISTHOSTS(name, murl, thumb):
    name = main.removeColoredText(name)
    collect = []
    videobug = []
    yourupload = []
    video44 = []
    play44 = []
    videoweed = []
    cheesestream = []
    videofun = []
    byzoo = []
    yucache = []
    i = 1
    j = 1
    v = 1
    p = 1
    vw = 1
    c = 1
    vf = 1
    b = 1
    y = 1

    link = (
        main.OPENURL(murl)
        .replace("\/", "/")
        .replace("\r", "")
        .replace("\n", "")
        .replace("\t", "")
        .replace("&nbsp;", "")
        .replace(' class="selected"', "")
        .replace("&rarr;", "")
    )
    """parts=re.compile('<li><a href="(http://www.animetoon.tv/.+?/\d-\d+).+?>(Part.+?)</a>').findall(link)
    print len(parts)
    if part_pages:
        for url,pname in part_pages:
            match=re.compile('</ul></div><div><.+?src="(.+?)"').findall(main.OPENURL(url))
            for url in match:
                collect.append(url)"""
    try:
        count = 1
        match = re.findall('<div><iframe src="(.+?)"', link, re.I)
        for url in match:
            parts = re.compile(
                '<li><a href="http://www.animetoon.tv/.+?/' + str(count) + '-([^<]+)">Part(.+?)</a>'
            ).findall(link)
            if len(parts) > 1:
                for item, num in parts:
                    furl = url.replace("part_1", "part_" + str(item))
                    collect.append(furl)
            else:
                collect.append(url)
            count = count + 1

    except:
        pass
    for links in collect:
        if "byzoo" in links:
            main.addDown2(name + " [COLOR tan]Byzoo Part " + str(b) + "[/COLOR]", links, 379, thumb, "")
            byzoo.append(("Part " + str(b), links))
            b = b + 1
    if byzoo and len(byzoo) > 1:
        main.addDown2(name + " [COLOR tan]Byzoo Play All[/COLOR]", str(byzoo), 379, thumb, "")
    for links in collect:
        if "videobug" in links or "easyvideo" in links:
            main.addDown2(name + " [COLOR blue]VideoBug Part " + str(i) + "[/COLOR]", links, 379, thumb, "")
            videobug.append(("Part " + str(i), links))
            i = i + 1
    if videobug and len(videobug) > 1:
        main.addDown2(name + " [COLOR blue]VideoBug Play All[/COLOR]", str(videobug), 379, thumb, "")
    for links in collect:
        if "yourupload" in links:
            main.addDown2(name + " [COLOR yellow]YourUpload Part " + str(j) + "[/COLOR]", links, 379, thumb, "")
            yourupload.append(("Part " + str(j), links))
            j = j + 1
    if yourupload and len(yourupload) > 1:
        main.addDown2(name + " [COLOR yellow]YourUpload Play All[/COLOR]", str(yourupload), 379, thumb, "")
    for links in collect:
        if "video44" in links or "video66" in links:
            main.addDown2(name + " [COLOR red]Video44 Part " + str(v) + "[/COLOR]", links, 379, thumb, "")
            video44.append(("Part " + str(v), links))
            v = v + 1
    if video44 and len(video44) > 1:
        main.addDown2(name + " [COLOR red]Video44 Play All[/COLOR]", str(video44), 379, thumb, "")
    for links in collect:
        if "play44" in links or "play66" in links or "playbb" in links:
            main.addDown2(name + " [COLOR green]Play44 Part " + str(p) + "[/COLOR]", links, 379, thumb, "")
            play44.append(("Part " + str(p), links))
            p = p + 1
    if play44 and len(play44) > 1:
        main.addDown2(name + " [COLOR green]Play44 Play All[/COLOR]", str(play44), 379, thumb, "")
    for links in collect:
        if "videoweed" in links:
            main.addDown2(name + " [COLOR aqua]Videoweed Part " + str(vw) + "[/COLOR]", links, 379, thumb, "")
            videoweed.append(("Part " + str(vw), links))
            vw = vw + 1
    if videoweed and len(videoweed) > 1:
        main.addDown2(name + " [COLOR aqua]Videoweed Play All[/COLOR]", str(videoweed), 379, thumb, "")
    for links in collect:
        if "cheesestream" in links:
            main.addDown2(name + " [COLOR purple]Cheesestream Part " + str(c) + "[/COLOR]", links, 379, thumb, "")
            cheesestream.append(("Part " + str(c), links))
            c = c + 1
    if cheesestream and len(cheesestream) > 1:
        main.addDown2(name + " [COLOR purple]Cheesestream Play All[/COLOR]", str(cheesestream), 379, thumb, "")
    for links in collect:
        if "videofun" in links:
            main.addDown2(name + " [COLOR maroon]Videofun Part " + str(vf) + "[/COLOR]", links, 379, thumb, "")
            videofun.append(("Part " + str(vf), links))
            vf = vf + 1
    if videofun and len(videofun) > 1:
        main.addDown2(name + " [COLOR maroon]Videofun Play All[/COLOR]", str(videofun), 379, thumb, "")
    for links in collect:
        if "yucache" in links:
            main.addDown2(name + " [COLOR maroon]Yucache Part " + str(y) + "[/COLOR]", links, 379, thumb, "")
            yucache.append(("Part " + str(y), links))
            y = y + 1
    if yucache:
        main.addDown2(name + " [COLOR maroon]Yucache Play All[/COLOR]", str(yucache), 379, thumb, "")
Пример #35
0
def LINKSP3(mname,murl):
    main.GA("FilesTube","Watched")
    msg = xbmcgui.DialogProgress()
    msg.create('Please Wait!','')
    msg.update(0,'Collecting hosts')
    link=main.OPENURL(murl,mobile=True,timeout = 10)
    sources=[]
    titles=[]
    ok=True
    match=re.compile('(?sim)<pre><span id="copy_paste_links">[^<]+?<').findall(link)
    if match:
        match = re.compile('(https?://[^<]+)').findall(match[0])
    hostsmax = len(match)
    h = 0
    from urlparse import urlparse
    for url in match:
        url = url.strip()
        h += 1
        percent = (h * 100)/hostsmax
        msg.update(percent,'Collecting hosts - ' + str(percent) + '%')
        if msg.iscanceled(): break
        vlink=re.compile('rar|part\d+?(\.html)?$|/folder/').findall(url)
        if len(vlink)==0:
            host = urlparse(url).hostname.replace('www.','').partition('.')[0]
            hostname = host
            host = host.upper()
            quality = mname
            match3=re.compile('(?i)(720p?|1080p?)').findall(quality)
            if match3 and not 'p' in match3[0]: match3[0] += 'p'
            match4=re.compile('mp4').findall(url)
            if len(match3)>0:
                host =host+' [COLOR red]'+match3[0]+'[/COLOR]'
            elif len(match4)>0:
                host =host+' [COLOR green]SD MP4[/COLOR]'
            else:
                host =host+' [COLOR blue]SD[/COLOR]'
            if main.supportedHost(hostname):
                titles.append(host)
                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
Пример #36
0
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
Пример #37
0
def iWatchLINKB(mname,url):
    main.GA("iWatchonline","Watched")
    ok=True
    hname=mname
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)")
    mname=mname.split('   [COLOR red]')[0]
    r = re.findall('Season(.+?)Episode([^<]+)',mname)
    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']) }
    link=main.OPENURL(url)
    link=main.unescapes(link)
    match=re.compile('<(?:iframe|pagespeed_iframe).+?src=\"(.+?)\"').findall(link)
    try :
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = main.resolve_url(match[0])
        if stream_url == False: return
            
        infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'],'originalTitle': main.removeColoredText(infoLabels['title'])}
        # 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(hname+' '+'[COLOR green]'+prettyName+'[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=str(img), fanart=str(fanart), is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
                main.ErrorReport(e)
        return ok
Пример #38
0
def VIDEOLINKSSCENE(mname, murl, thumb):
    main.GA(prettyName, "Watched")
    msg = xbmcgui.DialogProgress()
    msg.create('Please Wait!', '')
    msg.update(0, 'Collecting hosts')
    link = main.OPENURL(murl)
    sources = []
    titles = []
    ok = True
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    paragraphs = re.compile('(?sim)<p.*?</p>').findall(link)
    match = []
    for paragraph in paragraphs:
        domains = re.compile(
            '<a href="https?://([^"]+?)/[^"]+(?!jpg|gif|jpeg|png)" rel="nofollow">htt'
        ).findall(paragraph)
        urls = re.compile(
            '<a href="([^"]+)(?!jpg|gif|jpeg|png)" rel="nofollow">htt'
        ).findall(paragraph)
        for d in domains:
            if domains.count(d) > 1:
                while d in domains:
                    index = domains.index(d)
                    domains.pop(index)
                    urls.pop(index)
        match += urls
    hostsmax = len(match)
    h = 0
    from urlparse import urlparse
    for url in match:
        h += 1
        percent = (h * 100) / hostsmax
        msg.update(percent, 'Collecting hosts - ' + str(percent) + '%')
        if msg.iscanceled(): break
        vlink = re.compile('rar|part\d+?(\.html)?$|/folder/').findall(url)
        if len(vlink) == 0:
            url = re.sub('(?i)\.html$', '', url)
            filename = re.compile('(?i)/([^/]*?\..{3,4})$').findall(url)
            if filename: filename = " [" + filename[0] + "]"
            else: filename = ""
            firstword = mname.partition(' ')[0]
            if re.search('(?i)' + mname.partition(' ')[0], url):
                if re.search('(?i)1080p?', mname):
                    if not re.search('(?i)1080p?', url): continue
                if re.search('(?i)720p', mname):
                    if not re.search('(?i)720p?', url): continue
            if re.search('(?i)lumfile.com|freakshare.com', url):
                if not re.search('(?i)' + mname.partition(' ')[0], url):
                    continue
            if re.search('(?i)1080p?', mname):
                if re.search('(?i)720p|dvdrip|480p/|xvid', url): continue
            if re.search('(?i)720p?', mname):
                if re.search('(?i)1080p?|dvdrip|480p|xvid', url): continue
            if re.search('(?i)xvid|480p',
                         mname) or not re.search('(?i)1080p?|720p?', mname):
                if re.search('(?i)1080p?|720p?', url): continue
#                 url = url.replace('ul.to','uploaded.net')
            host = urlparse(url).hostname.replace('www.', '').partition('.')[0]
            hostname = host
            host = host.upper()
            quality = url
            match3 = re.compile('(?i)(720p?|1080p?)').findall(quality)
            if match3 and not 'p' in match3[0]: match3[0] += 'p'
            match4 = re.compile('mp4').findall(url)
            if len(match3) > 0:
                host = host + ' [COLOR red]' + match3[0] + '[/COLOR]'
            elif len(match4) > 0:
                host = host + ' [COLOR green]SD MP4[/COLOR]'
            else:
                host = host + ' [COLOR blue]SD[/COLOR]'
            if main.supportedHost(hostname):
                titles.append(host + filename)
                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, 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
        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(mname + ' ' + '[COLOR green]' + prettyName +
                        '[/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
Пример #39
0
def VIDEOLINKSSCEPER(mname,murl,thumb):
        msg = xbmcgui.DialogProgress()
        msg.create('Please Wait!','')
        msg.update(0,'Collecting hosts')
        link=main.OPENURL(murl, cookie="sceper")
        sources=[]
        titles=[]
        ok=True
        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        playlist.clear()
        match0=re.compile('(?sim)<div class="meta">Download Links</div>.*?</div>').findall(link)
        match1 = []
        match2 = []
        if match0:
            match2=re.compile('(?sim)<p.*?</p>').findall(match0[0])
            for paragraph in reversed(match2): match1 +=re.compile('<a href="([^"]+?)"').findall(paragraph)
        match = []
        paragraphs = re.compile('(?sim)<p.*?</p>').findall(link)
        for paragraph in paragraphs:
            domains = re.compile('<a href="https?://([^"]+?)/[^"]+(?!jpg|gif|jpeg|png)">htt').findall(paragraph)
            urls = re.compile('<a href="([^"]+)(?!jpg|gif|jpeg|png)">htt').findall(paragraph)
            for d in domains:
                if domains.count(d) > 1:
                    while d in domains:
                        index = domains.index(d)
                        domains.pop(index)
                        urls.pop(index)
            match += urls
#         match=re.compile('<a href="([^<]+)">htt').findall(link)
        match = match1 + match
        mainlinks = len(match1)
        numpar = len(match2)
        hostsmax = len(match)
        h = 0
        from urlparse import urlparse
        for url in match:
            url = url.strip()
            h += 1
            percent = (h * 100)/hostsmax
            msg.update(percent,'Collecting hosts - ' + str(percent) + '%')
            if msg.iscanceled(): break
            vlink=re.compile('rar|part\d+?(\.html)?$|/folder/').findall(url)
            if len(vlink)==0:
                url = re.sub('(?i)\.html$','',url)
                filename = re.compile('(?i)/([^/]*?\..{3,4})$').findall(url)
                if filename: filename = " [" + filename[0] + "]"
                else: filename = ""
                firstword = mname.partition(' ')[0]
                if re.search('(?i)'+mname.partition(' ')[0],url):
                    if re.search('(?i)1080p?',mname):
                        if not re.search('(?i)1080p?',url): continue 
                    if re.search('(?i)720p',mname):
                        if not re.search('(?i)720p?',url): continue 
                if re.search('(?i)lumfile.com|freakshare.com',url):
                    if not re.search('(?i)'+mname.partition(' ')[0],url): continue
                if re.search('(?i)1080p?',mname):
                    if re.search('(?i)720p|dvdrip|480p/|xvid',url): continue
                if re.search('(?i)720p?',mname):
                    if re.search('(?i)1080p?|dvdrip|480p|xvid',url): continue
                if re.search('(?i)xvid|480p',mname) or not re.search('(?i)1080p?|720p?',mname):
                    if re.search('(?i)1080p?|720p?',url): continue
#                 url = url.replace('ul.to','uploaded.net')
                host = urlparse(url).hostname.replace('www.','').partition('.')[0]
                hostname = host
                host = host.upper()
                if h <= mainlinks and numpar == 1: quality = mname
                else: quality = url
                match3=re.compile('(?i)(720p?|1080p?)').findall(quality)
                if match3 and not 'p' in match3[0]: match3[0] += 'p'
                match4=re.compile('mp4').findall(url)
                if len(match3)>0: host =host+' [COLOR red]'+match3[0]+'[/COLOR]'
                elif len(match4)>0: host =host+' [COLOR green]SD MP4[/COLOR]'
                else: host =host+' [COLOR blue]SD[/COLOR]'
                if main.supportedHost(hostname):
                    titles.append(host + filename)
                    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,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
                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]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
Пример #40
0
def iWatchLINKB(mname, url):
    main.GA("iWatchonline", "Watched")
    ok = True
    hname = mname
    xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)")
    mname = mname.split('   [COLOR red]')[0]
    r = re.findall('Season(.+?)Episode([^<]+)', mname)
    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'])
    }
    link = main.OPENURL(url)
    link = main.unescapes(link)
    match = re.compile('<(?:iframe|pagespeed_iframe).+?src=\"(.+?)\"').findall(
        link)
    try:
        xbmc.executebuiltin(
            "XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = main.resolve_url(match[0])
        if stream_url == False: return

        infoL = {
            'Title': infoLabels['title'],
            'Plot': infoLabels['plot'],
            'Genre': infoLabels['genre'],
            'originalTitle': main.removeColoredText(infoLabels['title'])
        }
        # 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(hname + ' ' + '[COLOR green]' + prettyName +
                        '[/COLOR]',
                        sys.argv[0] + sys.argv[2],
                        infolabels=infolabels,
                        img=str(img),
                        fanart=str(fanart),
                        is_folder=False)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
            main.ErrorReport(e)
        return ok
Пример #41
0
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
Пример #42
0
def LINKSP3(mname,murl):
    main.GA("FilesTube","Watched")
    msg = xbmcgui.DialogProgress()
    msg.create('Please Wait!','')
    msg.update(0,'Collecting hosts')
    link=main.OPENURL(murl,mobile=True,timeout = 10)
    sources=[]
    titles=[]
    ok=True
    match=re.compile('(?sim)<pre id="copy_paste_links"[^<]+?</pre>').findall(link)
    if match:
        match = re.compile('(https?://[^<]+)').findall(match[0])
    hostsmax = len(match)
    h = 0
    from urlparse import urlparse
    for url in match:
        url = url.strip()
        h += 1
        percent = (h * 100)/hostsmax
        msg.update(percent,'Collecting hosts - ' + str(percent) + '%')
        if msg.iscanceled(): break
        vlink=re.compile('rar|part\d+?(\.html)?$|/folder/').findall(url)
        if len(vlink)==0:
            host = urlparse(url).hostname.replace('www.','').partition('.')[0]
            hostname = host
            host = host.upper()
            quality = mname
            match3=re.compile('(?i)(720p?|1080p?)').findall(quality)
            if match3 and not 'p' in match3[0]: match3[0] += 'p'
            match4=re.compile('mp4').findall(url)
            if len(match3)>0:
                host =host+' [COLOR red]'+match3[0]+'[/COLOR]'
            elif len(match4)>0:
                host =host+' [COLOR green]SD MP4[/COLOR]'
            else:
                host =host+' [COLOR blue]SD[/COLOR]'
            if main.supportedHost(hostname):
                titles.append(host)
                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
Пример #43
0
def PLAY(mname, murl, thumb):

    main.GA("Animania", "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
Пример #44
0
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
Пример #45
0
def LINKSP3(mname, murl):
    main.GA("DL4Free", "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 = []
    ok = True
    match0 = re.compile(
        '(?sim)<div class="meta">Download Links</div>.*?</div>').findall(link)
    match1 = []
    match2 = []
    if match0:
        match2 = re.compile('(?sim)<p.*?</p>').findall(match0[0])
        for paragraph in reversed(match2):
            match1 += re.compile('<a href="([^"]+?)"').findall(paragraph)
    match = []
    paragraphs = re.compile('(?sim)<code>.+?</code>').findall(link)
    for paragraph in paragraphs:
        domains = re.compile('https?://([^"]+?)/[^<^\]]+').findall(paragraph)
        urls = re.compile('(https?://[^"]+?/[^<^\]]+)').findall(paragraph)
        for d in domains:
            if domains.count(d) > 1:
                while d in domains:
                    index = domains.index(d)
                    domains.pop(index)
                    urls.pop(index)
        match += urls
#         match=re.compile('<a href="([^<]+)">htt').findall(link)
    match = match1 + match
    mainlinks = len(match1)
    numpar = len(match2)
    hostsmax = len(match)
    h = 0
    from urlparse import urlparse
    for url in match:
        h += 1
        percent = (h * 100) / hostsmax
        msg.update(percent, 'Collecting hosts - ' + str(percent) + '%')
        if msg.iscanceled(): break
        vlink = re.compile('rar|part\d+?(\.html)?$|/folder/').findall(url)
        if len(vlink) == 0:
            firstword = mname.partition(' ')[0]
            if re.search('(?i)' + mname.partition(' ')[0], url):
                if re.search('(?i)1080p?', mname):
                    if not re.search('(?i)1080p?', url): continue
                if re.search('(?i)720p', mname):
                    if not re.search('(?i)720p?', url): continue
            if re.search('(?i)1080p?', mname):
                if re.search('(?i)720p|dvdrip|480p/|xvid', url): continue
            if re.search('(?i)720p?', mname):
                if re.search('(?i)1080p?|dvdrip|480p|xvid', url): continue
            if re.search('(?i)xvid|480p',
                         mname) or not re.search('(?i)1080p?|720p?', mname):
                if re.search('(?i)1080p?|720p?', url): continue
#                 url = url.replace('ul.to','uploaded.net')
            host = urlparse(url).hostname.replace('www.', '').partition('.')[0]
            hostname = host
            host = host.upper()
            if h <= mainlinks and numpar == 1: quality = mname
            else: quality = url
            match3 = re.compile('(?i)(720p?|1080p?)').findall(quality)
            if match3 and not 'p' in match3[0]: match3[0] += 'p'
            match4 = re.compile('mp4').findall(url)
            if len(match3) > 0:
                host = host + ' [COLOR red]' + match3[0] + '[/COLOR]'
            elif len(match4) > 0:
                host = host + ' [COLOR green]SD MP4[/COLOR]'
            else:
                host = host + ' [COLOR blue]SD[/COLOR]'
            if main.supportedHost(hostname):
                titles.append(host)
                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
Пример #46
0
def LINKSP2B(mname, murl):
    main.GA("Newmyvideolinks", "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, '', '', '')
        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)")
        parts = murl.partition('#@#')
        murl = parts[0]
        filename = parts[-1]
        stream_url = main.resolve_url(murl, filename)
        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=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]NewmyVideoLink[/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
Пример #47
0
def VIDEOLINKSSCEPER(mname, murl, thumb):
    main.GA("Sceper", "Watched")
    msg = xbmcgui.DialogProgress()
    msg.create("Please Wait!", "")
    msg.update(0, "Collecting hosts")
    link = main.OPENURL(murl, cookie="sceper")
    sources = []
    titles = []
    ok = True
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    match0 = re.compile('(?sim)<div class="meta">Download Links</div>.*?</div>').findall(link)
    match1 = []
    match2 = []
    if match0:
        match2 = re.compile("(?sim)<p.*?</p>").findall(match0[0])
        for paragraph in reversed(match2):
            match1 += re.compile('<a href="([^"]+?)"').findall(paragraph)
    match = []
    paragraphs = re.compile("(?sim)<p.*?</p>").findall(link)
    for paragraph in paragraphs:
        domains = re.compile('<a href="https?://([^"]+?)/[^"]+(?!jpg|gif|jpeg|png)">htt').findall(paragraph)
        urls = re.compile('<a href="([^"]+)(?!jpg|gif|jpeg|png)">htt').findall(paragraph)
        for d in domains:
            if domains.count(d) > 1:
                while d in domains:
                    index = domains.index(d)
                    domains.pop(index)
                    urls.pop(index)
        match += urls
    #         match=re.compile('<a href="([^<]+)">htt').findall(link)
    match = match1 + match
    mainlinks = len(match1)
    numpar = len(match2)
    hostsmax = len(match)
    h = 0
    from urlparse import urlparse

    for url in match:
        url = url.strip()
        h += 1
        percent = (h * 100) / hostsmax
        msg.update(percent, "Collecting hosts - " + str(percent) + "%")
        if msg.iscanceled():
            break
        vlink = re.compile("rar|part\d+?(\.html)?$|/folder/").findall(url)
        if len(vlink) == 0:
            url = re.sub("(?i)\.html$", "", url)
            filename = re.compile("(?i)/([^/]*?\..{3,4})$").findall(url)
            if filename:
                filename = " [" + filename[0] + "]"
            else:
                filename = ""
            firstword = mname.partition(" ")[0]
            if re.search("(?i)" + mname.partition(" ")[0], url):
                if re.search("(?i)1080p?", mname):
                    if not re.search("(?i)1080p?", url):
                        continue
                if re.search("(?i)720p", mname):
                    if not re.search("(?i)720p?", url):
                        continue
            if re.search("(?i)lumfile.com|freakshare.com", url):
                if not re.search("(?i)" + mname.partition(" ")[0], url):
                    continue
            if re.search("(?i)1080p?", mname):
                if re.search("(?i)720p|dvdrip|480p/|xvid", url):
                    continue
            if re.search("(?i)720p?", mname):
                if re.search("(?i)1080p?|dvdrip|480p|xvid", url):
                    continue
            if re.search("(?i)xvid|480p", mname) or not re.search("(?i)1080p?|720p?", mname):
                if re.search("(?i)1080p?|720p?", url):
                    continue
            #                 url = url.replace('ul.to','uploaded.net')
            host = urlparse(url).hostname.replace("www.", "").partition(".")[0]
            hostname = host
            host = host.upper()
            if h <= mainlinks and numpar == 1:
                quality = mname
            else:
                quality = url
            match3 = re.compile("(?i)(720p?|1080p?)").findall(quality)
            if match3 and not "p" in match3[0]:
                match3[0] += "p"
            match4 = re.compile("mp4").findall(url)
            if len(match3) > 0:
                host = host + " [COLOR red]" + match3[0] + "[/COLOR]"
            elif len(match4) > 0:
                host = host + " [COLOR green]SD MP4[/COLOR]"
            else:
                host = host + " [COLOR blue]SD[/COLOR]"
            if main.supportedHost(hostname):
                titles.append(host + filename)
                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, 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
        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]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
Пример #48
0
def LISTHOSTS(name,murl,thumb):
    name=main.removeColoredText(name)
    collect=[]
    videobug=[]
    yourupload=[]
    video44=[]
    play44=[]
    videoweed=[]
    cheesestream=[]
    videofun=[]
    byzoo=[]
    i=1
    j=1
    v=1
    p=1
    vw=1
    c=1
    vf=1
    b=1

    link=main.OPENURL(murl).replace('\/','/').replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace(' class="selected"','').replace('&rarr;','')
    """parts=re.compile('<li><a href="(http://www.animetoon.tv/.+?/\d-\d+).+?>(Part.+?)</a>').findall(link)
    print len(parts)
    if part_pages:
        for url,pname in part_pages:
            match=re.compile('</ul></div><div><.+?src="(.+?)"').findall(main.OPENURL(url))
            for url in match:
                collect.append(url)"""
    try:
        count=1
        match=re.findall('<div><iframe src="(.+?)"',link,re.I)
        for url in match:
            parts=re.compile('<li><a href="http://www.animetoon.tv/.+?/'+str(count)+'-([^<]+)">Part(.+?)</a>').findall(link)
            if len(parts)>1:
                for item,num in parts:
                    furl=url.replace('part_1','part_'+str(item))
                    collect.append(furl)
            else:
                collect.append(url)
            count=count+1
    
    except: pass
    for links in collect:
        if 'byzoo' in links:
            main.addDown2(name+' [COLOR tan]Byzoo Part '+str(b)+'[/COLOR]',links,379,thumb,'')
            byzoo.append(('Part '+str(b),links))
            b=b+1
    if byzoo and len(byzoo)>1:
        main.addDown2(name+' [COLOR tan]Byzoo Play All[/COLOR]',str(byzoo),379,thumb,'')  
    for links in collect:
        if 'videobug' in links:
            main.addDown2(name+' [COLOR blue]VideoBug Part '+str(i)+'[/COLOR]',links,379,thumb,'')
            videobug.append(('Part '+str(i),links))
            i=i+1
    if videobug and len(videobug)>1:
        main.addDown2(name+' [COLOR blue]VideoBug Play All[/COLOR]',str(videobug),379,thumb,'')  
    for links in collect:
        if 'yourupload' in links:
            main.addDown2(name+' [COLOR yellow]YourUpload Part '+str(j)+'[/COLOR]',links,379,thumb,'')
            yourupload.append(('Part '+str(j),links))
            j=j+1          
    if yourupload and len(yourupload)>1:
        main.addDown2(name+' [COLOR yellow]YourUpload Play All[/COLOR]',str(yourupload),379,thumb,'')
    for links in collect:
        if 'video44' in links:
            main.addDown2(name+' [COLOR red]Video44 Part '+str(v)+'[/COLOR]',links,379,thumb,'')
            video44.append(('Part '+str(v),links))
            v=v+1
    if video44 and len(video44)>1:
        main.addDown2(name+' [COLOR red]Video44 Play All[/COLOR]',str(video44),379,thumb,'')
    for links in collect:
        if 'play44' in links:
            main.addDown2(name+' [COLOR green]Play44 Part '+str(p)+'[/COLOR]',links,379,thumb,'')
            play44.append(('Part '+str(p),links))
            p=p+1
    if play44 and len(play44)>1:
        main.addDown2(name+' [COLOR green]Play44 Play All[/COLOR]',str(play44),379,thumb,'')
    for links in collect:
        if 'videoweed' in links:
            main.addDown2(name+' [COLOR aqua]Videoweed Part '+str(vw)+'[/COLOR]',links,379,thumb,'')
            videoweed.append(('Part '+str(vw),links))
            vw=vw+1
    if videoweed and len(videoweed)>1:
        main.addDown2(name+' [COLOR aqua]Videoweed Play All[/COLOR]',str(videoweed),379,thumb,'')
    for links in collect:
        if 'cheesestream' in links:
            main.addDown2(name+' [COLOR purple]Cheesestream Part '+str(c)+'[/COLOR]',links,379,thumb,'')
            cheesestream.append(('Part '+str(c),links))
            c=c+1
    if cheesestream and len(cheesestream)>1:
        main.addDown2(name+' [COLOR purple]Cheesestream Play All[/COLOR]',str(cheesestream),379,thumb,'')
    for links in collect:
        if 'videofun' in links:
            main.addDown2(name+' [COLOR maroon]Videofun Part '+str(vf)+'[/COLOR]',links,379,thumb,'')
            videofun.append(('Part '+str(vf),links))
            vf=vf+1
    if videofun and len(videofun)>1:
        main.addDown2(name+' [COLOR maroon]Videofun Play All[/COLOR]',str(videofun),379,thumb,'')
Пример #49
0
def LISTSTREAMS(mname, murl):
    mname = main.removeColoredText(mname)
    awayteam = mname.split(' at ')[0]
    hometeam = mname.split(' at ')[1]
    match = re.compile('<live bitrate="0">([^<]+ipad.m3u8)</live>',
                       re.DOTALL).findall(murl)
    if len(match) == 0:
        link = main.OPENURL(
            'http://breadwinka.com/get_games.php?client=nhl&playerclient=hop')
        link = link.replace('\r',
                            '').replace('\n', '').replace('\t', '').replace(
                                '&nbsp;', '').replace('  ', '')
        match = re.compile(
            '<home_team>' + hometeam.replace(' ', '') +
            '</home_team><away_team>' + awayteam.replace(' ', '') +
            '</away_team><assignments><assignment.+?name="away"><ipad_url>(.+?)</ipad_url></assignment><assignment.+?name="home"><ipad_url>(.+?)</ipad_url>',
            re.DOTALL).findall(link)
        for away, home in match:
            pass
        link = main.OPENURL(home)
        url1 = home.split('_hd')[0]
        link = link.replace('\r',
                            '').replace('\n',
                                        '').replace('\t',
                                                    '').replace('&nbsp;', '')
        home = re.compile('BANDWIDTH=\d+(.+?.mp4.m3u8)',
                          re.DOTALL).findall(link)
        for i in home:
            f = i.split('_hd_')[1]
            bitrate = f.split('_ipad_')[0]
            final = url1 + '_hd_' + f
            main.addPlayc(hometeam + ' Home' + ' ' + bitrate + ' Kbps', final,
                          396, art + '/nhl.png', '', '', '', '', '')
        link2 = main.OPENURL(away)
        url2 = away.split('_hd')[0]
        link2 = link2.replace('\r', '').replace('\n',
                                                '').replace('\t', '').replace(
                                                    '&nbsp;', '')
        away = re.compile('BANDWIDTH=\d+(.+?.mp4.m3u8)',
                          re.DOTALL).findall(link2)
        for i in away:
            f = i.split('_hd_')[1]
            bitrate = f.split('_ipad_')[0]
            final = url2 + '_hd_' + f
            main.addPlayc(awayteam + ' Away' + ' ' + bitrate + ' Kbps', final,
                          396, art + '/nhl.png', '', '', '', '', '')
    else:
        url1 = match[0].split('_hd')[0]
        link = main.OPENURL(match[0])
        link = link.replace('\r',
                            '').replace('\n',
                                        '').replace('\t',
                                                    '').replace('&nbsp;', '')
        home = re.compile('BANDWIDTH=\d+(.+?_ipad.m3u8)',
                          re.DOTALL).findall(link)
        for i in home:
            f = i.split('_hd_')[1]
            bitrate = f.split('_ipad.m3u8')[0]
            final = url1 + '_hd_' + f
            main.addPlayc(hometeam + ' Home' + ' ' + bitrate + ' Kbps', final,
                          396, art + '/nhl.png', '', '', '', '', '')
        url2 = match[1].split('_hd')[0]
        link2 = main.OPENURL(match[1])
        link2 = link2.replace('\r', '').replace('\n',
                                                '').replace('\t', '').replace(
                                                    '&nbsp;', '')
        away = re.compile('BANDWIDTH=\d+(.+?_ipad.m3u8)',
                          re.DOTALL).findall(link2)
        for i in away:
            f = i.split('_hd_')[1]
            bitrate = f.split('_ipad.m3u8')[0]
            final = url2 + '_hd_' + f
            main.addPlayc(awayteam + ' Away' + ' ' + bitrate + ' Kbps', final,
                          396, art + '/nhl.png', '', '', '', '', '')