예제 #1
0
def play_first_playable(params):
    hosters = scrap_hosters_list(params.get("url"))

    # If the hoster list is empty, then there is only one link and it is on the
    # title's main page.
    if not hosters:
        hosters.append((params.get("url"), '', '', '', ''))
    direct_link = ''
    for url, hoster_name, _, _, _ in hosters:
        hosted_media_url, alternatives = scrap_stream_url(url, True)
        if hosted_media_url:
            try:
                server_name, direct_link = resolve_media_direct_link(
                    hosted_media_url)
            except RuntimeError:
                for alternative in alternatives:
                    hosted_media_url, _ = scrap_stream_url(url, False)
                    if hosted_media_url:
                        try:
                            server_name, direct_link = resolve_media_direct_link(
                                hosted_media_url)
                        except RuntimeError:
                            pass
        if direct_link:
            plugintools.play_resolved_url(direct_link)
            link_location = hoster_name if hoster_name else server_name
            xbmc.sleep(500)
            xbmcgui.Dialog().notification(MYNAME,
                                          'Link found at ' + link_location)
            break
    if not direct_link:
        xbmc.sleep(500)
        xbmcgui.Dialog().notification(MYNAME, 'No links found',
                                      xbmcgui.NOTIFICATION_WARNING)
예제 #2
0
def nstr(pageurl,ref,body):
    plugintools.log("[PalcoTV 0.3.0].nstr")
    print 'pageurl',pageurl
    # http://www.direct2watch.com/embedplayer.php?width=653&height=410&channel=14&autoplay=true

    p1 = re.compile(ur'channel=?\'?"?([^\'"\&,;]+)')
    p2 = re.compile(ur'width=?\'?"?([^\'"\&,;]+)')
    p3 = re.compile(ur'height=?\'?"?([^\'"\&,;]+)')
    f1=re.findall(p1, pageurl);f2=re.findall(p2, pageurl);f3=re.findall(p3, pageurl);#res=list(set(f));
    print 'f1',f1
    print 'f2',f2
    print 'f3',f3
    c=f1[0];w=f2[0];h=f3[0]
    url='http://www.direct2watch.com/embedplayer.php?width='+w+'&height='+h+'&channel='+c+'&autoplay=true';body=''
    plugintools.log("url= "+url)
    plugintools.log("referer= "+ref)
    bodi=curl_frame(url,ref,body)
    print "\nURLXXX = "+url+"\nREFXXX = "+ref#+"\n"+bodi
    tkserv='';strmr='';plpath='';swf='';vala='';
    vals=ioncube.ioncube1(bodi)
    print "URL = "+url;print "REF = "+ref;
    tkserv=vals[0][1];strmr=vals[1][1].replace("\/","/");plpath=vals[2][1].replace(".flv","");swf=vals[3][1];
    ref=url;url=tkserv;bodi=curl_frame(url,ref,body);
    p='token":"([^"]+)';token=plugintools.find_single_match(bodi,p);#print token
    media_url = strmr+'/'+plpath+' swfUrl='+swf+' token='+token+' live=1 timeout=15 swfVfy=1 pageUrl='+ref
    plugintools.play_resolved_url(media_url)
    print media_url    
예제 #3
0
def multihockey(params):
    plugintools.log("[%s %s] Onhockey multilink " % (addonName, addonVersion))
    channelist = params.get("plot")
    channelist = channelist.split(", ")
    partido = params.get("title")

    serverlist = []
    for item in channelist:
        if item.find("youtube") >= 0:
            serverlist.append(partido + " [Youtube]")
        elif item.find("castalba") >= 0:
            serverlist.append(partido + " [Castalba]")
        elif item.find("sawlive") >= 0:
            serverlist.append(partido + " [Sawlive]")
        elif item.find("acestream") >= 0:
            serverlist.append(partido + " [Acestream]")
        elif item.find("sopcast") >= 0:
            serverlist.append(partido + " [Sopcast]")
        elif item.find("liveall") >= 0:
            serverlist.append(partido + " [Liveall]")
        else:
            serverlist.append(partido + " [Flash]")

    xbmc.executebuiltin("Container.SetViewMode(515)")
    try:
        selector = plugintools.selector(serverlist, partido)
        if selector > -1:
            url = channelist[selector]
            if url.find("acestream") >= 0:
                #http://onhockey.tv/youtube.php?channel=sDD697xbZ5A, http://onhockey.tv/liveall.php?channel=fbfdb35g, http://onhockey.tv/streamhd.php?channel=4, http://onhockey.tv/worldsport.php?channel=7, http://onhockey.tv/live9.php?channel=30, http://onhockey.tv/cricfree.php?channel=premiersports, http://onhockey.tv/acestream.php?channel=fb2080a96e762e926a33e61c70bd74edb2beabdf, http://onhockey.tv/acestream.php?channel=548d364053e6650458e3f347dfbda0dd852781da, http://onhockey.tv/sopcast.php?channel=146666
                # http://onhockey.tv/acestream.php?channel=548d364053e6650458e3f347dfbda0dd852781da
                ace = url.replace("http://onhockey.tv/acestream.php?channel=",
                                  "")
                url = p2p_builder_url(ace, 'hockey', p2p="ace")
                xbmc.executebuiltin('XBMC.RunPlugin(' + url + ')')
            elif url.find("sopcast") >= 0:
                # http://onhockey.tv/sopcast.php?channel=146666
                sop = url.replace("http://onhockey.tv/sopcast.php?channel=",
                                  "")
                url = p2p_builder_url(sop, 'hockey', p2p="sop")
                xbmc.executebuiltin('XBMC.RunPlugin(' + url + ')')
            elif url.find("youtube") >= 0:
                # http://onhockey.tv/youtube.php?channel=sDD697xbZ5A
                yt_url = url.replace("http://onhockey.tv/youtube.php?channel=",
                                     "")
                url = 'plugin://plugin.video.youtube/play/?video_id=' + yt_url
                plugintools.log("URL= " + url)
                plugintools.play_resolved_url(url)
            else:
                ref = 'http://onhockey.tv/'
                url = 'plugin://plugin.video.SportsDevil/?mode=1&item=catcher%3dstreams%26url=' + url + '%26referer=' + ref
                plugintools.log("URL= " + url)
                xbmc.executebuiltin('XBMC.RunPlugin(' + url + ')')

    except KeyboardInterrupt:
        pass
    except IndexError:
        raise

    xbmc.executebuiltin("Container.SetViewMode(515)")
예제 #4
0
def launch_torrent(params):
    plugintools.log('[%s %s] launch_torrent... %s' %
                    (addonName, addonVersion, repr(params)))
    url = params.get("url")

    addon_torrent = plugintools.get_setting("addon_torrent")
    #url = urllib.quote_plus(url)
    if addon_torrent == "0":  # Stream (por defecto)
        url = 'plugin://plugin.video.stream/play/' + url
        plugintools.log("Iniciando Stream... " + url)
    elif addon_torrent == "1":  # Pulsar
        url = 'plugin://plugin.video.pulsar/play?uri=' + url
        plugintools.log("Iniciando Pulsar... " + url)
    elif addon_torrent == "2":  # XBMCtorrent
        url = 'plugin://plugin.video.xbmctorrent/play/' + url
        plugintools.log("Iniciando XBMCtorrent... " + url)
    elif addon_torrent == "3":  # Plexus
        plugintools.log("Iniciando Plexus... " + url)
        url = 'plugin://plugin.program.plexus/?url=http://' + url + '&mode=1&name='
    elif addon_torrent == "4":  # Quasar
        url = 'plugin://plugin.video.quasar/play?uri=' + url
        plugintools.log("Iniciando Quasar... " + url)

    plugintools.log("Torrent File= " + url)
    plugintools.play_resolved_url(url)
예제 #5
0
def goltube2(params):
    plugintools.log("[%s %s] GolTube " % (addonName, addonVersion))

    thumbnail = params.get("thumbnail")
    fanart = params.get("fanart")
    url = params.get("url")

    data = gethttp_referer_headers(url, url)
    url_item = plugintools.find_single_match(data, '<iframe src="([^"]+)')
    plugintools.log("url_item= " + url_item)
    data = gethttp_referer_headers(url_item, url_item)
    plugintools.log("data= " + data)

    urls = []
    titles = []
    url_media = plugintools.find_multiple_matches(data, '<source src="([^"]+)')
    i = 1
    for entry in url_media:
        plugintools.log("Media: " + entry)
        quality = plugintools.find_single_match(entry, 'Ves_[0-9]+').replace(
            "Ves_", "")
        urls.append(entry)
        titles.append('Opción ' + str(i) + ' [COLOR lightyellow][I](' +
                      quality + ')[/I][/COLOR]')
        i = i + 1

    print urls
    seleccion = plugintools.selector(titles, 'GolTube')
    if seleccion >= 0:
        plugintools.play_resolved_url(urls[seleccion])
예제 #6
0
def yotta(params):
    plugintools.log('[%s %s] Yotta %s' %
                    (addonName, addonVersion, repr(params)))

    url = params.get("url")
    headers = {
        "User-Agent":
        "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14",
        'Referer': referer
    }
    r = requests.get(url, headers=headers)
    data = r.content
    url_js = plugintools.find_single_match(data, "\.get\('(.*?)'")
    url_js = urllib.unquote(url_js)
    r = requests.get(url_js, headers=headers)
    data_js = r.content
    try:
        js = json.loads(data_js)
        media_url = js["sources"][0]['file']
        print '$' * 218 + '- By Movies Ultra -' + '$' * 218, media_url, '$' * 455
    except:
        xbmc.executebuiltin(
            "Notification(%s,%s,%i,%s)" %
            ('Movies UltraTV', "Archivo no disponible", 3, art + 'icon.png'))
    plugintools.play_resolved_url(media_url)
