Example #1
0
def iguide(url, ref, res):
    #clodfront protect,print resp in try_to_parse_as_new
    #vipracing tiene otro referer no el que sale aqui
    #print sys._getframe().f_code.co_argcount,locals().keys(),sys._getframe().f_code.co_varnames
    #print("\n$[ %s ]$\n%s\n%s\n%s"%(sys._getframe().f_code.co_name.upper(),url,ref,res));sys.exit();
    from roja import new_frame
    refi = ref
    body, jar, resp, ref = new_frame(res[0][2], ref, '', '')
    url = plugintools.find_single_match(body, 'src=\'([^\']+)')
    body, jar, resp, ref = new_frame(url, refi, '', jar)
    p = re.compile(ur'(\$\.getJSON\(\'?"?.*?)<\/script>', re.DOTALL)
    pars = re.findall(p, body)
    pars = str(pars[0])
    pars = pars.replace("\n", "").replace("\t", "")
    tokserv = plugintools.find_single_match(str(pars),
                                            'getJSON\(\'?"?([^\'"]+)')
    strmr = plugintools.find_single_match(str(pars),
                                          'streamer\'?"?:\s?\'?"?([^\'"]+)')
    plpath = plugintools.find_single_match(str(pars),
                                           'file\'?"?:\s?\'?"?([^\.]+)')
    if plpath == "'": plpath = res
    swf = plugintools.find_single_match(
        str(pars), 'flash\'?"?,\s?src\'?"?:\s?\'?"?([^\'"]+)')
    body = ''
    tok = curl_frame(tokserv, url, body)
    tok = plugintools.find_single_match(str(tok), 'token":"([^"]+)')
    media_url = str(strmr) + ' playpath=' + str(
        plpath) + ' flashver=' + urllib.quote_plus(
            'WIN 14,0,0,176') + ' swfUrl=' + str(
                swf) + ' timeout=15 live=1 pageUrl=' + url + ' token=' + tok
    what_to_do(media_url)
Example #2
0
def popeoftheplayers(url, ref, res, script):
    from roja import new_frame
    purl = urlparse.urlsplit(url)
    burl = '%s://%s/'
    burl = burl % (purl[0], purl[1])
    p = '(id|width|height)=\'?([^,\']+)'
    p = plugintools.find_multiple_matches(res[0][0], p)
    url = 'http://popeoftheplayers.eu/player4.php?id=' + p[0][
        1] + '&width' + p[1][1] + '&height=' + p[2][1]
    body, jar, resp, ref = new_frame(url, burl, '', '')
    p = '(x-shockwave-flash"\sdata|flashvars"\svalue)="([^"]+)'
    p = plugintools.find_multiple_matches(body, p)
    print body, url, ref, burl, jar
    sys.exit()
    plpath = p[1][1].split('&amp;')[0].split('=')[1]
    rtmp = p[1][1].split('&amp;')[1].split('=')[1]
    swf = p[0][1]
    w = rtmp + ' playpath=' + plpath + ' timeout=15 swfUrl=' + swf + ' live=true pageUrl=' + url
    print w
    if w:
        plugintools.play_resolved_url(w)
        sys.exit()
    else:
        eval(nolink)
        sys.exit()
Example #3
0
def cndhlsstream(url,ref,res,script):
 #xbmcUtils.showBusyAnimation()
 from roja import new_frame;body,jar,resp,ref=new_frame(url,url,'','');r='document\.write\(\s?unescape\(\s?\'([^\']+)';
 r=urllib.unquote_plus(plugintools.find_single_match(body,r));p='src="([^"]+)';purl=plugintools.find_single_match(r,p);
 p='src="([^\?]+).*?streamer=([^\&]+).*?file=([^\&]+)';p=plugintools.find_multiple_matches(r,p);
 w=p[0][1]+' playpath='+p[0][2]+' swfUrl='+p[0][0]+' live=true pageUrl='+purl
 if w: plugintools.play_resolved_url(w);sys.exit();
 else: eval(nolink);sys.exit();