예제 #7
0
def ucaster(url, ref, res):
    p1 = re.compile(ur'channel=?\'?"?([^\'"\&,;]+)')
    f1 = re.findall(p1, str(res))
    p2 = re.compile(ur'width=?\'?"?([^\'"\&,;]+)')
    f2 = re.findall(p2, str(res))
    p3 = re.compile(ur'height=?\'?"?([^\'"\&,;]+)')
    f3 = re.findall(p3, str(res))
    c = f1[0]
    w = f2[0]
    h = f3[0]
    url = 'http://www.ucaster.eu/embedded/' + c + '/1/' + w + '/' + h
    body = ''
    #print "UCASTER body="+bodi;sys.exit();
    bodi = curl_frame(url, ref, body)
    p = 'SWFObject\(\'?"?([^\'"]+)'
    swf = 'http://www.ucaster.eu' + plugintools.find_single_match(bodi, p)
    p = 'FlashVars\'?"?,?\s?\'?"?([^\'"]+)'
    flashvars = plugintools.find_single_match(bodi, p)
    print flashvars
    p = re.compile(ur'\&?.*?=([^\&]+)')
    flashvars = re.findall(p, flashvars)
    print flashvars
    id = flashvars[0]
    c = flashvars[1]
    lb = 'http://www.ucaster.eu:1935/loadbalancer'
    lb = plugintools.read(lb)
    lb = plugintools.find_single_match(lb, 'redirect=(.*)')
    #print lb;sys.exit()
    #rtmp://109.123.126.66/live/ playpath=canal89?id=76120 swfUrl=http://www.ucaster.eu/static/scripts/fplayer.swf swfVfy=1 conn=S:OK live=true pageUrl=
    media_url = 'rtmp://' + lb + '/live/ playpath=' + c + '?id=' + id + ' swfUrl=' + swf + ' swfVfy=1 conn=S:OK live=true pageUrl=' + url
    plugintools.play_resolved_url(media_url)
    print "MEDIA URL=" + media_url
def play(params):
    url="http://89.238.150.152:8777/wupymmluk2ie2cbd4m435f5aalojml6xavbsuouby664djmvb6h6edclbi/v.mp4.flv"
    urlsub="http://sc.miratuserie.tv/americanhorrorstory/subs/404.srt"
    player=xbmc.Player()

    plugintools.play_resolved_url(url) #(reproduce el video)
    player.setSubtitles(urlsub)
예제 #9
0
def II11i1iIiII1(params):
    plugintools.log(pnimi + O0O("UExBWSBWT0Qg") + repr(params))
    if vanemalukk == "true":
        IIIII = params.get(o0OOO("dGl0bGU="))
        ooooooO0oo(IIIII)
    I1I111 = params.get(I1IiI("dXJs"))
    plugintools.play_resolved_url(I1I111)
예제 #10
0
def run():
    plugintools.log("IPTV Client")
    # Get params
    openlist = True
    params = plugintools.get_params()
    if params.get("action") is None:
        main_list(params)
    elif params.get("action") == "play":
        plugintools.play_resolved_url( params.get("url") )
    elif params.get("action") == "updatexmltv":
        print "RUNNING updatexmltv"
        guide_sources      = json.loads(base64.b64decode(params.get("guide_sources")))
        basePath           = base64.b64decode(params.get("basePath"))
        refresh_local      = base64.b64decode(params.get("refresh_local"))
        available_channels = json.loads(base64.b64decode(params.get("available_channels")))
        from resources.libs import custom_xmltv
        data, channels, programmes = custom_xmltv.process_files(sources=guide_sources, base=basePath, refresh_local=refresh_local, channel_filter=available_channels)
        custom_xmltv.write_final_xmltv(channels, programmes, file=epg_file)
    elif params.get("action").split(".")[0] == "category":
        print 'params.get("action").split("category.")[1]'
        cat_dict = params.get("action").split("category.")[1].rstrip().strip()
        print cat_dict
        print base64.urlsafe_b64decode(cat_dict)
        details  = json.loads(base64.urlsafe_b64decode(cat_dict))
        url      = urllib.unquote_plus(details["url"])
        category = details["category"]
        populate(url, use_cache=True, category=category)
    else:
        pass
    if openlist:
        plugintools.close_item_list()
예제 #11
0
def ezcast(url, ref, res):
    #print "NEDEFINIT";sys.exit()
    p = re.compile(ur'(width|height|channel)=\'?"?([^\,\'"]+)')
    par = re.findall(p, str(res))
    #print par;
    w = par[0][1]
    h = par[1][1]
    c = par[2][1]
    ref = url
    url = 'http://www.ezcast.tv/embedded/' + c + '/1/' + w + '/' + h
    body = ''
    bodi = curl_frame(url, ref, body)
    p = 'SWFObject\(\'?"?([^\'"]+)'
    swf = 'http://www.ezcast.tv' + plugintools.find_single_match(bodi, p)
    p = 'FlashVars\'?"?,?\s?\'?"?([^\'"]+)'
    flashvars = plugintools.find_single_match(bodi, p)
    p = re.compile(ur'\&?=([^\&]+)')
    flvs = re.findall(p, flashvars)
    id = flvs[0]
    c = flvs[1]
    lb = 'http://ezcast.tv:1935/loadbalancer'
    lb = plugintools.read(lb)
    lb = plugintools.find_single_match(lb, 'redirect=(.*)')
    media_url = 'rtmp://' + lb + '/live/ playpath=' + c + '?id=' + id + ' swfUrl=' + swf + ' swfVfy=1 conn=S:OK live=true pageUrl=' + url
    plugintools.play_resolved_url(media_url)
예제 #12
0
def populate_and_play(url, name):
    info = getinfo(url)
    #print info
    if info["user_info"]['auth'] == 1:
        username = info["user_info"]["username"]
        password = info["user_info"]["password"]
        channels = []
        #dict = {23:{'num':7}, 43:{'num':3}, 2:{'num':9}}
        for x in info["available_channels"]:
            channels.append(info["available_channels"][x])
        channels = sorted(channels, key=lambda k: k['num'])
        channels_ini = open(os.path.join(gd.datapath, "addons.ini"), "w")
        channels_ini.write("[plugin.video.livetv]\n")
        available_channels = []
        for chan in channels:
            title = chan["name"]
            if title == name:
                plot      = chan["name"]
                if not "http" in info["server_info"]["url"]:
                    url   = "http://"+info["server_info"]["url"]+":"+info["server_info"]["port"]+"/live/"+username+"/"+password+"/"+chan["stream_id"]+vidcont
                else: url = info["server_info"]["url"]+":"+info["server_info"]["port"]+"/live/"+username+"/"+password+"/"+chan["stream_id"]+vidcont
                thumbnail = chan["stream_icon"]
                fanart    = ''
                itemurl = '%s?action=%s&title=%s&url=%s&thumbnail=%s&plot=%s' % ( sys.argv[ 0 ] , "play" , urllib.quote_plus( title ) , urllib.quote_plus(url) , urllib.quote_plus( thumbnail ) , urllib.quote_plus( plot ))
                plugintools.play_resolved_url( itemurl )
            chan_title = title.split(': ')
            if len(chan_title) > 1: chan_title = chan_title[1]
            else: chan_title = chan_title[0]
            if not '----' in chan_title:
                channels_ini.write("%s=plugin://plugin.video.iptv/?name=%s&mode=play\n" % (chan_title, urllib.quote_plus( title )))
                available_channels.append(chan_title)
        with open(channels_json, 'w') as outfile:
            json.dump(available_channels, outfile)
        channels_ini.close()
예제 #13
0
def playerapp1(url,ref,body):
    k=url;hidd='type="hidden"\sid="([^"]+)"\svalue="([^"]*)';hidd=plugintools.find_multiple_matches(body,hidd);#print hidd;
    swfUrl='http://www.playerapp1.pw/jwplayer5/addplayer/jwplayer.flash.swf';Epoc_mil=str(int(time.time()*1000));EpocTime=str(int(time.time()));    
    app=plugintools.find_single_match(hidd[1][1].decode('base64').replace('\\',''),'1735\/([^"]+)');#app=app.replace("vod", "redirect")
    q='%s app=%s playpath=%s flashver=WIN%5C2017,0,0,134 swfUrl=%s swfVfy=1 pageUrl=%s live=1 timeout=15';#dzap,tvdirecto    
    w=hidd[1][1].decode('base64').replace('\\','').replace("vod","redirect")+' app='+app+' playpath='+hidd[0][1].decode('base64')+' flashver=WIN%5C2017,0,0,134 swfUrl='+swfUrl+' swfVfy=1 pageUrl='+k+' live=1 timeout=15'
    plugintools.play_resolved_url(w);sys.exit()
def play_freetvcast(freetvcast_user):
    plugintools.log("[Movies-Online 0.0.1].freetvcast User= "******"rtmp") + " playpath=" + freetvcast_user.get("playpath") + " token=" + freetvcast_user.get("token") + " swfUrl=http://freetvcast.pw/player.swf pageUrl=" + freetvcast_user.get("pageurl") + " live=true timeout=15"
    url = url.strip()
    plugintools.play_resolved_url(url)       
예제 #15
0
def allmyvideos(params):
    plugintools.log("[PalcoTV-0.3.0].allmyvideos " + repr(params))

    url = params.get("url")
    url = url.split("/")
    url_fixed = 'http://www.allmyvideos.net/' + 'embed-' + url[3] + '.html'
    plugintools.log("url_fixed= " + url_fixed)

    request_headers = []
    request_headers.append([
        "User-Agent",
        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"
    ])
    body, response_headers = plugintools.read_body_and_headers(
        url_fixed, headers=request_headers)
    plugintools.log("data= " + body)

    r = re.findall('"file" : "(.+?)"', body)
    for entry in r:
        plugintools.log("vamos= " + entry)
        if entry.endswith("mp4?v2"):
            url = entry
            params["url"] = url
            plugintools.log("url= " + url)
            plugintools.play_resolved_url(url)
            xbmc.executebuiltin(
                "Notification(%s,%s,%i,%s)" %
                ('PalcoTV', "Resolviendo enlace...", 3, art + 'icon.png'))
def playedto(params):
    plugintools.log("[Movies-Online 0.0.1].playedto " + repr(params))

    url = params.get("url")
    url = url.split("/")
    url_fixed = "http://played.to/embed-" + url[3] +  "-640x360.html"
    plugintools.log("url_fixed= "+url_fixed)

    request_headers=[]
    request_headers.append(["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"])
    body,response_headers = plugintools.read_body_and_headers(url_fixed, headers=request_headers)
    plugintools.log("data= "+body)

    r = re.findall('file(.+?)\n', body)
    
    for entry in r:
        
        entry = entry.replace('",', "")
        entry = entry.replace('"', "")
        entry = entry.replace(': ', "")
        entry = entry.strip()
        plugintools.log("vamos= "+entry)
        
        if entry.endswith("flv"):
            plugintools.play_resolved_url(entry)
            xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "Resolviendo enlace...", 3 , art+'icon.png'))            
            params["url"]=entry
            plugintools.log("URL= "+entry)
예제 #17
0
def restart_service(params):
    plugintools.log(pnimi+get_live("UExBWSBWT0Qg")+repr(params))
    if vanemalukk == "true":
       pealkiri = params.get(sync_data("dGl0bGU="))
       vanema_lukk(pealkiri)
    lopplink = params.get(vod_channels("dXJs"))
    plugintools.play_resolved_url( lopplink )
예제 #18
0
파일: default.py 프로젝트: bialagary/mw
def play_livetv(params):
    plugintools.log("ruyaiptv.play_livetv "+repr(params))

    token = plugintools.get_setting("token")
    if token=="":
        return

    mediaurl = params.get("url")
    plugintools.log("ruyaiptv.play_livetv mediaurl="+repr(mediaurl))
    
    if "|" in params.get("url"):

        if plugintools.get_setting("quality_selector_live")=="0":
            plugintools.log("ruyaiptv.play_livetv asking for quality")
            selected = plugintools.selector(["Watch in SD","Watch in HD"],"Select quality")
            if selected==-1:
                return
        elif plugintools.get_setting("quality_selector_live")=="1":
            plugintools.log("ruyaiptv.play_livetv default to SD quality")
            selected = 0
        elif plugintools.get_setting("quality_selector_live")=="2":
            plugintools.log("ruyaiptv.play_livetv default to HD quality")
            selected = 1

        mediaurl = params.get("url").split("|")[selected]
        plugintools.log("ruyaiptv.play_livetv mediaurl="+repr(mediaurl))

    plugintools.log("ruyaiptv.play_livetv mediaurl="+repr(mediaurl))
    mediaurl = api.get_livetv_url(token,mediaurl)
    plugintools.log("ruyaiptv.play_livetv mediaurl="+repr(mediaurl))
    plugintools.play_resolved_url( mediaurl )
예제 #19
0
def play_freetvcast(freetvcast_user):
    plugintools.log("[PalcoTV-0.3.0].freetvcast User= "******"rtmp") + " playpath=" + freetvcast_user.get("playpath") + " token=" + freetvcast_user.get("token") + " swfUrl=http://freetvcast.pw/player.swf pageUrl=" + freetvcast_user.get("pageurl") + " live=true timeout=15"
    url = url.strip()
    plugintools.play_resolved_url(url)       
예제 #20
0
def play_resolvers(params):

    transcoder = params.get("url")
    videouri = params.get("page")
    cookie_sess = params.get("extra")
    transcoder = plugintools.find_single_match(
        transcoder, '(http.*?)transcoder') + 's/transcoder'

    headers = {
        'Host': 'tv-vip.com',
        'User-Agent':
        'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0',
        'Accept': 'application/json, text/javascript, */*; q=0.01',
        'Accept-Language': 'es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3',
        'Accept-Encoding': 'gzip, deflate',
        'DNT': '1',
        'X-Requested-With': 'XMLHttpRequest',
        'Referer': referer,
        'Connection': 'keep-alive',
        'Cache-Control': 'max-age=0',
        '__cfduid': cookie_sess
    }

    #http://tv-vip.com/video-prod/s/uri?uri=/transcoder/La_colina_de_la_hamburguesa.mp4/default/La_colina_de_la_hamburguesa.mp4&_=1468107896
    videouri_request = 'http://tv-vip.com/video-prod/s/uri?uri=/transcoder' + urllib.quote_plus(
        videouri) + '&_=' + timestp()
    r = requests.get(videouri_request, allow_redirects=False, headers=headers)
    resp = r.text
    heads = r.headers
    data_js = json.loads(resp)
    media_url = transcoder + videouri + "?t=" + str(
        data_js['t']) + "&m=" + data_js['m'] + "&b=" + data_js['b']
    print '$' * 78 + '- Movies Ultra -' + '$' * 78, media_url, '$' * 175
    plugintools.play_resolved_url(media_url)
def play_video(params):
    plugintools.log('[%s %s] Play Video %s' %
                    (addonName, addonVersion, repr(params)))

    url = params.get("url")
    headers = {
        "User-Agent":
        "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14",
        'Referer': referer
    }
    r = requests.get(url, headers=headers)
    data = r.content
    try:
        url_redir = plugintools.find_single_match(
            data, '<embed class=".*?&file=(.*?)"')
        r = requests.get(url_redir, allow_redirects=False)
        time.sleep(5)
        media_url = r.headers['location']
        if media_url == "":
            xbmc.executebuiltin(
                "Notification(%s,%s,%i,%s)" %
                ('PalcoTV', "El Servidor ha Denegado el Acceso", 3,
                 art + 'icon.png'))
        else:
            print '$' * 45 + '- By PalcoTV Team -' + '$' * 45, media_url, '$' * 109
            plugintools.play_resolved_url(media_url)
    except:
        xbmc.executebuiltin(
            "Notification(%s,%s,%i,%s)" %
            ('PalcoTV', "Archivo no disponible", 3, art + 'icon.png'))
예제 #22
0
파일: default.py 프로젝트: c0ns0le/YCBuilds
def play_first_playable(params):
    hosters = scrap_hosters_list(params.get("url"))

    # If the hoster list is empty, then there is only one link and it is on the
    # title's main page.
    if not hosters:
        hosters.append((params.get("url"), '', '', '', ''))
    direct_link = ''
    for url, hoster_name, _, _, _ in hosters:
        hosted_media_url, alternatives = scrap_stream_url(url, True)
        if hosted_media_url:
            try:
                server_name, direct_link = resolve_media_direct_link(hosted_media_url)
            except RuntimeError:
                for alternative in alternatives:
                    hosted_media_url, _ = scrap_stream_url(url, False)
                    if hosted_media_url:
                        try:
                            server_name, direct_link = resolve_media_direct_link(hosted_media_url)
                        except RuntimeError:
                            pass
        if direct_link:
            plugintools.play_resolved_url(direct_link)
            link_location = hoster_name if hoster_name else server_name
            xbmc.sleep(500)
            xbmcgui.Dialog().notification(MYNAME, 'Link found at ' + link_location)
            break
    if not direct_link:
        xbmc.sleep(500)
        xbmcgui.Dialog().notification(MYNAME, 'No links found', xbmcgui.NOTIFICATION_WARNING)
예제 #23
0
def restart_service(params):
    plugintools.log(pnimi+get_live("UExBWSBWT0Qg")+repr(params))
    if vanemalukk == "true":
       pealkiri = params.get(sync_data("dGl0bGU="))
       vanema_lukk(pealkiri)
    lopplink = params.get(vod_channels("dXJs"))
    plugintools.play_resolved_url( lopplink )
예제 #24
0
def playedto(params):
    plugintools.log("[PalcoTV-0.3.0].playedto " + repr(params))

    url = params.get("url")
    url = url.split("/")
    url_fixed = "http://played.to/embed-" + url[3] + "-640x360.html"
    plugintools.log("url_fixed= " + url_fixed)

    request_headers = []
    request_headers.append([
        "User-Agent",
        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"
    ])
    body, response_headers = plugintools.read_body_and_headers(
        url_fixed, headers=request_headers)
    plugintools.log("data= " + body)

    r = re.findall('file(.+?)\n', body)

    for entry in r:

        entry = entry.replace('",', "")
        entry = entry.replace('"', "")
        entry = entry.replace(': ', "")
        entry = entry.strip()
        plugintools.log("vamos= " + entry)

        if entry.endswith("flv"):
            plugintools.play_resolved_url(entry)
            xbmc.executebuiltin(
                "Notification(%s,%s,%i,%s)" %
                ('PalcoTV', "Resolviendo enlace...", 3, art + 'icon.png'))
            params["url"] = entry
            plugintools.log("URL= " + entry)
예제 #25
0
def ninestreams(params):
    plugintools.log("[PalcoTV-0.3.0].ninestreams "+repr(params))
    url_user = {}
    
    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")         
            url_user["rtmp"]=entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"]=entry            
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"]=entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"]=entry          
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"]=entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"]=entry

    plugintools.log("URL_user dict= "+repr(url_user)) 
    pageurl = url_user.get("pageurl")
    
    # Controlamos ambos casos de URL: Único link (pageUrl) o link completo rtmp://...
    if pageurl is None:
        pageurl = url_user.get("url")
        
    referer= url_user.get("referer")
    if referer is None:
        referer = 'http://verdirectotv.com/tv/documentales/history.html'
    channel_id = re.compile('channel=([^&]*)').findall(pageurl)
    print channel_id
    channel_id = channel_id[0]
    # http://www.9stream.com/embedplayer.php?width=650&height=400&channel=143&autoplay=true

    if pageurl.find("embedplayer.php") >= 0:
        pageurl = 'http://www.9stream.com/embedplayer.php?width=650&height=400&channel=' + channel_id + '&autoplay=true'
        url_user["pageurl"]=pageurl
        print 'pageurl',pageurl
        print 'referer',referer
        body = gethttp_headers(pageurl, referer)
        getparams_ninestream(url_user, body)
        url = 'rtmp://' + url_user.get("ip") + ':1935/verdirectotvedge/_definst_/ app=verdirectotvedge/_definst_/?xs=' + url_user.get("ninetok") + ' playpath=' + url_user.get("playpath") + ' token=' + url_user.get("token") + ' flashver=WIN%2011,9,900,117 swfUrl=http://www.9stream.com/player/player_orig_XXXXX.swf pageUrl=' + url_user.get("pageurl") + ' live=1 swfVfy=1 timeout=10'
        plugintools.play_resolved_url(url)        
    else:
        pageurl = 'http://www.9stream.com/embedplayer_2.php?width=650&height=400&channel=' + channel_id + '&autoplay=true'
        url_user["pageurl"]=pageurl
        print 'pageurl',pageurl
        print 'referer',referer
        body = gethttp_headers(pageurl, referer)
        getparams_ninestream(url_user, body)
        url = 'rtmp://' + url_user.get("ip") + ':1935/verdirectotvedge/_definst_/ app=verdirectotvedge/_definst_/?xs=' + url_user.get("ninetok") + ' playpath=' + url_user.get("playpath") + ' token=' + url_user.get("token") + ' flashver=WIN%2011,9,900,117 swfUrl=http://www.9stream.com/player/player_orig_XXXXX.swf pageUrl=' + url_user.get("pageurl") + ' live=1 swfVfy=1 timeout=10'
        plugintools.play_resolved_url(url)        