def iguide(url,ref,res):
 #clodfront protect,print resp in try_to_parse_as_new
 #vipracing tiene otro referer no el que sale aqui
 #print sys._getframe().f_code.co_argcount,locals().keys(),sys._getframe().f_code.co_varnames
 #print("\n$[ %s ]$\n%s\n%s\n%s"%(sys._getframe().f_code.co_name.upper(),url,ref,res));sys.exit();
 from roja import new_frame;refi=ref;body,jar,resp,ref=new_frame(res[0][2],ref,'','');url=plugintools.find_single_match(body,'src=\'([^\']+)');
 body,jar,resp,ref=new_frame(url,refi,'',jar);
 p = re.compile(ur'(\$\.getJSON\(\'?"?.*?)<\/script>', re.DOTALL);
 pars=re.findall(p,body);pars=str(pars[0]);pars=pars.replace("\n","").replace("\t","");
 tokserv=plugintools.find_single_match(str(pars),'getJSON\(\'?"?([^\'"]+)');
 strmr=plugintools.find_single_match(str(pars),'streamer\'?"?:\s?\'?"?([^\'"]+)');
 plpath=plugintools.find_single_match(str(pars),'file\'?"?:\s?\'?"?([^\.]+)');
 if plpath=="'": plpath=res;
 swf=plugintools.find_single_match(str(pars),'flash\'?"?,\s?src\'?"?:\s?\'?"?([^\'"]+)');
 body='';tok=curl_frame(tokserv,url,body);tok=plugintools.find_single_match(str(tok),'token":"([^"]+)');
 media_url = str(strmr)+' playpath='+str(plpath)+' flashver='+urllib.quote_plus('WIN 14,0,0,176')+' swfUrl='+str(swf)+' timeout=15 live=1 pageUrl='+url+' token='+tok
 what_to_do(media_url)
def popeoftheplayers(url,ref,res,script):
 from roja import new_frame;purl=urlparse.urlsplit(url);burl='%s://%s/';burl=burl%(purl[0],purl[1]);p='(id|width|height)=\'?([^,\']+)';
 p=plugintools.find_multiple_matches(res[0][0],p);url='http://popeoftheplayers.eu/player4.php?id='+p[0][1]+'&width'+p[1][1]+'&height='+p[2][1];
 body,jar,resp,ref=new_frame(url,burl,'','');p='(x-shockwave-flash"\sdata|flashvars"\svalue)="([^"]+)';p=plugintools.find_multiple_matches(body,p);
 print body,url,ref,burl,jar;sys.exit()
 plpath=p[1][1].split('&amp;')[0].split('=')[1];rtmp=p[1][1].split('&amp;')[1].split('=')[1];swf=p[0][1];
 w=rtmp+' playpath='+plpath+' timeout=15 swfUrl='+swf+' live=true pageUrl='+url;print w
 if w: plugintools.play_resolved_url(w);sys.exit();
 else: eval(nolink);sys.exit();
Example #6
0
def privatestream(url, ref, res, script):
    from roja import new_frame
    body, jar, resp, ref = new_frame(url, ref, '', '', '')
    pgurl = url
    r = '.*var a =\s*([^;]+).*var b =\s*([^;]+).*var c =\s*([^;]+).*var d =\s*([^;]+).*var f =\s*([^;]+).*var v_part =\s*\'([^\']+).*'
    w = plugintools.find_multiple_matches(body, r)
    rtmp = 'rtmp://' + str(int(w[0][0]) / int(w[0][4])) + '.' + str(
        int(w[0][1]) / int(w[0][4])
    ) + '.' + str(int(w[0][2]) / int(w[0][4])) + '.' + str(
        int(w[0][3]) / int(w[0][4])
    ) + w[0][
        5] + ' swfUrl=http://privatestream.tv/js/jwplayer.flash.swf live=1 timeout=15 swfVfy=1 pageUrl=' + pgurl
    what_to_do(rtmp)