예제 #26
0
def allmyvideos(params):
    plugintools.log("[tvwin-0.1.0].allmyvideos " + repr(params))

    url = params.get("url")
    url = url.split("/")
    url_fixed = "http://www.allmyvideos.net/" + "embed-" + url[3] + ".html"
    plugintools.log("url_fixed= " + url_fixed)

    request_headers = []
    request_headers.append(
        [
            "User-Agent",
            "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31",
        ]
    )
    body, response_headers = plugintools.read_body_and_headers(url_fixed, headers=request_headers)
    plugintools.log("data= " + body)

    r = re.findall('"file" : "(.+?)"', body)
    for entry in r:
        plugintools.log("vamos= " + entry)
        if entry.endswith("mp4?v2"):
            url = entry + "&direct=false"
            params["url"] = url
            plugintools.log("url= " + url)
            plugintools.play_resolved_url(url)
            xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ("TvWin", "Resolviendo enlace...", 3, art + "s.png"))
예제 #27
0
def nstr(pageurl,ref,body):
    plugintools.log("[PalcoTV 0.3.0].nstr")
    print 'pageurl',pageurl
    # http://www.direct2watch.com/embedplayer.php?width=653&height=410&channel=14&autoplay=true
    p1 = re.compile(ur'channel=?\'?"?([^\'"\&,;]+)')
    p2 = re.compile(ur'width=?\'?"?([^\'"\&,;]+)')
    p3 = re.compile(ur'height=?\'?"?([^\'"\&,;]+)')
    f1=re.findall(p1, pageurl);f2=re.findall(p2, pageurl);f3=re.findall(p3, pageurl);#res=list(set(f));
    print 'f1',f1
    print 'f2',f2
    print 'f3',f3
    c=f1[0];w=f2[0];h=f3[0]
    url='http://www.direct2watch.com/embedplayer.php?width='+w+'&height='+h+'&channel='+c+'&autoplay=true';body=''
    plugintools.log("url= "+url)
    plugintools.log("referer= "+ref)
    bodi=curl_frame(url,ref,body)
    print "\nURLXXX = "+url+"\nREFXXX = "+ref#+"\n"+bodi
    tkserv='';strmr='';plpath='';swf='';vala='';
    vals=ioncube.ioncube1(bodi)
    print "URL = "+url;print "REF = "+ref;
    tkserv=vals[0][1];strmr=vals[1][1].replace("\/","/");plpath=vals[2][1].replace(".flv","");swf=vals[3][1];
    ref=url;url=tkserv;bodi=curl_frame(url,ref,body);
    p='token":"([^"]+)';token=plugintools.find_single_match(bodi,p);#print token
    media_url = strmr+'/'+plpath+' swfUrl='+swf+' token='+token+' live=1 timeout=15 swfVfy=1 pageUrl='+ref
    plugintools.play_resolved_url(media_url)
    print media_url    
예제 #28
0
def resolver_tipe_3(params):
    plugintools.log('[%s %s] Resolver Tipe 3 %s' %
                    (addonName, addonVersion, repr(params)))

    url = params.get("url")
    headers = {
        "User-Agent":
        "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14",
        'Referer': referer
    }
    r = requests.get(url, headers=headers)
    data = r.content
    try:
        iframe = plugintools.find_single_match(data, 'src="([^"]+)"')
        url_iframe = 'http:' + iframe
        headers = {
            "User-Agent":
            "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14",
            'Referer': referer
        }
        r = requests.get(url_iframe, headers=headers)
        data = r.content
        media = plugintools.find_single_match(data,
                                              'var video_source = "([^"]+)"')
        media_url = 'http:' + media
        print '$' * 45 + '- By Movies Ultra Team -' + '$' * 45, media_url, '$' * 109
    except:
        xbmc.executebuiltin(
            "Notification(%s,%s,%i,%s)" %
            ('Movies Ultra', "Archivo no disponible", 3, art + 'icon.png'))
    plugintools.play_resolved_url(media_url)
예제 #29
0
def resolver_tipe_2(params):
    plugintools.log('[%s %s] Resolver Tipe 2 %s' %
                    (addonName, addonVersion, repr(params)))

    url = params.get("url")
    headers = {
        "User-Agent":
        "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14",
        'Referer': referer
    }
    r = requests.get(url, headers=headers)
    data = r.content
    try:
        url_iframe = plugintools.find_single_match(data,
                                                   '<iframe src="([^"]+)"')
        headers = {
            "User-Agent":
            "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14",
            'Referer': referer
        }
        r = requests.get(url_iframe, headers=headers)
        data = r.content
        media_url = plugintools.find_single_match(data, 'file: "([^"]+)"')
        if media_url == "":
            media_url = plugintools.find_single_match(data, 'file=([^&]+)&')
        if media_url == "":
            media_url = plugintools.find_single_match(data, 'link:"(.*?)"')
        print '$' * 48 + '- By Movies Ultra Team -' + '$' * 48, media_url, '$' * 115
    except:
        xbmc.executebuiltin(
            "Notification(%s,%s,%i,%s)" %
            ('Movies Ultra', "Archivo no disponible", 3, art + 'icon.png'))
    plugintools.play_resolved_url(media_url)
예제 #30
0
def tumi(params):
    plugintools.log("[PalcoTV[0.3.0].Tumi " + repr(params))

    data = plugintools.read(params.get("url"))

    if "Video is processing now" in data:
        xbmc.executebuiltin(
            "Notification(%s,%s,%i,%s)" %
            ('PalcoTV', "El archivo está en proceso", 3, art + 'icon.png'))
    else:
        # Vamos a buscar el ID de la página embebida
        matches = plugintools.find_multiple_matches(data, 'add_my_acc=(.*?)\"')
        for entry in matches:
            print 'match', entry
            # http://tumi.tv/embed-i9l4mr7jph1a.html
            url = 'http://tumi.tv/embed-' + entry + '.html'

            # Petición HTTP de esa URL
            request_headers = []
            request_headers.append([
                "User-Agent",
                "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"
            ])
            request_headers.append(["Referer", params.get("url")])
            body, response_headers = plugintools.read_body_and_headers(
                url, headers=request_headers)
            plugintools.log("body= " + body)
            video_url = plugintools.find_single_match(body, 'file\: \"(.*?)\"')
            plugintools.log("video_url= " + video_url)
            plugintools.add_item(action="play",
                                 title="hola",
                                 url=video_url,
                                 folder=False,
                                 isPlayable=True)
            plugintools.play_resolved_url(video_url)
예제 #31
0
def run_cronjob(params):
    plugintools.log(pnimi+sync_data("UExBWV9MSVZF")+repr(params))
    if vanemalukk == "true":
       pealkiri = params.get(sync_data("dGl0bGU="))
       vanema_lukk(pealkiri)
    lopplink = params.get(vod_channels("dXJs"))
    plugintools.play_resolved_url( lopplink )
def tumi(params):
    plugintools.log("[Movies-Online[0.0.1].Tumi "+repr(params))

    data = plugintools.read(params.get("url"))
    
    if "Video is processing now" in data:
        xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "El archivo está en proceso", 3 , art+'icon.png'))       
    else:
        # Vamos a buscar el ID de la página embebida
        matches = plugintools.find_multiple_matches(data, 'add_my_acc=(.*?)\"')
        for entry in matches:
            print 'match',entry
            # http://tumi.tv/embed-i9l4mr7jph1a.html
            url = 'http://tumi.tv/embed-' + entry + '.html'
            
            # Petición HTTP de esa URL
            request_headers=[]
            request_headers.append(["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"])
            request_headers.append(["Referer",params.get("url")])
            body,response_headers = plugintools.read_body_and_headers(url, headers=request_headers)
            plugintools.log("body= "+body)
            video_url= plugintools.find_single_match(body, 'file\: \"(.*?)\"')
            plugintools.log("video_url= "+video_url)
            plugintools.add_item(action="play", title= "hola" , url = video_url , folder = False , isPlayable = True)
            plugintools.play_resolved_url(video_url)
예제 #33
0
def ertete1(params):
    plugintools.log("[%s %s] ertete1 %s " %
                    (addonName, addonVersion, repr(params)))

    url = params.get("url")
    body = plugintools.read(url)

    iframe = plugintools.find_single_match(
        body, '<iframe width="728" height="420"(.*?)</iframe>')
    iframe_link = plugintools.find_single_match(iframe, 'src="([^"]+)')
    iframe_link = 'http://ertete.com' + iframe_link
    ref = iframe_link
    plugintools.log("iframe_link= " + iframe_link)

    bodi = plugintools.read(iframe_link)
    plugintools.log("bodi= " + bodi)
    bloque_rtmp = plugintools.find_single_match(
        bodi, "<script type='text/javascript'(.*?)<div")
    if bloque_rtmp != "":
        plugintools.log("bloque_rtmp= " + bloque_rtmp)
        swf = plugintools.find_single_match(bloque_rtmp, "src='([^']+)")
        plugintools.log("swf= " + swf)
        width = plugintools.find_single_match(bloque_rtmp, "width=([^,]+)")
        plugintools.log("width= " + width)
        height = plugintools.find_single_match(bloque_rtmp, "height=([^,]+)")
        plugintools.log("height= " + height)
        channel = plugintools.find_single_match(bloque_rtmp,
                                                "channel='([^']+)")
        plugintools.log("channel= " + channel)
    else:
        bloque_rtmp = plugintools.find_single_match(
            bodi, '<script type="text/javascript"(.*?)<div')
        plugintools.log("bloque_rtmp= " + bloque_rtmp)
        swf = plugintools.find_single_match(bloque_rtmp, 'src="([^"]+)')
        plugintools.log("swf= " + swf)
        width = plugintools.find_single_match(bloque_rtmp, "width=([^&]+)")
        plugintools.log("width= " + width)
        height = plugintools.find_single_match(bloque_rtmp, "height=([^&]+)")
        plugintools.log("height= " + height)
        channel = plugintools.find_single_match(bloque_rtmp,
                                                "embed/(.*?)&width")
        plugintools.log("channel= " + channel)

    if swf.find("broadcastlive") >= 0:
        pageurl = 'http://1broadcastlive.com/embed/embed.php?channel=' + channel + '&w=' + width + '&h=' + height
        params = plugintools.get_params()
        params[
            "url"] = 'swfUrl=' + swf + ' pageUrl=' + pageurl + ' referer=' + ref
        broadcastlive1(params)
    elif swf.find("iguide") >= 0:  # Crear regex de iguide!!
        # http://www.iguide.to/embedplayer_new.php?width=728&height=420&channel=31086&autoplay=true
        pageurl = 'http://www.iguide.to/embedplayer_new.php?width=' + width + '&height=' + height + '&channel=' + channel + '&autoplay=true'
        body = gethttp_referer_headers(pageurl, ref)
        plugintools.log("body= " + body)
        playpath = plugintools.find_single_match(body, "'file': '(.*?).flv")
        plugintools.log("playpath= " + playpath)
        token = '#ed%h0#w18623jsda6523lDGD'
        url = 'rtmp://safe.iguide.to/iguide playpath=' + playpath + ' swfUrl=http://cdn.iguide.to/player/secure_player_iguide_embed_token.swf pageUrl=' + pageurl + ' token=' + token
        print url
        plugintools.play_resolved_url(url)
예제 #34
0
def run_cronjob(params):
    plugintools.log(pnimi+sync_data("UExBWV9MSVZF")+repr(params))
    if vanemalukk == "true":
       pealkiri = params.get(sync_data("dGl0bGU="))
       vanema_lukk(pealkiri)
    lopplink = params.get(vod_channels("dXJs"))
    plugintools.play_resolved_url( lopplink )
예제 #35
0
def play(params):
    plugintools.log("dandb.play "+repr(params))

    #plugintools.set_view(plugintools.LIST)

    try:
        url = params.get("url")
        plugintools.log("dandb.play url="+repr(url))

        if url=="":
            return

        from urlresolver.types import HostedMediaFile
        hosted_media_file = HostedMediaFile(url=url)
        plugintools.log("dandb.play hosted_media_file="+repr(hosted_media_file))

        try:
            media_url = hosted_media_file.resolve()
            plugintools.log("dandb.play media_url="+repr(media_url))

            if media_url:
                #plugintools.add_item( action="playable", title="Play this video from "+hosted_media_file.get_host()+"", url=media_url, isPlayable=True, folder=False )
                plugintools.play_resolved_url( media_url )    
            else:
                plugintools.play_resolved_url( url )    
        except:
            import traceback
            plugintools.log(traceback.format_exc())
            #plugintools.add_item( action="play", title="Error while getting access to video", isPlayable=True, folder=False )
            plugintools.message("D&B TV","Error while getting access to video")

    except urllib2.URLError,e:
        #plugintools.add_item( action="play", title="Error reading data, please try again", isPlayable=True, folder=False )
        plugintools.message("D&B TV","Connection error while getting access to video")
        body = ""
예제 #36
0
def goear_def(url):
    plugintools.log("[%s %s] Goear " % (addonName, addonVersion))

    params = plugintools.get_params()
    thumbnail = params.get("thumbnail")
    title = params.get("title")
    plugintools.add_item(action="", title='[COLOR royalblue][B]'+title+'[/B][/COLOR]', url=url, thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = True)

    if url.startswith("goear_sg") == True:
        id_playlist = url.replace("goear_sg:", "").replace('"',"").strip()
        url = 'http://www.goear.com/action/sound/get/'+id_playlist
        plugintools.log("url= "+url)
        plugintools.play_resolved_url(url)
    elif url.startswith("goear_pl") == True:
        id_playlist = url.replace("goear_pl:", "").replace('"',"").strip()
        url = 'http://www.goear.com/apps/android/playlist_songs_json.php?v='+id_playlist
        plugintools.log("url= "+url)
        referer = 'http://www.goear.com/'
        data = gethttp_referer_headers(url,referer)

        songs = plugintools.find_multiple_matches(data, '{(.*?)}')
        i = 1
        for entry in songs:
            plugintools.log("entry= "+entry)
            id_song = plugintools.find_single_match(entry, '"id":"([^"]+)')
            plugintools.log("id_song= "+id_song)
            title_song = plugintools.find_single_match(entry, '"title":"([^"]+)')
            plugintools.log("title_song= "+title_song)
            songtime = plugintools.find_single_match(entry, '"songtime":"([^"]+)')
            plugintools.log("songtime= "+songtime)
            url='http://www.goear.com/action/sound/get/'+id_song
            plugintools.log("url= "+url)
            plugintools.add_item(action="play", title='[COLOR lightyellow]'+str(i)+' '+title_song+'[/COLOR][COLOR orange] ('+songtime+')[/COLOR]', url=url, thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = True)
            i = i + 1
예제 #37
0
def launch_magnet(params):
    plugintools.log('[%s %s] launch_magnet... %s' %
                    (addonName, addonVersion, repr(params)))
    url = params.get("url")
    addon_magnet = plugintools.get_setting("addon_magnet")
    plugintools.log("Addon para ejecutar archivo Magnet: " + addon_magnet)
    #url = urllib.quote_plus(url)
    if addon_magnet == "0":  # Stream (por defecto)
        url = 'plugin://plugin.video.stream/play/' + url
        plugintools.log("Iniciando Stream... " + url)
    elif addon_magnet == "1":  # Pulsar
        url = 'plugin://plugin.video.pulsar/play?uri=' + url
        plugintools.log("Iniciando Pulsar... " + url)
    elif addon_magnet == "2":  # KMediaTorrent
        url = 'plugin://plugin.video.kmediatorrent/play/' + url
        plugintools.log("Iniciando KMediaTorrent... " + url)
    elif addon_magnet == "3":  # XBMCtorrent
        url = 'plugin://plugin.video.xbmctorrent/play/' + url
        plugintools.log("Iniciando XBMCtorrent... " + url)
    elif addon_magnet == "4":  # Quasar
        url = 'plugin://plugin.video.quasar/play?uri=' + url
        plugintools.log("Iniciando Quasar... " + url)

    plugintools.log("Magnet URL= " + url)
    plugintools.play_resolved_url(url)
def shidurlive(params):
    plugintools.log("[%s %s].Regex Shidurlive %s" % (addonName, addonVersion, repr(params)))
    url_user = {}

    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")
            url_user["rtmp"] = entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"] = entry
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"] = entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"] = entry
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"] = entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"] = entry

    plugintools.log("URL_user dict= " + repr(url_user))
    pageurl = url_user.get("pageurl")

    # Controlamos ambos casos de URL: Único link (pageUrl) o link completo rtmp://...
    if pageurl is None:
        pageurl = url_user.get("url")

    referer = url_user.get("referer")
    url_user["pageurl"] = pageurl
    print "pageurl", pageurl
    print "referer", referer
    body = gethttp_headers(pageurl, referer)
    plugintools.log("body= " + body)

    # src=http://www.shidurlive.com/stream/4e6a51324f54637a4e6a4d325a6a63324e6a55334d6a63354d7a453d/706c381d1202
    src = re.compile('src="(.*?)"').findall(body)
    print "src", src
    url_user["pageurl"] = src[0]
    pageurl = url_user.get("pageurl")
    referer = url_user.get("referer")
    body = gethttp_headers(pageurl, referer)
    plugintools.log("body= " + body)
    getparams_shidurlive(url_user, body)
    url = (
        url_user.get("rtmp")
        + " playpath="
        + url_user.get("playpath")
        + " swfUrl=http://cdn.shidurlive.com/player.swf pageUrl="
        + url_user.get("pageurl")
        + " live=true timeout=15"
    )
    plugintools.play_resolved_url(url)
예제 #39
0
def adelante_geturl(params):
    plugintools.log("[PalcoTV-0.3.0].LaLigatv.es getURL: "+repr(params))

    data = plugintools.read(params.get("url"))
    plugintools.log("data= "+data)
    url = plugintools.find_single_match(data, 'src: escape\(\"(.*?)\"')    
    plugintools.log("URL= "+url)
    plugintools.play_resolved_url(url)
예제 #40
0
def adelante_geturl(params):
    plugintools.log("[PalcoTV-0.3.0].LaLigatv.es getURL: " + repr(params))

    data = plugintools.read(params.get("url"))
    plugintools.log("data= " + data)
    url = plugintools.find_single_match(data, 'src: escape\(\"(.*?)\"')
    plugintools.log("URL= " + url)
    plugintools.play_resolved_url(url)