Example #7
0
def byetv(url, ref, res, script):
    from roja import new_frame
    res = res[0][2]
    if 'channel.php' in res:
        file = 'file=([^\&]+)'
        res = 'http://www.byetv.org/embed.php?a=' + plugintools.find_single_match(
            res, file) + '&id=&width=653&height=410&autostart=true&strech='
        body, jar, resp, ref = new_frame(res, url, '', '')
    swf = 'new\sSWFObject\(\'?"?([^\'"]+)'
    swf = 'http://www.byetv.org' + plugintools.find_single_match(body, swf)
    p = '(token|file|streamer)\',\s\'([^\']+)'
    match = plugintools.find_multiple_matches_multi(body, p)
    media_url = match[2][1] + " playpath=file:" + match[1][
        1] + " swfUrl=" + swf + " live=1 token=" + match[0][
            1] + " timeout=15 swfVfy=1 pageUrl=" + url
    what_to_do(media_url)
Example #8
0
def directwatch(params):
    plugintools.log("[movie.ultra.7k-0.3.0].directwatch " + repr(params))
    url_user = {}
    url_user["token"] = 'KUidj872jf9867123444'
    url_user["rtmp"] = 'rtmp://watch.direct2watch.com/direct2watch'
    url_user["swfurl"] = 'http://www.direct2watch.com/player/player2.swf'

    # 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://www.vipracing.tv'

    res = gethttp_referer_headers(pageurl, referer)

    try:
        from roja import new_frame
        refi = ref
        body, jar, resp, ref = new_frame(res[0][2], ref, '', '')
        url = plugintools.find_single_match(body, 'src=\'([^\']+)')
        body, jar, resp, ref = new_frame(url, refi, '', jar)
        p = re.compile(ur'(\$\.getJSON\(\'?"?.*?)<\/script>', re.DOTALL)
        pars = re.findall(p, body)
        pars = str(pars[0])
        pars = pars.replace("\n", "").replace("\t", "")
        tokserv = plugintools.find_single_match(str(pars),
                                                'getJSON\(\'?"?([^\'"]+)')
        strmr = plugintools.find_single_match(
            str(pars), 'streamer\'?"?:\s?\'?"?([^\'"]+)')
        plpath = plugintools.find_single_match(str(pars),
                                               'file\'?"?:\s?\'?"?([^\.]+)')
        if plpath == "'": plpath = res
        swf = plugintools.find_single_match(
            str(pars), 'flash\'?"?,\s?src\'?"?:\s?\'?"?([^\'"]+)')
        body = ''
        tok = gethttp_referer_headers(tokserv, url)
        tok = plugintools.find_single_match(str(tok), 'token":"([^"]+)')
        media_url = str(strmr) + ' playpath=' + str(
            plpath) + ' flashver=' + urllib.quote_plus(
                'WIN 14,0,0,176') + ' swfUrl=' + str(
                    swf
                ) + ' timeout=15 live=1 pageUrl=' + url + ' token=' + tok
        plugintools.play_resolved_url(media_url)

    except:
        print url, res, ref
        body = ''
        body = gethttp_referer_headers(pageurl, referer)
        p = re.compile(ur'(\$\.getJSON\(\'?"?.*?)<\/script>', re.DOTALL)
        pars = re.findall(p, body)
        pars = str(pars[0])
        pars = pars.replace("\n", "").replace("\t", "")
        tokserv = plugintools.find_single_match(str(pars),
                                                'getJSON\(\'?"?([^\'"]+)')
        strmr = plugintools.find_single_match(
            str(pars), 'streamer\'?"?:\s?\'?"?([^\'"]+)')
        plpath = plugintools.find_single_match(str(pars),
                                               'file\'?"?:\s?\'?"?([^\.]+)')
        if plpath == "'": plpath = res
        swf = plugintools.find_single_match(
            str(pars), 'flash\'?"?,\s?src\'?"?:\s?\'?"?([^\'"]+)')
        body = ''
        tok = gethttp_referer_headers(tokserv, url)
        tok = plugintools.find_single_match(str(tok), 'token":"([^"]+)')
        media_url = str(strmr) + ' playpath=' + str(plpath) + ' swfUrl=' + str(
            swf) + ' live=1 pageUrl=' + url + ' token=' + tok
        print media_url
        plugintools.play_resolved_url(media_url)

    #p='(embed\/|\&width=|\&height=)(\d{1,3})';match=plugintools.find_multiple_matches(pageurl,p);print match
    #url='http://www.direct2watch.com/embedplayer.php?width='+match[1][1]+'&height='+match[2][1]+'&channel='+match[0][1]+'&autoplay=true'
    body = gethttp_referer_headers(pageurl, referer)

    try:
        p = 'window\.open\("([^"]+)'
        match = plugintools.find_multiple_matches(body, p)[1]
        m = match.split('/')[5]
        #print match.replace(m,'')+m.split('-')[2].replace(' ','_');sys.exit();
        #if match: body=gethttp_referer_headers(match.replace(m,'')+m.split('-')[2].replace(' ','_'),url);
    except:
        pass
    #print body;sys.exit()

    p = '(\$\.getJSON\(|streamer\'?"?:?\s?|file\'?"?:?\s?|flash\'?"?,\s?src:?\s?)\'?"?([^\'"]+)'
    match = plugintools.find_multiple_matches_multi(body, p)
    print match
    tokserv = match[0][1]
    strmr = match[1][1].replace("\\", "")
    plpath = match[2][1].replace(".flv", "")
    swf = match[3][1]
    request_headers = []
    request_headers.append(
        ["User-Agent", "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"])
    request_headers.append(["Referer", url])
    body, response_headers = plugintools.read_body_and_headers(
        tokserv, headers=request_headers)
    p = ':\'?"?([^\'"]+)'
    tok = plugintools.find_single_match(body, p)
    media_url = strmr + "/" + plpath + " swfUrl=" + swf + " live=1 token=" + tok + " timeout=15 swfVfy=1 pageUrl=" + url
    plugintools.play_resolved_url(media_url)