예제 #41
0
def resolve_vaughnlive(params):
    plugintools.log("[movie.ultra.7k-0.3.0].resolve_vaughnlive " +
                    repr(params))

    vaughnlive_user = {
        "rtmp": "",
        "swfurl": "http://vaughnlive.tv/800021294/swf/VaughnSoftPlayer.swf",
        "pageurl": "http://www.vaughnlive.tv/",
        "token": '#ed%h0#w18623jsda6523l'
    }

    # Construimos diccionario 'vaughn_user'
    url = params.get("url")
    url = url.strip()
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")
            vaughnlive_user["rtmp"] = entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            vaughnlive_user["playpath"] = entry
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            vaughnlive_user["swfurl"] = entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            vaughnlive_user["pageurl"] = entry
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            vaughnlive_user["token"] = entry

    # rtmp://198.255.0.10:443/live?9LdRvrakvwT0SarNUJY6gaNMTm7xtHfY playpath=live_lmshows_at live=1 timeout=20

    # rtmp://192.240.125.26:443/live?YNRqBuQERAV2O2kvNzETwzaQyIdAZrqj playpath=live_lmshows_at live=1 timeout=20

    # LSP:     rtmp://198.255.5.66:443/live?0n0qMt6OtXhOLwQKIwSoxVdmXHiYW8nVZSY playpath=live_dibujos_animados live=1 timeout=20
    # PalcoTV: rtmp://198.255.5.66:443/live?0n0qMt6OtXhOLwQKIwSoxVdmXHiYW8nVZSY playpath=live_dibujos_animados live=1 timeout=20

    ret_val = ""
    ret_val = str(int(round(time.time() * 1000)))
    pageurl = 'http://mvn.vaughnsoft.net/video/edge/live_dibujos_animados-' + ret_val + '.33434'
    body = gethttp_noref(pageurl)
    body = body.strip()
    plugintools.log("body= " + body)
    body = body.split(";")
    token = body[1].replace(":mvnkey-", "").strip()

    pageurl = vaughnlive_user.get("pageurl")
    body = gethttp_noref(pageurl)
    getedge = plugintools.find_single_match(body, '{ return \"(.*?)\"')
    getedge = getedge.split(",")
    getedge = getedge[0]
    plugintools.log("getedge= " + getedge)
    url = 'rtmp://' + getedge + '/live?' + token + ' playpath=' + vaughnlive_user.get(
        "playpath") + ' live=1 timeout=20'
    print 'url', url
    plugintools.play_resolved_url(url)
예제 #42
0
def run_cronjob(params):
    extend=plugintools.get_setting(vod_channels("ZXh0ZW5k"))
    plugintools.log(pnimi+sync_data("UExBWV9MSVZF")+repr(params))
    if vanemalukk == "true":
       pealkiri = params.get(sync_data("dGl0bGU="))
       vanema_lukk(pealkiri)
    lopplink = params.get(vod_channels("dXJs"))
    lopplink = lopplink.replace('.ts','.%s'%extend)
    plugintools.play_resolved_url( lopplink )
def wizz1(pageurl, referer):
 plugintools.log("empieza...")
 data=gethttp_headers(pageurl,referer)
 data=unpack(data);
 r='src="([^"]+)';w=plugintools.find_single_match(urllib.unquote_plus(tamzar(data)),r);
 data=gethttp_headers(w,referer);url=w;
 r='SWFObject\(\'([^\']+).*?file\',\s?\'([^\']+).*?streamer\',\s?\'([^\']+)';w=plugintools.find_multiple_matches(data,r);
 url=w[0][2]+' playpath='+w[0][1]+' swfUrl='+w[0][0]+' token=‪#‎yw‬%tt#w@kku conn=S:OK live=1 pageUrl='+url;print url
 plugintools.play_resolved_url(url)
예제 #44
0
def play(params):
    plugintools.log("broadcastify.play "+repr(params))

    if params.get("url")!="":
        # Descarga la home
        body,response_headers = plugintools.read_body_and_headers(params.get("url"))
        plugintools.log("body="+body)
        location = plugintools.find_single_match(body,"<location>([^<]+)</location>")
        plugintools.play_resolved_url( location )
예제 #45
0
def run_cronjob(params):
    extend=plugintools.get_setting(vod_channels("ZXh0ZW5k"))
    plugintools.log(pnimi+sync_data("UExBWV9MSVZF")+repr(params))
    #if vanemalukk == "true":
       #pealkiri = params.get(sync_data("dGl0bGU="))
       #vanema_lukk(pealkiri)
    lopplink = params.get(vod_channels("dXJs"))
    lopplink = lopplink.replace('.ts','.%s'%extend)
    plugintools.play_resolved_url( lopplink )
def streamingfreetv0(params):
    plugintools.log("[beta.1-0.3.0].streamingfreetv "+repr(params))

    url_user = {}
    
    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")         
            url_user["rtmp"]=entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"]=entry            
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"]=entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"]=entry          
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"]=entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"]=entry


    plugintools.log("URL_user dict= "+repr(url_user))
    pageurl = url_user.get("pageurl")
    body = gethttp_headers(pageurl)
    plugintools.log("body= "+body)
    
    #<script type='text/javascript'> width=650, height=400, channel='sysf', e='1';</script><script type='text/javascript' src='http://privado.streamingfreetv.net/embedPlayer.js'></script>
    pattern = plugintools.find_single_match(body, 'width=(.*?)</script>')
    width= plugintools.find_single_match(pattern, '\'(.*?)\' ')
    print width
    height= plugintools.find_single_match(pattern, 'height=\'(.*?)\' ')
    print height
    playpath = url_user.get("playpath")
    src=plugintools.find_single_match(pattern, 'src=(.*?) ')
    
    #http://privado.streamingfreetv.net/embed/embed.php?channel=sysf&w=650&h=400
    pageurl = 'http://privado.streamingfreetv.net/embed/embed.php?channel='+playpath+'&w='+width+'&h='+height
    plugintools.log("pageurl= "+pageurl)
    url_user["pageurl"]=pageurl

    #<param name='flashvars' value='file=sysf&streamer=rtmp://94.23.247.151/redirect?token=0ngYvHGwJks-BswfZHOwTwExpired=1417266581&autostart=false&skin=http://privado.streamingfreetv.net/jw/classic.zip'>

    rtmp=plugintools.find_single_match(body, 'streamer=(.*?)&autostart')
    swfurl=plugintools.find_single_match(body, '<param name=\'movie\' value=\'(.*?)\'')
    print 'swfurl',swfurl
    print 'rtmp',rtmp
    url = rtmp+' playpath='+playpath+' swfUrl='+swfurl+' pageUrl='+pageurl
    #plugintools.log("url= "+url)
    plugintools.play_resolved_url(url)
예제 #47
0
def streamingfreetv0(params):
    plugintools.log("[beta.1-0.3.0].streamingfreetv " + repr(params))

    url_user = {}

    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")
            url_user["rtmp"] = entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"] = entry
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"] = entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"] = entry
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"] = entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"] = entry

    plugintools.log("URL_user dict= " + repr(url_user))
    pageurl = url_user.get("pageurl")
    body = gethttp_headers(pageurl)
    plugintools.log("body= " + body)

    #<script type='text/javascript'> width=650, height=400, channel='sysf', e='1';</script><script type='text/javascript' src='http://privado.streamingfreetv.net/embedPlayer.js'></script>
    pattern = plugintools.find_single_match(body, 'width=(.*?)</script>')
    width = plugintools.find_single_match(pattern, '\'(.*?)\' ')
    print width
    height = plugintools.find_single_match(pattern, 'height=\'(.*?)\' ')
    print height
    playpath = url_user.get("playpath")
    src = plugintools.find_single_match(pattern, 'src=(.*?) ')

    #http://privado.streamingfreetv.net/embed/embed.php?channel=sysf&w=650&h=400
    pageurl = 'http://privado.streamingfreetv.net/embed/embed.php?channel=' + playpath + '&w=' + width + '&h=' + height
    plugintools.log("pageurl= " + pageurl)
    url_user["pageurl"] = pageurl

    #<param name='flashvars' value='file=sysf&streamer=rtmp://94.23.247.151/redirect?token=0ngYvHGwJks-BswfZHOwTwExpired=1417266581&autostart=false&skin=http://privado.streamingfreetv.net/jw/classic.zip'>

    rtmp = plugintools.find_single_match(body, 'streamer=(.*?)&autostart')
    swfurl = plugintools.find_single_match(
        body, '<param name=\'movie\' value=\'(.*?)\'')
    print 'swfurl', swfurl
    print 'rtmp', rtmp
    url = rtmp + ' playpath=' + playpath + ' swfUrl=' + swfurl + ' pageUrl=' + pageurl
    #plugintools.log("url= "+url)
    plugintools.play_resolved_url(url)
예제 #48
0
def castalba(params):
    plugintools.log("[movie.ultra.7k-0.3.0].castalba " + repr(params))
    url_user = {}

    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")
            url_user["rtmp"] = entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"] = entry
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"] = entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"] = entry
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"] = entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"] = entry

    plugintools.log("URL_user dict= " + repr(url_user))
    pageurl = url_user.get("pageurl")
    body = gethttp_headers(pageurl)

    # Controlamos el caso de canal privado (requiere referer, por implementar)
    if body.find("THIS CHANNEL IS CURRENTLY OFFLINE") > 0:
        xbmc.executebuiltin(
            "Notification(%s,%s,%i,%s)" %
            ('Movie Ultra 7K', "Canal offline", 3, art + 'icon.png'))
        return 0
    else:

        # Iniciamos captura de parámetros
        file = re.compile('file\': \'(.*?)\',').findall(body)
        if file[0].endswith("m3u8"):
            plugintools.play_resolved_url(file[0])
        else:
            streamer = re.compile('streamer\': \'(.*?)\',').findall(body)
            print 'file', file
            print 'streamer', streamer
            url_user["playpath"] = file[0]
            url_user["rtmp"] = streamer[0]
            # Construimos la URL original
            url = url_user.get("rtmp") + ' playpath=' + url_user.get(
                "playpath"
            ) + ' swfUrl=http://static.castalba.tv/player5.9.swf pageUrl=' + url_user.get(
                "pageurl") + ' live=true timeout=15'
            url = url.strip()
            plugintools.log("url= " + url)
            plugintools.play_resolved_url(url)
def streamcloud(params):
    plugintools.log("[Movies-Online 0.0.1].streamcloud " + repr(params))

    url = params.get("url")

    request_headers=[]
    request_headers.append(["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"])
    body,response_headers = plugintools.read_body_and_headers(url, headers=request_headers)
    plugintools.log("data= "+body)

    # Barra de progreso para la espera de 10 segundos
    progreso = xbmcgui.DialogProgress()
    progreso.create("Movies-Online", "Abriendo Streamcloud..." , url )

    i = 13000
    j = 0
    percent = 0
    while j <= 13000 :
        percent = ((j + ( 13000 / 10.0 )) / i)*100
        xbmc.sleep(i/10)  # 10% = 1,3 segundos
        j = j + ( 13000 / 10.0 )
        msg = "Espera unos segundos, por favor... "
        percent = int(round(percent))
        print percent
        progreso.update(percent, "" , msg, "")
        

    progreso.close()
    
    media_url = plugintools.find_single_match(body , 'file\: "([^"]+)"')
    
    if media_url == "":
        op = plugintools.find_single_match(body,'<input type="hidden" name="op" value="([^"]+)"')
        usr_login = ""
        id = plugintools.find_single_match(body,'<input type="hidden" name="id" value="([^"]+)"')
        fname = plugintools.find_single_match(body,'<input type="hidden" name="fname" value="([^"]+)"')
        referer = plugintools.find_single_match(body,'<input type="hidden" name="referer" value="([^"]*)"')
        hashstring = plugintools.find_single_match(body,'<input type="hidden" name="hash" value="([^"]*)"')
        imhuman = plugintools.find_single_match(body,'<input type="submit" name="imhuman".*?value="([^"]+)">').replace(" ","+")

        post = "op="+op+"&usr_login="******"&id="+id+"&fname="+fname+"&referer="+referer+"&hash="+hashstring+"&imhuman="+imhuman
        request_headers.append(["Referer",url])
        body,response_headers = plugintools.read_body_and_headers(url, post=post, headers=request_headers)
        plugintools.log("data= "+body)
        

        # Extrae la URL
        media_url = plugintools.find_single_match( body , 'file\: "([^"]+)"' )
        plugintools.log("media_url= "+media_url)
        plugintools.play_resolved_url(media_url)

        if 'id="justanotice"' in body:
            plugintools.log("[streamcloud.py] data="+body)
            plugintools.log("[streamcloud.py] Ha saltado el detector de adblock")
            return -1
예제 #50
0
def play_vaughnlive(vaughnlive_user, params):
    plugintools.log("[PalcoTV-0.3.0].vaughnlive User= "******"rtmp") + " playpath=" + vaughnlive_user.get("playpath") + " live=1 timeout=20"
    url = url_decoded.strip()
    plugintools.play_resolved_url(url_decoded)

    # Reproducimos URL decodificada...
    # plugintools.add_item(action="play", title=params.get("title"), url = url_decoded , folder = False, isPlayable = True)
    params["url"]=url_decoded
예제 #51
0
def mips(url,ref,res):
 p = re.compile(ur'(width|height|channel)=\'?"?([^\,\'"]+)');par=re.findall(p,str(res));
 w=par[0][1];h=par[1][1];c=par[2][1];ref=url;url='http://www.mips.tv/embedplayer/'+c+'/1/'+w+'/'+h;body='';
 bodi=curl_frame(url,ref,body);#print bodi
 p ='SWFObject\(\'?"?([^\'"]+)';swf='http://www.mips.tv'+plugintools.find_single_match(bodi,p);
 p = 'FlashVars\'?"?,?\s?\'?"?([^\'"]+)';flashvars=plugintools.find_single_match(bodi,p);
 p = re.compile(ur'\&?.*?=([^\&]+)');flashvars=re.findall(p,flashvars);id=flashvars[0];c=flashvars[1];
 lb='http://mips.tv:1935/loadbalancer';lb=plugintools.read(lb);lb=plugintools.find_single_match(lb,'redirect=(.*)');
 media_url = 'rtmp://'+lb+'/live/ playpath='+c+'?id='+id+' swfUrl='+swf+' swfVfy=1 conn=S:OK live=true pageUrl='+url
 plugintools.play_resolved_url(media_url)
 print "MEDIA URL="+media_url
예제 #52
0
def castalba(params):
    plugintools.log("[PalcoTV-0.3.0].castalba "+repr(params))
    url_user = {}
    
    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")         
            url_user["rtmp"]=entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"]=entry            
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"]=entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"]=entry          
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"]=entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"]=entry

    plugintools.log("URL_user dict= "+repr(url_user))
    pageurl = url_user.get("pageurl")
    referer = url_user.get("referer")
    body = gethttp_referer_headers(pageurl,referer)
    plugintools.log("body= "+body)

    # Controlamos el caso de canal privado (requiere referer, por implementar)
    if body.find("THIS CHANNEL IS CURRENTLY OFFLINE") > 0 :
        xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('PalcoTV', "Canal offline", 3 , art+'icon.png'))
        return 0
    else:
    
        # Iniciamos captura de parámetros
        file = re.compile('file\': \'(.*?)\',').findall(body)
        if file[0].endswith("m3u8"):
            plugintools.play_resolved_url(file[0])
        else:
            streamer = re.compile('streamer\': \'(.*?)\',').findall(body)
            playpath = re.compile('file\': \'(.*?)\',').findall(body)
            swfurl=url_user.get("swfurl")
            print streamer[0]
            print playpath[0]            
            
            # Construimos la URL original
            url = streamer[0] + ' playpath='+playpath[0]+' swfUrl='+swfurl+' pageUrl=http://castalba.tv live=true timeout=20'
            plugintools.log("url= "+url)
            plugintools.play_resolved_url(url)
예제 #53
0
def run_cronjob(params):
    xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_TITLE )
    plugintools.log(pnimi+sync_data("UExBWV9MSVZF")+repr(params))
    if vanemalukk == "true":
       pealkiri = params.get(sync_data("dGl0bGU="))
       vanema_lukk(pealkiri)
    lopplink = params.get(vod_channels("dXJs"))
    extention=xbmcplugin.getSetting(int(sys.argv[1]), 'extention')
    if extention == 'ts':
        plugintools.play_resolved_url( lopplink )
    else:
        plugintools.play_resolved_url( lopplink.replace('.ts','.m3u8') )
def nowvideo(params):
    plugintools.log("[Movies-Online 0.0.1].nowvideo " + repr(params))

    data = plugintools.read(params.get("url"))
    #data = data.replace("amp;", "")
    
    if "The file is being converted" in data:
        xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "El archivo está en proceso", 3 , art+'icon.png'))
    elif "no longer exists" in data:
        xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "El archivo ha sido borrado", 3 , art+'icon.png'))        
    else:
        #plugintools.log("data= "+data)
        domain = plugintools.find_single_match(data, 'flashvars.domain="([^"]+)')
        video_id = plugintools.find_single_match(data, 'flashvars.file="([^"]+)')
        filekey = plugintools.find_single_match(data, 'flashvars.filekey=([^;]+)')

        # En la página nos da el token de esta forma (siendo fkzd el filekey): var fkzd="83.47.1.12-8d68210314d70fb6506817762b0d495e";

        token_txt = 'var '+filekey
        #plugintools.log("token_txt= "+token_txt)
        token = plugintools.find_single_match(data, filekey+'=\"([^"]+)')
        token = token.replace(".","%2E").replace("-","%2D")
        
        #plugintools.log("domain= "+domain)   
        #plugintools.log("video_id= "+video_id)
        #plugintools.log("filekey= "+filekey)
        #plugintools.log("token= "+token)
        
        if video_id == "":
            xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "Error!", 3 , art+'icon.png'))
        else:
            #http://www.nowvideo.sx/api/player.api.php?user=undefined&pass=undefined&cid3=undefined&numOfErrors=0&cid2=undefined&key=83%2E47%2E1%2E12%2D8d68210314d70fb6506817762b0d495e&file=b5c8c44fc706f&cid=1
            url = 'http://www.nowvideo.sx/api/player.api.php?user=undefined&pass=undefined&cid3=undefined&numOfErrors=0&cid2=undefined&key=' + token + '&file=' + video_id + '&cid=1'

            # Vamos a lanzar una petición HTTP de esa URL
            referer = 'http://www.nowvideo.sx/video/b5c8c44fc706f'
            request_headers=[]
            request_headers.append(["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"])
            request_headers.append(["Referer",referer])
            body,response_headers = plugintools.read_body_and_headers(url, headers=request_headers)
            # plugintools.log("data= "+body)
            # body= url=http://s173.coolcdn.ch/dl/04318aa973a3320b8ced6734f0c20da3/5440513e/ffe369cb0656c0b8de31f6ef353bcff192.flv&title=The.Black.Rider.Revelation.Road.2014.DVDRip.X264.AC3PLAYNOW.mkv%26asdasdas&site_url=http://www.nowvideo.sx/video/b5c8c44fc706f&seekparm=&enablelimit=0

            body = body.replace("url=", "")
            body = body.split("&")

            if len(body) >= 0:
                print 'body',body
                url = body[0]
                plugintools.play_resolved_url(url)
                xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "Cargando vídeo...", 1 , art+'icon.png'))
            else:
                xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "Error!", 3 , art+'icon.png'))                
예제 #55
0
def shidurlive(params):
    plugintools.log("[PalcoTV-0.3.0].shidurlive "+repr(params))
    url_user = {}
    
    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")         
            url_user["rtmp"]=entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"]=entry            
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"]=entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"]=entry          
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"]=entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"]=entry

    plugintools.log("URL_user dict= "+repr(url_user)) 
    pageurl = url_user.get("pageurl")
    
    # Controlamos ambos casos de URL: Único link (pageUrl) o link completo rtmp://...
    if pageurl is None:
        pageurl = url_user.get("url")
        
    referer= url_user.get("referer")
    url_user["pageurl"]=pageurl
    print 'pageurl',pageurl
    print 'referer',referer
    body = gethttp_headers(pageurl, referer)
    plugintools.log("body= "+body)

    #src=http://www.shidurlive.com/stream/4e7a51334e5463304e7a59324f4459794e6d59334d445a6a4e7a55334d773d3d/5864f9cc009c
    src = re.compile('src=\"(.*?)\"').findall(body)
    print 'src',src
    url_user["pageurl"]=src[0]
    pageurl = url_user.get("pageurl")
    referer = url_user.get("referer")
    body = gethttp_headers(pageurl, referer)
    plugintools.log("body= "+body)
    getparams_shidurlive(url_user, body)
    url = url_user.get("rtmp") + ' playpath=' + url_user.get("playpath") + ' swfUrl=http://cdn.shidurlive.com/player.swf pageUrl=' + url_user.get("pageurl") + ' live=true timeout=15'
    plugintools.play_resolved_url(url)