def byetv(url,ref,res,script):
 from roja import new_frame;res=res[0][2];
 if 'channel.php' in res:file='file=([^\&]+)';res='http://www.byetv.org/embed.php?a='+plugintools.find_single_match(res,file)+'&id=&width=653&height=410&autostart=true&strech=';body,jar,resp,ref=new_frame(res,url,'','');
 swf='new\sSWFObject\(\'?"?([^\'"]+)';swf='http://www.byetv.org'+plugintools.find_single_match(body,swf)
 p='(token|file|streamer)\',\s\'([^\']+)';match=plugintools.find_multiple_matches_multi(body,p);
 media_url=match[2][1]+" playpath=file:"+match[1][1]+" swfUrl="+swf+" live=1 token="+match[0][1]+" timeout=15 swfVfy=1 pageUrl="+url;
 what_to_do(media_url)
def privatestream(url,ref,res,script):
 from roja import new_frame;body,jar,resp,ref=new_frame(url,ref,'','','');pgurl=url;
 r='.*var a =\s*([^;]+).*var b =\s*([^;]+).*var c =\s*([^;]+).*var d =\s*([^;]+).*var f =\s*([^;]+).*var v_part =\s*\'([^\']+).*';
 w=plugintools.find_multiple_matches(body,r);rtmp='rtmp://'+str(int(w[0][0])/int(w[0][4]))+'.'+str(int(w[0][1])/int(w[0][4]))+'.'+str(int(w[0][2])/int(w[0][4]))+'.'+str(int(w[0][3])/int(w[0][4]))+w[0][5]+' swfUrl=http://privatestream.tv/js/jwplayer.flash.swf live=1 timeout=15 swfVfy=1 pageUrl='+pgurl;
 what_to_do(rtmp);