예제 #56
0
def ucaster(url,ref,res):
 p1 = re.compile(ur'channel=?\'?"?([^\'"\&,;]+)');f1=re.findall(p1, str(res));
 p2 = re.compile(ur'width=?\'?"?([^\'"\&,;]+)');f2=re.findall(p2, str(res));
 p3 = re.compile(ur'height=?\'?"?([^\'"\&,;]+)');f3=re.findall(p3, str(res));
 c=f1[0];w=f2[0];h=f3[0];
 url='http://www.ucaster.eu/embedded/'+c+'/1/'+w+'/'+h;body=''
 bodi=curl_frame(url,ref,body)
 p ='SWFObject\(\'?"?([^\'"]+)';swf='http://www.ucaster.eu'+plugintools.find_single_match(bodi,p);
 p = 'FlashVars\'?"?,?\s?\'?"?([^\'"]+)';flashvars=plugintools.find_single_match(bodi,p);print flashvars;
 p = re.compile(ur'\&?.*?=([^\&]+)');flashvars=re.findall(p,flashvars);print flashvars;id=flashvars[0];c=flashvars[1];
 lb='http://www.ucaster.eu:1935/loadbalancer';lb=plugintools.read(lb);lb=plugintools.find_single_match(lb,'redirect=(.*)');
 media_url = 'rtmp://'+lb+'/live/ playpath='+c+'?id='+id+' swfUrl='+swf+' swfVfy=1 conn=S:OK live=true pageUrl='+url
 plugintools.play_resolved_url(media_url)
예제 #57
0
def resolve_vaughnlive(params):
    plugintools.log("[PLD.VisionTV-0.3.0].resolve_vaughnlive " + repr(params) )

    vaughnlive_user = {"rtmp": "" , "swfurl": "http://vaughnlive.tv/800021294/swf/VaughnSoftPlayer.swf" , "pageurl": "http://www.vaughnlive.tv/", "token":'#ed%h0#w18623jsda6523l'}

    # Construimos diccionario 'vaughn_user'
    url = params.get("url")
    url = url.strip()
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")         
            vaughnlive_user["rtmp"]=entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            vaughnlive_user["playpath"]=entry            
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            vaughnlive_user["swfurl"]=entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            vaughnlive_user["pageurl"]=entry
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            vaughnlive_user["token"]=entry           
    
    # rtmp://198.255.0.10:443/live?9LdRvrakvwT0SarNUJY6gaNMTm7xtHfY playpath=live_lmshows_at live=1 timeout=20

    # rtmp://192.240.125.26:443/live?YNRqBuQERAV2O2kvNzETwzaQyIdAZrqj playpath=live_lmshows_at live=1 timeout=20

    # LSP:     rtmp://198.255.5.66:443/live?0n0qMt6OtXhOLwQKIwSoxVdmXHiYW8nVZSY playpath=live_dibujos_animados live=1 timeout=20
    # PLD.VisionTV: rtmp://198.255.5.66:443/live?0n0qMt6OtXhOLwQKIwSoxVdmXHiYW8nVZSY playpath=live_dibujos_animados live=1 timeout=20

    ret_val = ""
    ret_val=str(int(round(time.time() * 1000)))
    pageurl = 'http://mvn.vaughnsoft.net/video/edge/live_dibujos_animados-'+ret_val+'.33434'    
    body = gethttp_noref(pageurl)
    body = body.strip()
    plugintools.log("body= "+body)
    body = body.split(";")
    token = body[1].replace(":mvnkey-", "").strip()

    pageurl = vaughnlive_user.get("pageurl")
    body=gethttp_noref(pageurl)
    getedge = plugintools.find_single_match(body, '{ return \"(.*?)\"')
    getedge = getedge.split(",")
    getedge = getedge[0]
    plugintools.log("getedge= "+getedge)    
    url = 'rtmp://'+getedge+'/live?'+token+ ' playpath='+vaughnlive_user.get("playpath")+' live=1 timeout=20'
    print 'url',url
    plugintools.play_resolved_url(url)
예제 #58
0
파일: goear.py 프로젝트: Jackox/tvmx
def goear_def(url):
    plugintools.log("[Arena+ 0.3.0].goear")

    params = plugintools.get_params()
    show = params.get("extra")    
    
    if show == "":
        show = params.get("show")
        if show == "":
            show = params.get_setting("music_id")
            modo_vista(show)
            plugintools.log("show= "+show)            
    elif show == "LIST":
        show = plugintools.get_setting("music_id")

    modo_vista(show)
    plugintools.log("show= "+show)
        
    thumbnail = params.get("thumbnail")
    title = params.get("title")
    plugintools.add_item(action="", title='[COLOR royalblue][B]'+title+'[/B][/COLOR]', url=url, thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = True)

    if url.startswith("goear_sg") == True:
        id_playlist = url.replace("goear_sg:", "").replace('"',"").strip()
        url = 'http://www.goear.com/action/sound/get/'+id_playlist
        plugintools.log("url= "+url)
        plugintools.play_resolved_url(url)
    elif url.startswith("goear_pl") == True:
        id_playlist = url.replace("goear_pl:", "").replace('"',"").strip()
        url = 'http://www.goear.com/apps/android/playlist_songs_json.php?v='+id_playlist
        plugintools.log("url= "+url)
        referer = 'http://www.goear.com/'
        data = gethttp_referer_headers(url,referer,show)
        #plugintools.log("data= "+data)
        modo_vista(show)

        songs = plugintools.find_multiple_matches(data, '{(.*?)}')
        i = 1
        for entry in songs:
            plugintools.log("entry= "+entry)
            id_song = plugintools.find_single_match(entry, '"id":"([^"]+)')
            plugintools.log("id_song= "+id_song)
            title_song = plugintools.find_single_match(entry, '"title":"([^"]+)')
            plugintools.log("title_song= "+title_song)
            songtime = plugintools.find_single_match(entry, '"songtime":"([^"]+)')
            plugintools.log("songtime= "+songtime)
            url='http://www.goear.com/action/sound/get/'+id_song
            plugintools.log("url= "+url)
            plugintools.add_item(action="play", title='[COLOR lightyellow]'+str(i)+' '+title_song+'[/COLOR][COLOR orange] ('+songtime+')[/COLOR]', url=url, thumbnail = thumbnail , extra = show , fanart = fanart , folder = False, isPlayable = True)
            i = i + 1
예제 #59
0
def miplayernet0(params):
    plugintools.log("[%s %s].miplayer.net %s " % (addonName, addonVersion, repr(params)))
    url_user = {}

    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"] = entry
        elif entry.startswith("pageUrl"):
            pageurl = entry.replace("pageUrl=", "")
            pageurl = pageurl.replace("&amp;", "&")
            url_user["pageurl"] = pageurl
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"] = entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"] = entry

    plugintools.log("URL_user dict= " + repr(url_user))
    url = url_user.get("pageurl")
    ref = url_user.get("referer")
    if ref == "":
        ref = "http://miplayer.net"

    body = gethttp_referer_headers(url, ref)

    tok_page = plugintools.find_single_match(body, 'getJSON."(.*?)"')
    # rtmp = plugintools.find_single_match(body, "file: '([^']+)")
    tok_rtmp = plugintools.find_single_match(body, "wmsAuthSign=([^']+)")
    plugintools.log("tok_page= " + tok_page)
    body = gethttp_referer_headers(tok_page, "http://miplayer.net/")
    tok = plugintools.find_single_match(body, 'token":"(.*?)"')

    plugintools.log("tok= " + tok)
    plugintools.log("tok_rtmp= " + tok_rtmp)

    media_url = (
        "rtmp://rtmp.miplayer.net/redirect?wmsAuthSign="
        + tok_rtmp
        + " token="
        + tok
        + " swfUrl=http://p.jwpcdn.com/6/12/jwplayer.flash.swf pageUrl=http://miplayer.net live=1 timeout=15"
    )
    plugintools.log("url= " + media_url)
    plugintools.play_resolved_url(media_url)
def freebroadcast(params):
    plugintools.log("[Movies-Online 0.0.1].freebroadcast "+repr(params))
    url_user = {}
    
    # Construimos diccionario...
    url = params.get("url")
    url_extracted = url.split(" ")
    for entry in url_extracted:
        if entry.startswith("rtmp"):
            entry = entry.replace("rtmp=", "")         
            url_user["rtmp"]=entry
        elif entry.startswith("playpath"):
            entry = entry.replace("playpath=", "")
            url_user["playpath"]=entry            
        elif entry.startswith("swfUrl"):
            entry = entry.replace("swfUrl=", "")
            url_user["swfurl"]=entry
        elif entry.startswith("pageUrl"):
            entry = entry.replace("pageUrl=", "")
            url_user["pageurl"]=entry          
        elif entry.startswith("token"):
            entry = entry.replace("token=", "")
            url_user["token"]=entry
        elif entry.startswith("referer"):
            entry = entry.replace("referer=", "")
            url_user["referer"]=entry

    plugintools.log("URL_user dict= "+repr(url_user)) 
    pageurl = url_user.get("pageurl")
    
    # Controlamos ambos casos de URL: Único link (pageUrl) o link completo rtmp://...
    if pageurl is None:
        pageurl = url_user.get("url")
        
    referer= url_user.get("referer")
    if referer is None:
        referer = 'http://www.juanin.tv'
    # channel_id = re.compile('channel=([^&]*)').findall(pageurl)
    # print channel_id
    # channel_id = channel_id[0]

    pageurl = 'http://freebroadcast.pw/embed/embed.php?n=' + url_user.get("playpath") + '&w=670&h=400'
    url_user["pageurl"]=pageurl
    print 'pageurl',pageurl
    print 'referer',referer
    body = gethttp_headers(pageurl, referer)
    getparams_freebroadcast(url_user, body)
    url = url_user.get("ip") + ' playpath=' + url_user.get("playpath") + ' swfUrl=http://freebroadcast.pw/player/player.swf pageUrl=' + url_user.get("pageurl") + ' live=1 timeout=10'
    plugintools.play_resolved_url(url)