Example #11
0
def directwatch(params):
    plugintools.log("[PLD.VisionTV-0.3.0].directwatch "+repr(params))
    url_user = {}
    url_user["token"]='KUidj872jf9867123444'
    url_user["rtmp"]='rtmp://watch.direct2watch.com/direct2watch'
    url_user["swfurl"]='http://www.direct2watch.com/player/player2.swf'    
    
    
    # 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://www.vipracing.tv'
        
    res = gethttp_referer_headers(pageurl, referer)

    try:
        from roja import new_frame
        refi=ref
        body,jar,resp,ref=new_frame(res[0][2],ref,'','')
        url=plugintools.find_single_match(body,'src=\'([^\']+)')
        body,jar,resp,ref=new_frame(url,refi,'',jar)
        p = re.compile(ur'(\$\.getJSON\(\'?"?.*?)<\/script>', re.DOTALL)
        pars=re.findall(p,body);pars=str(pars[0]);pars=pars.replace("\n","").replace("\t","")
        tokserv=plugintools.find_single_match(str(pars),'getJSON\(\'?"?([^\'"]+)');
        strmr=plugintools.find_single_match(str(pars),'streamer\'?"?:\s?\'?"?([^\'"]+)');
        plpath=plugintools.find_single_match(str(pars),'file\'?"?:\s?\'?"?([^\.]+)');
        if plpath=="'": plpath=res;
        swf=plugintools.find_single_match(str(pars),'flash\'?"?,\s?src\'?"?:\s?\'?"?([^\'"]+)');
        body='';tok=gethttp_referer_headers(tokserv,url);tok=plugintools.find_single_match(str(tok),'token":"([^"]+)');
        media_url = str(strmr)+' playpath='+str(plpath)+' flashver='+urllib.quote_plus('WIN 14,0,0,176')+' swfUrl='+str(swf)+' timeout=15 live=1 pageUrl='+url+' token='+tok
        plugintools.play_resolved_url(media_url)

    except:
        print url,res,ref
        body='';body=gethttp_referer_headers(pageurl, referer);
        p = re.compile(ur'(\$\.getJSON\(\'?"?.*?)<\/script>', re.DOTALL)
        pars=re.findall(p,body);pars=str(pars[0]);pars=pars.replace("\n","").replace("\t","");
        tokserv=plugintools.find_single_match(str(pars),'getJSON\(\'?"?([^\'"]+)');
        strmr=plugintools.find_single_match(str(pars),'streamer\'?"?:\s?\'?"?([^\'"]+)');
        plpath=plugintools.find_single_match(str(pars),'file\'?"?:\s?\'?"?([^\.]+)');
        if plpath=="'": plpath=res;
        swf=plugintools.find_single_match(str(pars),'flash\'?"?,\s?src\'?"?:\s?\'?"?([^\'"]+)');
        body='';tok=gethttp_referer_headers(tokserv,url);tok=plugintools.find_single_match(str(tok),'token":"([^"]+)');
        media_url = str(strmr)+' playpath='+str(plpath)+' swfUrl='+str(swf)+' live=1 pageUrl='+url+' token='+tok
        print media_url
        plugintools.play_resolved_url(media_url)
    
    


    #p='(embed\/|\&width=|\&height=)(\d{1,3})';match=plugintools.find_multiple_matches(pageurl,p);print match
    #url='http://www.direct2watch.com/embedplayer.php?width='+match[1][1]+'&height='+match[2][1]+'&channel='+match[0][1]+'&autoplay=true'
    body=gethttp_referer_headers(pageurl,referer);
    
    try:
        p='window\.open\("([^"]+)';match=plugintools.find_multiple_matches(body,p)[1];m=match.split('/')[5];
        #print match.replace(m,'')+m.split('-')[2].replace(' ','_');sys.exit();
        #if match: body=gethttp_referer_headers(match.replace(m,'')+m.split('-')[2].replace(' ','_'),url);
    except: pass
    #print body;sys.exit()

    p='(\$\.getJSON\(|streamer\'?"?:?\s?|file\'?"?:?\s?|flash\'?"?,\s?src:?\s?)\'?"?([^\'"]+)'
    match=plugintools.find_multiple_matches_multi(body,p);print match
    tokserv = match[0][1];strmr = match[1][1].replace("\\","");plpath = match[2][1].replace(".flv","");swf = match[3][1];request_headers=[]
    request_headers.append(["User-Agent","Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"]);request_headers.append(["Referer",url])
    body,response_headers = plugintools.read_body_and_headers(tokserv, headers=request_headers);p=':\'?"?([^\'"]+)';tok=plugintools.find_single_match(body,p)
    media_url=strmr+"/"+plpath+" swfUrl="+swf+" live=1 token="+tok+" timeout=15 swfVfy=1 pageUrl="+url;
    plugintools.play_resolved_url(media_url)