Beispiel #1
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)["referer"][0]
        except:
            referer = url

        page = urlparse.parse_qs(urlparse.urlparse(url).query)["live"][0]
        page = "http://www.yocast.tv/embed.php?live=%s&vw=600&vh=450" % page

        result = client.request(page, referer=referer)

        file = re.compile("file\s*:\s*(?:'|\")(.+?)(?:'|\")").findall(result)[-1].replace(".flv", "")
        rtmp = re.compile("streamer\s*:\s*(?:'|\")(.+?)(?:'|\")").findall(result)[-1]
        url = (
            rtmp
            + " playpath="
            + file
            + " swfUrl=http://www.yocast.tv/myplayer/jwplayer.flash.swf flashver="
            + constants.flash_ver()
            + " live=1 timeout=14 swfVfy=1 pageUrl="
            + page
        )
        return url
    except:
        return
Beispiel #2
0
def resolve(url):

    try:
        session=requests.Session()
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        id = urlparse.parse_qs(urlparse.urlparse(url).query)['stream'][0]
        url = 'http://www.04stream.com/weed.js?stream=%s&width=600&height=460&str=is&link=1&cat=1'%id
        
        session.headers.update({'referer': referer,
                                'User-agent' : client.agent()})

        result = session.get(url).text
        result = decryptionUtils.doDemystify(result)
        src = re.compile('.*?src=([^\'"><]+).*').findall(result)[0] + 'thefeed2all.eu'
        page = src
        ref2 = src
        result = session.get(src).text
        
        try:
            captcha = re.compile("<input type=\"hidden\" name=\"x\" value=\"(.+?)\">").findall(result)[0]
            url = re.compile("<input type=\"hidden\" name=\"url\" value=\"(.+?)\">").findall(result)[0]
            if 'http' not in url:
                url = 'http://www.04stream.com'+ url
            cap_url = 'http://www.blocked.com/captcha.php?x=' + captcha
            urllib.urlretrieve(cap_url,captcha_img)
            input = get_response(captcha_img)
            post_data = {'blockscript' : 'captcha',
                         'x' : captcha,
                         'url' : url,
                         'val' : input}
            session.headers.update({'Host':'www.04stream.com',
                                'Origin': 'http://www.04stream.com',
                                'Referer' : ref2})

            result = session.put(url, data=urllib.urlencode(post_data))
            result=result.text
        except:
            pass
        result = decryptionUtils.doDemystify(result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        server_id = re.findall('.*?boxig=.*?&srp=(\d+)',result)[0]
        rtmp = rowbalance.get(server_id)
        var.append(('thist',rtmp))
        for i in range(100):
            for v in var: result = result.replace("+%s+" % v[0], '%s'%v[1])
            for v in var: result = result.replace("+%s" % v[0], '%s'%v[1])
            for v in var: result = result.replace("%s+" % v[0], '%s'%v[1])
            
        
        
        file = re.findall("&file=(rtmp://[^&]+)&",result)[0]#.replace('/stream//','').replace('/stream/','').replace('?.stream','.stream')
        file = file.replace('\'','').replace('"','')
        url = file + ' swfUrl=http://thecdn.04stream.com/p/ooolo1.swf flashver=' + constants.flash_ver() + ' timeout=15 live=1 pageUrl='+page
        return url
    except:
        return
Beispiel #3
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer=url
    
        result = client.request(url, referer=referer)
        rtmp = re.findall('.*?[\'"]?file[\'"]?[:,]\s*[\'"]([^\'"]+)[\'"].*',result)[0]
        url = rtmp+' swfUrl=http://sostart.org/jw/jwplayer.flash.swf flashver=' + constants.flash_ver() + ' token=SECURET0KEN#yw%.?()@W! live=1 timeout=14 swfVfy=1 pageUrl='+url
        return url
    except:
        return
Beispiel #4
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url

        channel = urlparse.urlparse(url).path
        channel = re.compile('/([\w]+)').findall(channel)[-1]
        domain = urlparse.urlparse(url).netloc

        pageUrl = urlparse.urljoin('http://%s' % domain, channel)
        if 'instagib' in domain: playpath = 'instagib_%s' % channel
        elif 'breakers' in domain: playpath = 'btv_%s' % channel
        elif 'vapers' in domain: playpath = 'vtv_%s' % channel
        else: playpath = 'live_%s' % channel

        import requests
        s = requests.session()
        result = s.get(pageUrl).text
        swfUrl = re.compile('"(/\d+/swf/[0-9A-Za-z]+\.swf)').findall(result)[0]
        swfUrl = urlparse.urljoin(pageUrl, swfUrl)

        s.headers = {
            'User-agent': client.agent(),
            'X-Requested-With': constants.get_shockwave(),
            'Accept-Encoding': 'gzip, deflate, lzma, sdch',
            'Connection': 'keep-alive',
            'Host': 'mvn.vaughnsoft.net',
            'Referer': 'http://vaughnlive.tv/' + channel
        }
        infoUrl = 'http://mvn.vaughnsoft.net/video/edge/mnv-%s' % (playpath)
        result = s.get(infoUrl).text
        streamer = re.compile('(.+?);').findall(result)[0]
        streamer = 'rtmp://%s/live' % streamer
        app = re.compile('mvnkey-(.+)').findall(result)[0].replace("0m0", "")
        app = 'live?%s' % app

        url = '%s app=%s playpath=%s pageUrl=http://vaughnlive.tv/ swfUrl=%s live=true flashver=%s timeout=15' % (
            streamer, app, playpath, swfUrl, constants.flash_ver())

        return url
    except:
        return
Beispiel #5
0
def resolve(url):
    try:    
        session=requests.Session()
        id = urlparse.parse_qs(urlparse.urlparse(url).query)['u'][0]
        referer = url
        session.headers.update({'referer': referer,
                                'User-agent' : client.agent()})

        result = session.get(url).text
        try:
            captcha = re.compile("<input type=\"hidden\" name=\"x\" value=\"(.+?)\">").findall(result)[0]
            url = re.compile("<input type=\"hidden\" name=\"url\" value=\"(.+?)\">").findall(result)[0]
            if 'http' not in url:
                url = 'http://www.lshstreams.com'+ url
            cap_url = 'http://www.blocked.com/captcha.php?x=' + captcha
            urllib.urlretrieve(cap_url,captcha_img)
            input = get_response(captcha_img)
            post_data = {'blockscript' : 'captcha',
                         'x' : captcha,
                         'url' : url,
                         'val' : input}
            session.headers.update({'Host':'www.lshstreams.com',
                                'Origin': 'http://www.lshstreams.com'})
            result = session.post(url, data=urllib.urlencode(post_data)).text
        except:
          pass
        streamer = result.replace('//file', '')
        streamer = re.compile("file *: *'(.+?)'").findall(streamer)[-1]

        url=streamer + ' swfUrl=http://www.lshstreams.com/jw/jwplayer.flash.swf flashver=' + constants.flash_ver() + ' live=1 token=SECURET0KEN#yw%.?()@W! timeout=14 swfVfy=1 pageUrl=http://cdn.lshstreams.com/embed.php?u=' + id

        return url.strip()
    except:
        return
Beispiel #6
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url

        id = urlparse.parse_qs(urlparse.urlparse(url).query)['game'][0]

        ts = int(time.time())

        tk = 'http://sportstream365.com/LiveFeed/GetGame?lng=ru&id=' + id + '&partner=24&_=' + str(
            ts)

        html = client.request(tk, referer='http://www.sportstream365.com/')
        file = re.findall('.*?VI[\'"]*[:,]\s*[\'"]([^\'"]+)[\'"].*', html)[0]
        rt = _resolve('rtmpe://xlive.sportstream365.com/xlive')
        rand = str(random.randint(10000000000000000, 99999999999999999))
        url = rt + ' playpath=raw:' + file + ' conn=S:client conn=S:3.1.0.10 conn=S:en live=1 timeout=15 pageUrl=http://www.sportstream365.com/ swfVfy=http://sportstream365.com/swf/VideoPlayer.swf?x=0.' + rand + ' flashver=' + constants.flash_ver(
        )
        return url
    except:
        return
Beispiel #7
0
def resolve(url):
    try:

        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        headers = {
            'referer': referer,
            'Accept':
            'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
            'Content-Type': 'application/x-www-form-urlencoded',
            'Connection': 'keep-alive',
            'Host': 'www.zoomtv.me',
            'Origin': urlparse.urlparse(referer).netloc,
            'User-Agent': 'Apple-iPhone/701.341'
        }
        fid = urlparse.parse_qs(urlparse.urlparse(url).query)['v'][0]
        pid = urlparse.parse_qs(urlparse.urlparse(url).query)['pid'][0]
        url = 'http://www.zoomtv.me/embed.php?v=%s&vw=660&vh=450' % fid
        pageUrl = url
        post_data = urllib.urlencode({
            'uagent': 'Apple-iPhone/701.341',
            'pid': pid
        })

        #get mobile stream
        for i in range(30):
            try:
                result = req(url, post_data, headers)
                streamer = re.findall(
                    'src=[\"\'](.+?)[\"\'].+?type=[\"\']video/mp4[\"\']',
                    result)[0]
                break
            except:
                streamer = None

        #get desktop stream
        headers.update({'User-Agent': client.agent()})
        post_data = urllib.urlencode({'uagent': client.agent(), 'pid': pid})
        for i in range(30):
            try:
                result = req(url, post_data, headers)
                rtmp = re.findall('streamer:([^,]+)', result)[0].replace(
                    "+''", '').replace("''+", '').replace("+''+", '')
                break
            except:
                rtmp = None

        #for HQ links(no rtmp)
        if rtmp is None:
            return streamer + '|%s' % urllib.urlencode(
                {
                    'user-agent': client.agent(),
                    'Referer': referer
                })

        #exctract params from m3u8 link and add it to rtmp
        file = urlparse.parse_qs(urlparse.urlparse(streamer).query)['file'][0]
        sg = urlparse.parse_qs(urlparse.urlparse(streamer).query)['sg'][0]
        ts = urlparse.parse_qs(urlparse.urlparse(streamer).query)['ts'][0]
        auth = urlparse.parse_qs(urlparse.urlparse(streamer).query)['auth'][0]
        url = rtmp + ' playpath=' + file + ' swfUrl=http://static.zoomtv.me/player/jwplayer.6.5.3.swf flashver=' + constants.flash_ver(
        ) + ' conn=S:' + file + ' conn=S:' + ts + ' conn=S:' + sg + ' conn=S:' + auth + ' live=1 timeout=15 token=Q!lrB@G1)ww(-dQ4J4 swfVfy=1 pageUrl=' + pageUrl

        return url
    except:
        return
Beispiel #8
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url

        page = urlparse.parse_qs(urlparse.urlparse(url).query)['live'][0]
        page = 'http://www.yocast.tv/embed.php?live=%s&vw=600&vh=450' % page

        result = client.request(page, referer=referer)

        file = re.compile('file\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[-1].replace('.flv','')
        rtmp = re.compile('streamer\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[-1]
        url = rtmp + ' playpath='+file+' swfUrl=http://www.yocast.tv/myplayer/jwplayer.flash.swf flashver=' + constants.flash_ver() + ' live=1 timeout=14 swfVfy=1 pageUrl=' + page
        return url
    except:
        return
Beispiel #9
0
def resolve(url):
    try:

        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        headers = { 'referer': referer,
                                 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
                                 'Content-Type' :'application/x-www-form-urlencoded',
                                 'Connection' : 'keep-alive',
                                 'Host' : 'www.zoomtv.me',
                                 'Origin' : urlparse.urlparse(referer).netloc,
                                 'User-Agent' : 'Apple-iPhone/701.341'
                                 }
        fid = urlparse.parse_qs(urlparse.urlparse(url).query)['v'][0]
        pid = urlparse.parse_qs(urlparse.urlparse(url).query)['pid'][0]
        url = 'http://www.zoomtv.me/embed.php?v=%s&vw=660&vh=450'%fid
        pageUrl = url
        post_data = urllib.urlencode({'uagent':'Apple-iPhone/701.341', 'pid':pid})
    
        #get mobile stream
        for i in range(30):
            try:
                result = req(url,post_data,headers)
                streamer = re.findall('src=[\"\'](.+?)[\"\'].+?type=[\"\']video/mp4[\"\']',result)[0]
                break
            except:
                streamer = None


        #get desktop stream
        headers.update({ 'User-Agent' : client.agent() })
        post_data = urllib.urlencode({'uagent':client.agent(), 'pid':pid})
        for i in range(30):
            try:
                result = req(url,post_data,headers)
                rtmp = re.findall('streamer:([^,]+)',result)[0].replace("+''",'').replace("''+",'').replace("+''+",'')
                break
            except:
                rtmp = None

        #for HQ links(no rtmp)
        if rtmp is None:
            return streamer + '|%s' % urllib.urlencode({'user-agent':client.agent(),'Referer':referer})

        #exctract params from m3u8 link and add it to rtmp
        file = urlparse.parse_qs(urlparse.urlparse(streamer).query)['file'][0]
        sg = urlparse.parse_qs(urlparse.urlparse(streamer).query)['sg'][0]
        ts = urlparse.parse_qs(urlparse.urlparse(streamer).query)['ts'][0]
        auth = urlparse.parse_qs(urlparse.urlparse(streamer).query)['auth'][0]
        url = rtmp + ' playpath=' + file + ' swfUrl=http://static.zoomtv.me/player/jwplayer.6.5.3.swf flashver=' +constants.flash_ver() + ' conn=S:' + file + ' conn=S:'+ts+' conn=S:'+sg+' conn=S:'+auth+' live=1 timeout=15 token=Q!lrB@G1)ww(-dQ4J4 swfVfy=1 pageUrl=' + pageUrl

        return url
    except:
        return
Beispiel #10
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        id = urlparse.parse_qs(urlparse.urlparse(url).query)['channel'][0]
        token_url = 'http://www.letgo.tv/securetoken.php?id=%s'%id
        result = client.request(token_url, referer = referer)
        rtmp = re.findall('.*rtmp":"([^"]+)"',result)[0]
        file = re.findall('"streamname":"([^"]+)"',result)[0]
        token = re.findall('"token":"([^"]+).*',result)[0]
        url = rtmp + ' playpath='+file+' swfUrl=http://p.jwpcdn.com/6/12/jwplayer.flash.swf live=1 flashver=' + constants.flash_ver() + ' timeout=10 token=' + token + ' swfVfy=1 pageUrl=' + referer
        

        return url
    except:
        return
Beispiel #11
0
def resolve(url):
    #try:

        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        headers = { 'Referer': referer,
                                 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
                                 'Content-Type' :'application/x-www-form-urlencoded',
                                 'Connection' : 'keep-alive',
                                 'Host' : 'www.zoomtv.me',
                                 'Origin' : urlparse.urlparse(referer).netloc,
                                 'User-Agent' : client.agent()
                                 }
        fid = urlparse.parse_qs(urlparse.urlparse(url).query)['v'][0]
        pid = urlparse.parse_qs(urlparse.urlparse(url).query)['pid'][0]
        url = 'http://www.zoomtv.me/embed.php?v=%s&vw=650&vh=450'%fid
        pageUrl = url
        
        
        #get desktop stream
        #headers.update({ 'User-Agent' : 'Apple-iPhone/701.341' })
        post_data = urllib.urlencode({'uagent':'Apple-iPhone/701.341', 'pid':pid})
        result = req(url,post_data,headers)
        log(result)
        
        rtmp = re.findall('.*[^\w](\w+)\s*=.{0,20}(rtmp[^\']*).*(?:streamer.{0,20}\1).*',result)[0]
        
    
        #for HQ links(no rtmp)
        if rtmp is None:
            return streamer + '|%s' % urllib.urlencode({'user-agent':client.agent(),'Referer':referer})

        url = rtmp + ' playpath=' + file + ' swfUrl=http://static.zoomtv.me/player/jwplayer.6.7.4.swf flashver=' +constants.flash_ver() + ' conn=S:' + file + ' conn=S:'+ts+' conn=S:'+sg+' conn=S:'+auth+' live=1 timeout=15 token=H69d331eccdf347b swfVfy=1 pageUrl=' + pageUrl

        return url
Beispiel #12
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        url = url.replace(referer,'').replace('?referer=', '')
        result = client.request(url, referer = referer)
        swf='http://www.embedezcast.com' + re.compile('SWFObject\(\"(.+?)".*?').findall(result)[0]
        vars = re.compile('id=(\d+)&s=([^&\'"]+).*?&pk=([^&\'"]+).*').findall(result)[0]
        id,channel,pk=vars[0],vars[1],vars[2]
        page2='http://www.embedezcast.com:1935/loadbalancer?' + id
        result = client.request(page2, referer=referer)
        ip = re.compile(".*redirect=([\.\d]+).*").findall(result)[0]
        rtmp='rtmp://%s/live/'%ip
        url='%s playPath=%s?id=%s&pk=%s swfVfy=1 timeout=10 conn=S:OK live=true swfUrl=%s flashver=' + constants.flash_ver() + ' pageUrl=%s'%(rtmp,channel,id,pk,swf,url)
        return url
    except:
        return
Beispiel #13
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url

        id = urlparse.parse_qs(urlparse.urlparse(url).query)['u'][0]
        url = 'http://www.finecast.tv/embed4.php?u=%s&vw=640&vh=450' % id

        headers = [("User-Agent", client.agent()), ("Referer", referer)]
        cj = get_cj()

        result = unCaptcha.performCaptcha(url, cj, headers=headers)

        cj.save(cookieFile, ignore_discard=True)

        file = re.findall('[\'\"](.+?.stream)[\'\"]', result)[0]
        auth = re.findall('[\'\"](\?wmsAuthSign.+?)[\'\"]', result)[0]
        rtmp = 'rtmp://play.finecast.tv:1935/live%s' % auth

        url = rtmp + ' playpath=' + file + ' swfUrl=http://www.finecast.tv/player6/jwplayer.flash.swf flashver=' + constants.flash_ver(
        ) + ' live=1 timeout=14 pageUrl=' + url
        return url

    except:
        return
Beispiel #14
0
def resolve(url):
    #try:
        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        page = url.replace(referer, '').replace('&referer=', '').replace('referer=', '')

        result = client.request(page, referer=referer)
        result = decryptionUtils.doDemystify(result)
        token = re.findall(r'(\["\\x.+?[^\]]+\])',result)[0]
        token = eval(token)[1]
        rtmp = re.findall('.*(?:file|streamer|hestia):\s*["\']([^\'"]+).*',result)[0]
        url = rtmp + ' swfUrl=http://mybeststream.xyz/YjFlMTI0MT/jwplayer.flash.swf token=' + token + ' flashver=' + constants.flash_ver() + ' live=1 timeout=15 swfVfy=1 pageUrl=' + page
        return url
Beispiel #15
0
def resolve(url):
    try:
        try:
            cid = urlparse.parse_qs(urlparse.urlparse(url).query)['cid'][0]
        except:
            cid = re.compile('channel/(.+?)(?:/|$)').findall(url)[0]

        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = 'http://castalba.tv'

        url = 'http://castalba.tv/embed.php?cid=%s&wh=600&ht=380&r=%s' % (
            cid, urlparse.urlparse(referer).netloc)
        pageUrl = url

        result = client.request(url, referer=referer, mobile=True)
        result = urllib.unquote(result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        var_dict = dict(var)

        if 'm3u8' in result:
            url = re.compile('file.+?\s*=\s*(?:unescape\()[\'\"](.+?)[\'\"]'
                             ).findall(result)[0]
            url = 'http://' + url + '.m3u8'
            url += '|%s' % urllib.urlencode({
                'User-Agent': client.agent(),
                'Referer': referer
            })
            log("Castalba: Found m3u8 url: " + url)

        else:
            try:
                filePath = re.compile(
                    "'file'\s*:\s*(?:unescape\()?'(.+?)'").findall(result)[0]

            except:
                file = re.findall(
                    'var file\s*=\s*(?:unescape\()?(?:\'|\")(.+?)(?:\'|\")',
                    result)[0]
                try:
                    file2 = re.findall(
                        "'file':\s*unescape\(file\)\s*\+\s*unescape\('(.+?)'\)",
                        result)[0]
                    filePath = file + file2
                except:
                    filePath = file
            swf = re.compile("'flashplayer'\s*:\s*\"(.+?)\"").findall(
                result)[0]
            strm_func = result
            strm_func = re.sub('\s//[^;]+', '', strm_func)

            streamer = 'rtmp://' + re.findall('[\"\']([\d\.]+\/live).*',
                                              strm_func)[0]
            streamer = streamer.replace('///', '//')
            url = streamer + ' playpath=' + filePath + ' swfUrl=' + swf + ' flashver=' + constants.flash_ver(
            ) + ' live=true timeout=15 swfVfy=1 pageUrl=' + pageUrl
            log("Castalba: Found rtmp link: " + url)

        return url

    except:
        log("Castalba: Resolver failed. Returning...")
        return
Beispiel #16
0
def resolve(url):
    try:
    	

        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
    	except: referer = url
        url = liveresolver_utils.remove_referer(url)
        page = url
        result = client.request(url, referer=referer)
        try:
            url = urllib.unquote(re.findall('.*file["]*\s*:\s*["\']([^"\']+)',result)[0])
        except:
            id = urlparse.parse_qs(urlparse.urlparse(url).query)['id'][0]
            url = 'http://aliez.tv/redir/c.php?i=' + id
            url2 = client.request(url,output='geturl')
            page = url2
            result = client.request(url2,referer='http://aliez.tv')
            url = urllib.unquote(re.findall('.*file["]*\s*:\s*["\']([^"\']+)',result)[0])

        url += ' live=true swfVfy=1 swfUrl=http://i.aliez.me/swf/playernew.swf flashver=%s pageUrl='%constants.flash_ver() + page
        return url
    except:
        return
Beispiel #17
0
def resolve(url):
    
    try:
        jar = get_cj()
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: 
            try:
                referer = re.findall('referer=([^$&]+)',url)[0]
            except:
                referer = url

        s = requests.Session()
        s.cookies = jar
        id = re.findall('embed/(\d+)',url)[0]
        page = 'http://www.streamlive.to/embedplayer_new2.php?width=840&height=490&channel=%s&autoplay=true'%id
        
        headers = {'Host':'www.streamlive.to','Referer':referer,'Connection':'keep-alive'}
        s.headers = headers
        result = s.get(page).text
        if 'captcha' in result:
            q = re.findall('Question:([^<]+)<',result)[0]
            ans = control.get_keyboard(q)
            if ans:
                result = s.post(page,data={'captcha':ans}).text
        token_url = re.compile('getJSON\("(.+?)"').findall(result)[0]
        if 'http' not in token_url:
            token_url = 'http:' + token_url
        r2 = client.request(token_url,referer=referer)
        token = json.loads(r2)["token"]

        file = re.compile('(?:[\"\'])?file(?:[\"\'])?\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[0].replace('.flv','')
        rtmp = re.compile('streamer\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[0].replace(r'\\','\\').replace(r'\/','/')
        app = re.compile('.*.*rtmp://[\.\w:]*/([^\s]+)').findall(rtmp)[0]
        url=rtmp + ' app=' + app + ' playpath=' + file + ' swfUrl=http://www.streamlive.to/ads/streamlive.swf flashver=' + constants.flash_ver() + ' live=1 timeout=15 token=' + token + ' swfVfy=1 pageUrl='+page

        jar.save (cookieFile,ignore_discard=True)
        return url
    except:
        return ''
Beispiel #18
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = 'http://zerocast.tv/channels'
        if 'chan=' in url:
            result = client.request(url, referer=referer)
            url = re.findall('src=[\'"](.+?)[\'"]>', result)[-1]

        page = url
        r = re.findall('.+?a=([0-9]+)', url)[0]

        url = 'http://zerocast.tv/embed.php?a=%s&id=&width=640&height=480&autostart=true&strech=exactfit' % r


        result = client.request(url, referer=referer)
        unpacked = ''
        packed = result.split('\n')
        for i in packed:
            try:
                unpacked += jsunpack.unpack(i)
            except:
                pass
        result += unpacked
        js = re.findall('getJSON\([\"\'](http://zerocast.tv/file[^\"\']+)',result)[0]
        token = json.loads(client.request(js))['token']
        r = re.findall('curl\s*=\s*[\'"](.+?)[\'"]', result)
        r = r[0].decode('base64', 'strict')

        if '.m3u8' in r or 'rtmp' in r:
            url = r
            return url + ' swfUrl=http://p.jwpcdn.com/6/12/jwplayer.flash.swf flashver=' + constants.flash_ver() + ' token=' + token + ' timeout=15 live=true swfVfy=1 pageUrl=' + page
    except:
        return
Beispiel #19
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
            url = url.replace('&referer=%s' % referer, '')
            url = url.replace('?referer=%s' % referer, '')
        except:
            referer = url

        page = url
        result = client.request(url, referer=referer)
        result = result.replace('","', '').replace('["', '').replace(
            '"]', '').replace('.join("")', ' ').replace(r'\/', '/')

        vars = re.findall('var (.+?)\s*=\s*(.+?);', result)
        inners = re.findall('id=(.+?)>([^<]+)<', result)
        inners = dict(inners)

        js = re.findall('srcs*=s*(?:\'|\")(.+?player\.js(?:.+?|))(?:\'|\")',
                        result)[0]
        js = client.request(js, referer=referer)
        token = re.findall('securetoken: ([^\n]+)', result)[0]
        token = re.findall('var\s+%s\s*=\s*(?:\'|\")(.+?)(?:\'|\")' % token,
                           js)[-1]

        for i in range(100):
            for v in vars:
                result = result.replace('  + %s' % v[0], v[1])
        for x in inners.keys():
            result = result.replace(
                '  + document.getElementById("%s").innerHTML' % x, inners[x])

        fs = re.findall('function (.+?)\(\)\s*\{\s*return\(([^\n]+)', result)
        url = re.findall('file:(.+?)\s*\}', result)[0]
        for f in fs:
            url = url.replace('%s()' % f[0], f[1])
        url = url.replace(');', '').split(" + '/' + ")
        streamer, file = url[0].replace('rtmpe', 'rtmp').strip(), url[1]
        url = streamer + '/ playpath=' + file + ' swfUrl=http://www.hdcast.info/myplayer/jwplayer.flash.swf flashver=' + constants.flash_ver(
        ) + ' live=1 timeout=20 token=' + token + ' pageUrl=' + page
        return url

    except:
        return
Beispiel #20
0
def resolve(url):
    #try:
    referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
    page = url.replace(referer, '').replace('&referer=',
                                            '').replace('referer=', '')

    result = client.request(page, referer=referer)
    result = decryptionUtils.doDemystify(result)
    log(result)
    rtmp = re.findall('.*(?:file|streamer|hestia):\s*["\']([^\'"]+).*',
                      result)[0]
    rtmp = rtmp.replace('rtmpe://l.mybeststream.xyz/r/', '')
    url = 'rtmpe://l.mybeststream.xyz/r/' + rtmp + ' swfUrl=http://mybeststream.xyz/jwplayer.flash.swf swfsize=61916 swfhash=e54728508e787f43cd472ef9ba2e514e2eca3f0679b3782206a3808b8d89b164 token=c.r.e.a.t.e.S.t. flashver=' + constants.flash_ver(
    ) + ' live=1 timeout=15 swfVfy=1 pageUrl=' + page
    return url
Beispiel #21
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        result = client.request(url, referer = referer)
        token = re.findall('securetoken\s*:\s*(?:\'|\")(.+?)(?:\'|\")',result)[0]
        rtmp = re.findall('file\s*:\s*(?:\'|\")(.+?)(?:\'|\")',result)[0]
        url = rtmp + ' swfUrl=http://p.jwpcdn.com/6/12/jwplayer.flash.swf live=1 flashver=' + constants.flash_ver() + ' token='  + token + ' timeout=14 swfVfy=1 pageUrl=' + url
        return url
    except:
        return
Beispiel #22
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url
        url = liveresolver_utils.remove_referer(url)

        result = client.request(url, referer=referer)
        streamer = re.findall("'streamer',\s*'(.+?)'\);", result)[0]
        file = re.findall("'file',\s*'(.+?)'\);", result)[0]

        token = re.findall("'token',\s*'(.+?)'\);", result)[0]
        url = streamer + ' playpath=' + file + ' swfUrl=http://www.castfree.me/player.swf flashver=' + constants.flash_ver(
        ) + ' token=' + token.decode(
            'ascii', 'ignore') + ' live=1 timeout=14 swfVfy=1 pageUrl=' + url
        return url
    except:
        return
Beispiel #23
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url
        url = url.replace(referer, '').replace('?referer=', '')
        result = client.request(url, referer=referer)
        swf = 'http://www.janjuaplayer.com' + re.compile(
            'SWFObject\(\"(.+?)".*?').findall(result)[0]
        vars = re.compile('id=(\d+)&s=([^&\'"]+).*?&pk=([^&\'"]+).*').findall(
            result)[0]
        id, channel, pk = vars[0], vars[1], vars[2]
        page2 = 'http://www.janjuapublisher.com:1935/loadbalancer?' + channel
        result = client.request(
            page2,
            referer='http://www.janjuaplayer.com/resources/scripts/eplayer.swf'
        )
        ip = re.compile(".*redirect=([\.\d]+).*").findall(result)[0]
        rtmp = 'rtmp://%s/live/' % ip
        url = '%s playPath=%s?id=%s&pk=%s swfVfy=1 timeout=10 conn=S:OK live=true swfUrl=%s flashver=' + constants.flash_ver(
        ) + ' pageUrl=%s' % (rtmp, channel, id, pk, swf, url)
        return url
    except:
        return
Beispiel #24
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = 'http://zerocast.tv/channels'
        if 'chan=' in url:
            result = client.request(url, referer=referer)
            url = re.findall('src=[\'"](.+?)[\'"]>', result)[-1]

        page = url
        r = re.findall('.+?a=([0-9]+)', url)[0]

        url = 'http://zerocast.tv/embed.php?a=%s&id=&width=640&height=480&autostart=true&strech=exactfit' % r

        result = client.request(url, referer=referer)
        unpacked = ''
        packed = result.split('\n')
        for i in packed:
            try:
                unpacked += jsunpack.unpack(i)
            except:
                pass
        result += unpacked
        js = re.findall('getJSON\([\"\'](http://zerocast.tv/file[^\"\']+)',
                        result)[0]
        token = json.loads(client.request(js))['token']
        r = re.findall('curl\s*=\s*[\'"](.+?)[\'"]', result)
        r = r[0].decode('base64', 'strict')

        if '.m3u8' in r or 'rtmp' in r:
            url = r
            return url + ' swfUrl=http://p.jwpcdn.com/6/12/jwplayer.flash.swf flashver=' + constants.flash_ver(
            ) + ' token=' + token + ' timeout=15 live=true swfVfy=1 pageUrl=' + page
    except:
        return
Beispiel #25
0
def resolve(url):
    try:
        try:
            cid  = urlparse.parse_qs(urlparse.urlparse(url).query)['cid'][0] 
        except:
            cid = re.compile('channel/(.+?)(?:/|$)').findall(url)[0]

        
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer='http://castalba.tv'
        
        url = 'http://castalba.tv/embed.php?cid=%s&wh=600&ht=380&r=%s'%(cid,urlparse.urlparse(referer).netloc)
        pageUrl=url

        result = client.request(url, referer=referer,mobile=True)
        result = decryptionUtils.doDemystify(result)
        result=urllib.unquote(result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        var_dict = dict(var)

        if 'm3u8' in result:
            url = re.compile('(?:var\s*)?file.+?\s*=\s*(?:unescape\()[\'\"](.+?)[\'\"]').findall(result)[-1]
            url = 'http://' + url + '.m3u8'
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url,'X-Requested-With':constants.get_shockwave()})
            log("Castalba: Found m3u8 url: " + url)
            
        else:
            try:
                filePath = re.compile("'file'\s*:\s*(?:unescape\()?'(.+?)'").findall(result)[0]
                
            except:
                file = re.findall('(?:var\s*)?file\s*=\s*(?:unescape\()?(?:\'|\")(.+?)(?:\'|\")',result)[-1]
                try:
                    file2 = re.findall("'file':\s*unescape\(file\)\s*\+\s*unescape\('(.+?)'\)",result)[0]
                    filePath = file+file2
                except:
                    filePath = file
            swf = re.compile("'flashplayer'\s*:\s*\"(.+?)\"").findall(result)[0]
            
            sm = re.findall("'streamer':(.+?),",result)[0]
            strm_funcs = re.findall('function\s*(.+?)\s*\{([^\}]+)',result,flags=re.DOTALL)
            for f in strm_funcs:
                if f[0] in ['(p,a,c,k,e,r)','()']:
                    continue
                if '%s'%f[0] in sm:
                    strm_func = f[1]
                    break
            strm_func = re.sub('\s//[^;]+','',strm_func)
            streamer = 'rtmp://' +  re.findall('.*["\'/](\d{1,3}\.\d{1,3}\.\d{1,3}\.[^"\'/]+)["\'/]',strm_func)[0] + '/live'
            streamer = streamer.replace('///','//')
            url = streamer  + ' playpath=' + filePath +' swfUrl=' + swf + ' flashver=' + constants.flash_ver() +' live=true timeout=15 swfVfy=true pageUrl=' + pageUrl
            log("Castalba: Found rtmp link: " + url)

        return url
    
    except:
        log("Castalba: Resolver failed. Returning...")
        return
Beispiel #26
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url

        result = client.request(url, referer=referer)
        swf = 'http://www.p3g.tv/resources/scripts/eplayer.swf'
        info = re.findall('id=(\d+)&s=([^&\'"]+).*?&pk=([^&\'"]+).*',result)[0]
        id,channel,pk = info
        rtmp_url = 'http://www.p3g.tv:1935/loadbalancer?' + id
        result = client.request(rtmp_url, referer=swf)
        rtmp = re.findall('.*redirect=([\.\d]+).*',result)[0]
        rtmp = 'rtmp://%s/live/'%rtmp
        url = rtmp + ' playPath=' + channel + '?id=' + id + '&pk='+pk+' swfVfy=1 timeout=15 conn=S:OK live=true swfUrl='+swf + ' flashver=' + constants.flash_ver() + ' pageUrl=' + url
        return url
    except:
        return
Beispiel #27
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url

        page = urlparse.parse_qs(urlparse.urlparse(url).query)['live'][0]
        page = 'http://www.yocast.tv/embed.php?live=%s&vw=600&vh=450' % page

        result = client.request(page, referer=referer)

        file = re.compile('file\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(
            result)[-1].replace('.flv', '')
        rtmp = re.compile('streamer\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(
            result)[-1]
        url = rtmp + ' playpath=' + file + ' swfUrl=http://www.yocast.tv/myplayer/jwplayer.flash.swf flashver=' + constants.flash_ver(
        ) + ' live=1 timeout=14 swfVfy=1 pageUrl=' + page
        return url
    except:
        return
Beispiel #28
0
def resolve(url):

    try:

        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
            url = url.replace(referer,
                              '').replace('?referer=',
                                          '').replace('&referer=', '')
        except:
            referer = url

        id = re.findall('embed/(\d+)', url)[0]
        page = 'http://www.streamlive.to/embedplayer_new2.php?width=620&height=470&channel=%s&autoplay=true' % id

        result = client.request(page,
                                headers={
                                    'referer': 'http://www.streamlive.to',
                                    'Content-type':
                                    'application/x-www-form-urlencoded',
                                    'Origin': 'http://www.streamlive.to',
                                    'Host': 'www.streamlive.to',
                                    'User-agent': client.agent()
                                })
        log(result)

        token_url = re.compile('getJSON\("(.+?)"').findall(result)[0]
        if 'http' not in token_url:
            token_url = 'http:' + token_url
        r2 = client.request(token_url, referer=referer)
        token = json.loads(r2)["token"]

        file = re.compile(
            '(?:[\"\'])?file(?:[\"\'])?\s*:\s*(?:\'|\")(.+?)(?:\'|\")'
        ).findall(result)[0].replace('.flv', '')
        rtmp = re.compile('streamer\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(
            result)[0].replace(r'\\', '\\').replace(r'\/', '/')
        app = re.compile('.*.*rtmp://[\.\w:]*/([^\s]+)').findall(rtmp)[0]
        url = rtmp + ' app=' + app + ' playpath=' + file + ' swfUrl=http://www.streamlive.to/ads/streamlive.swf flashver=' + constants.flash_ver(
        ) + ' live=1 timeout=15 token=' + token + ' swfVfy=1 pageUrl=' + page

        return url
    except:
        return
Beispiel #29
0
def resolve(url):
    #try:
    referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
    page = url.replace(referer, '').replace('&referer=',
                                            '').replace('referer=', '')

    result = client.request(page, referer=referer)
    result = decryptionUtils.doDemystify(result)
    token = re.findall(r'(\["\\x.+?[^\]]+\])', result)[0]
    token = eval(token)[1]
    rtmp = re.findall('.*(?:file|streamer|hestia):\s*["\']([^\'"]+).*',
                      result)[0]
    url = rtmp + ' swfUrl=http://mybeststream.xyz/YjFlMTI0MT/jwplayer.flash.swf token=' + token + ' flashver=' + constants.flash_ver(
    ) + ' live=1 timeout=15 swfVfy=1 pageUrl=' + page
    return url
Beispiel #30
0
def resolve(url):

    try:
        jar = get_cj()
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            try:
                referer = re.findall('referer=([^$&]+)', url)[0]
            except:
                referer = url

        s = requests.Session()
        s.cookies = jar
        id = re.findall('embed/(\d+)', url)[0]
        page = 'http://www.streamlive.to/embedplayer_new2.php?width=840&height=490&channel=%s&autoplay=true' % id

        headers = {
            'Host': 'www.streamlive.to',
            'Referer': referer,
            'Connection': 'keep-alive'
        }
        s.headers = headers
        result = s.get(page).text
        if 'captcha' in result:
            q = re.findall('Question:([^<]+)<', result)[0]
            ans = control.get_keyboard(q)
            if ans:
                result = s.post(page, data={'captcha': ans}).text
        token_url = re.compile('getJSON\("(.+?)"').findall(result)[0]
        if 'http' not in token_url:
            token_url = 'http:' + token_url
        r2 = client.request(token_url, referer=referer)
        token = json.loads(r2)["token"]

        file = re.compile(
            '(?:[\"\'])?file(?:[\"\'])?\s*:\s*(?:\'|\")(.+?)(?:\'|\")'
        ).findall(result)[0].replace('.flv', '')
        rtmp = re.compile('streamer\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(
            result)[0].replace(r'\\', '\\').replace(r'\/', '/')
        app = re.compile('.*.*rtmp://[\.\w:]*/([^\s]+)').findall(rtmp)[0]
        url = rtmp + ' app=' + app + ' playpath=' + file + ' swfUrl=http://www.streamlive.to/ads/streamlive.swf flashver=' + constants.flash_ver(
        ) + ' live=1 timeout=15 token=' + token + ' swfVfy=1 pageUrl=' + page

        jar.save(cookieFile, ignore_discard=True)
        return url
    except:
        return ''
Beispiel #31
0
def resolve(url):
    #try:
    try:
        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
    except:
        referer = url

    try:
        channel = urlparse.parse_qs(urlparse.urlparse(url).query)['channel'][0]
    except:
        channel = re.compile('/embed/(\d+)&').findall(url)[0]

    page = 'http://www.iguide.to/embedplayer_new.php?width=700&height=410&channel=%s&autoplay=true' % channel

    log(page)
    headers = {'Host': 'www.iguide.to', 'Connection': 'keep-alive'}
    result = client.request(page, referer=referer, headers=headers)
    log(result)
    token_url = re.compile('\$.getJSON\("(.+?)", function\(json\){').findall(
        result)[0]
    token = json.loads(client.request(token_url, referer=referer))['token']

    file = re.compile('(?:\'|\")?file(?:\'|\")?\s*:\s*(?:\'|\")(.+?)(?:\'|\")'
                      ).findall(result)[0].replace('.flv', '')
    rtmp = re.compile(
        '(?:\'|\")?streamer(?:\'|\")?\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(
            result)[0].replace(r'\\', '\\').replace(r'\/', '/')
    app = re.compile('.*.*rtmp://[\.\w:]*/([^\s]+)').findall(rtmp)[0]

    url = rtmp + ' playpath=' + file + ' swfUrl=http://www.iguide.to/player/secure_player_iguide_token.swf flashver=' + constants.flash_ver(
    ) + ' live=1 timeout=15 token=' + token + ' swfVfy=1 pageUrl=' + page
    return url
Beispiel #32
0
def resolve(url):
    try:
        page = url
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url
        result = client.request(url, referer=referer)

        url = urllib.unquote(
            re.findall('.*file["]*\s*:\s*["\']([^"\']+)', result)[0])
        url += ' live=true swfVfy=1 swfUrl=http://i.aliez.me/swf/playernew.swf flashver=%s pageUrl=' % constants.flash_ver(
        ) + page
        return url
    except:
        return
Beispiel #33
0
def resolve(url):
    try:
    	page = url
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
    	except: referer = url
        result = client.request(url, referer=referer)

        url = urllib.unquote(re.findall('.*file["]*\s*:\s*["\']([^"\']+)',result)[0])
        url += ' live=true swfVfy=1 swfUrl=http://i.aliez.me/swf/playernew.swf flashver=%s pageUrl='%constants.flash_ver() + page
        return url
    except:
        return
Beispiel #34
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url

        id = urlparse.parse_qs(urlparse.urlparse(url).query)['game'][0]

        ts = int(time.time())

        tk = 'http://sportstream365.com/LiveFeed/GetGame?lng=ru&id='+id+'&partner=24&_='+str(ts)

        html = client.request(tk,referer='http://www.sportstream365.com/')
        file = re.findall('.*?VI[\'"]*[:,]\s*[\'"]([^\'"]+)[\'"].*',html)[0]
        rt = _resolve('rtmpe://xlive.sportstream365.com/xlive')
        rand = str(random.randint(10000000000000000,99999999999999999))
        url = rt + ' playpath=raw:' + file + ' conn=S:client conn=S:3.1.0.10 conn=S:en live=1 timeout=15 pageUrl=http://www.sportstream365.com/ swfVfy=http://sportstream365.com/swf/VideoPlayer.swf?x=0.'+rand+' flashver=' + constants.flash_ver()
        return url
    except:
        return
Beispiel #35
0
def resolve(url):
    
    
    try:
        log_in = True
        page = url
        addonid = 'script.module.liveresolver'

        user, password = control.setting('streamlive_user'), control.setting('streamlive_pass')
        if (user == '' or password == ''):
            user, password = control.addon(addonid).getSetting('streamlive_user'), control.addon(addonid).getSetting('streamlive_pass')
        if (user == '' or password == ''): 
            log_in = False
            url = url.replace('view','embed')
            import streamlive_embed
            return streamlive_embed.resolve(url)

        if not log_in and 'embed' in url:
            import streamlive_embed
            return streamlive_embed.resolve(url)
        
        try: 
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
            url = url.replace(referer,'').replace('?referer=','').replace('&referer=','')
        except:
            referer = url

        if 'embed' in url:
            url = re.findall('(http.+?embed[^&$]+)',url)[0].replace('embed','view')

        post_data = 'username=%s&password=%s&accessed_by=web&submit=Login'%(user,password)

        cj = get_cj()
        result = client.request(url,cj=cj,headers={'referer':'http://www.streamlive.to', 'Content-type':'application/x-www-form-urlencoded', 'Origin': 'http://www.streamlive.to', 'Host':'www.streamlive.to', 'User-agent':client.agent()})
        if 'FREE credits here' in result:
            url = url.replace('view','embed')
            import streamlive_embed
            res = streamlive_embed.resolve(url)
            if res == '' :
                if not log_in:
                    control.infoDialog('Login or solve captcha to watch this channel.',heading = 'Streamlive.to',time=6000)
                else:
                    control.infoDialog('Not enough credits! Get FREE credits at streamlive.to or solve captcha.',heading='Streamlive.to',time=6000)
            return res

        if 'this channel is a premium channel.' in result.lower():
          control.infoDialog('Premium channel. Upgrade your account to watch it!', heading='Streamlive.to')
          return 

        if 'not logged in yet' in result.lower() or 'you have reached the limit today' in result.lower():
            #Cookie expired or not valid, request new cookie
            cj = login(cj,post_data)
            cj.save (cookieFile,ignore_discard=True)
            result = client.request(url,cj=cj)

        token_url = re.compile('getJSON\("(.+?)"').findall(result)[0]
        r2 = client.request(token_url,referer=referer)
        token = json.loads(r2)["token"]

        file = re.compile('(?:[\"\'])?file(?:[\"\'])?\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[0].replace('.flv','')
        rtmp = re.compile('streamer\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[0].replace(r'\\','\\').replace(r'\/','/')
        app = re.compile('.*.*rtmp://[\.\w:]*/([^\s]+)').findall(rtmp)[0]
        url=rtmp + ' app=' + app + ' playpath=' + file + ' swfUrl=http://www.streamlive.to/ads/streamlive.swf flashver=' + constants.flash_ver() + ' live=1 timeout=15 token=' + token + ' swfVfy=1 pageUrl='+page

        
        return url
    except:
        return
Beispiel #36
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url

        id = urlparse.parse_qs(urlparse.urlparse(url).query)['id'][0]
        url = 'http://miplayer.net/embedplayer.php?width=640&height=480&id=%s' % id
        result = client.request(url, referer=referer)
        curl = re.compile("curl\s*=\s*\"(.+?)\"").findall(result)[0]
        curl = base64.b64decode(curl)

        url = curl + ' swfUrl=http://otronivel.me/jw7/jwplayer.flash.swf flashver=' + constants.flash_ver(
        ) + ' timeout=15 live=true swfVfy=1 pageUrl=http://miplayer.net/embedplayer.php?width=640&height=480&id=%s&autoplay=true&strech=exactfit' % id
        return url
    except:
        return
Beispiel #37
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url
        id = urlparse.parse_qs(urlparse.urlparse(url).query)['channel'][0]
        token_url = 'http://www.letgo.tv/securetoken.php?id=%s' % id
        result = client.request(token_url, referer=referer)
        print(result)
        rtmp = re.findall('.*rtmp":"([^"]+)"', result)[0]
        file = re.findall('"streamname":"([^"]+)"', result)[0]
        token = re.findall('"token":"([^"]+).*', result)[0]
        url = rtmp + ' playpath=' + file + ' swfUrl=http://p.jwpcdn.com/6/12/jwplayer.flash.swf live=1 flashver=' + constants.flash_ver(
        ) + ' timeout=10 token=' + token + ' swfVfy=1 pageUrl=' + referer

        return url
    except:
        return
Beispiel #38
0
def resolve(url):
    #try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url

        try:
            channel = urlparse.parse_qs(urlparse.urlparse(url).query)['channel'][0]
        except:
            channel = re.compile('/embed/(\d+)&').findall(url)[0]


        page = 'http://www.iguide.to/embedplayer_new.php?width=700&height=410&channel=%s&autoplay=true' % channel
        
        log(page)
        headers = {'Host':'www.iguide.to','Connection':'keep-alive'}
        result = client.request(page, referer=referer,headers = headers)
        log(result)
        token_url =re.compile('\$.getJSON\("(.+?)", function\(json\){').findall(result)[0]
        token = json.loads(client.request(token_url, referer=referer))['token']

        file = re.compile('(?:\'|\")?file(?:\'|\")?\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[0].replace('.flv','')
        rtmp = re.compile('(?:\'|\")?streamer(?:\'|\")?\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[0].replace(r'\\','\\').replace(r'\/','/')
        app = re.compile('.*.*rtmp://[\.\w:]*/([^\s]+)').findall(rtmp)[0]

        url=rtmp +  ' playpath=' + file + ' swfUrl=http://www.iguide.to/player/secure_player_iguide_token.swf flashver=' + constants.flash_ver() + ' live=1 timeout=15 token=' + token + ' swfVfy=1 pageUrl='+page
        return url
Beispiel #39
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer= url 
        
        result = client.request(url, referer=referer)
        streamer = re.findall("'streamer',\s*'(.+?)'\);",result)[0]
        file = re.findall("'file',\s*'(.+?)'\);",result)[0]
        token = re.findall("'token',\s*'(.+?)'\);",result)[0]
        swf = 'http://tutelehd.com/player.swf'

        url = streamer + ' playpath=' + file + ' swfUrl=' + swf + ' swfVfy=1 flashver=' + constants.flash_ver() + ' live=true token=' + token + ' pageUrl=' + url
        return url
    
    except:
        return
def resolve(url):
    
    try:
        
        try: 
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
            url = url.replace(referer,'').replace('?referer=','').replace('&referer=','')
        except:
            referer = url

        id = re.findall('embed/(\d+)',url)[0]
        page = 'http://www.streamlive.to/embedplayer_new2.php?width=620&height=470&channel=%s&autoplay=true'%id
        


        result = client.request(page,headers={'referer':'http://www.streamlive.to', 'Content-type':'application/x-www-form-urlencoded', 'Origin': 'http://www.streamlive.to', 'Host':'www.streamlive.to', 'User-agent':client.agent()})
        log(result)

        token_url = re.compile('getJSON\("(.+?)"').findall(result)[0]
        if 'http' not in token_url:
            token_url = 'http:' + token_url
        r2 = client.request(token_url,referer=referer)
        token = json.loads(r2)["token"]

        file = re.compile('(?:[\"\'])?file(?:[\"\'])?\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[0].replace('.flv','')
        rtmp = re.compile('streamer\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[0].replace(r'\\','\\').replace(r'\/','/')
        app = re.compile('.*.*rtmp://[\.\w:]*/([^\s]+)').findall(rtmp)[0]
        url=rtmp + ' app=' + app + ' playpath=' + file + ' swfUrl=http://www.streamlive.to/ads/streamlive.swf flashver=' + constants.flash_ver() + ' live=1 timeout=15 token=' + token + ' swfVfy=1 pageUrl='+page

        
        return url
    except:
        return
Beispiel #41
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer= url 


        url = liveresolver_utils.remove_referer(url)

        result = client.request(url,referer=referer)
        result = decryptionUtils.doDemystify(result)
        rtmp = re.findall('.*file:"([^"]+)"',result)[0]
        token = re.findall('token:"([^"]+)"',result)[0]
        url = rtmp +' swfUrl=http://akamaistreaming.com/YjFlMTI0MT/jwplayer.flash.swf token='+token+' flashver=' + constants.flash_ver() + ' live=1 timeout=15 pageUrl=' + url
        return url 
    except:
        return
Beispiel #42
0
def resolve(url):
    try:
        try: 
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
            url = url.replace('&referer=%s'%referer,'')
            url = url.replace('?referer=%s'%referer,'')
        except: referer = url

        page = url
        result = client.request(url, referer=referer)
        result= result.replace('","','').replace('["','').replace('"]','').replace('.join("")',' ').replace(r'\/','/')

        vars = re.findall('var (.+?)\s*=\s*(.+?);',result)
        inners = re.findall('id=(.+?)>([^<]+)<',result)
        inners = dict(inners)

        js = re.findall('srcs*=s*(?:\'|\")(.+?player\.js(?:.+?|))(?:\'|\")',result)[0]
        js = client.request(js, referer=referer)
        token = re.findall('securetoken: ([^\n]+)',result)[0]
        token = re.findall('var\s+%s\s*=\s*(?:\'|\")(.+?)(?:\'|\")' % token, js)[-1]

        for i in range (100):
            for v in vars:
                result = result.replace('  + %s'%v[0],v[1])
        for x in inners.keys():
            result = result.replace('  + document.getElementById("%s").innerHTML'%x,inners[x])

        
        fs = re.findall('function (.+?)\(\)\s*\{\s*return\(([^\n]+)',result)
        url = re.findall('file:(.+?)\s*\}',result)[0]
        for f in fs:
                url = url.replace('%s()'%f[0],f[1])
        url = url.replace(');','').split(" + '/' + ")
        streamer, file = url[0].replace('rtmpe','rtmp').strip(), url[1]
        url=streamer + '/ playpath=' + file + ' swfUrl=http://www.hdcast.info/myplayer/jwplayer.flash.swf flashver=' + constants.flash_ver() + ' live=1 timeout=20 token=' + token + ' pageUrl=' + page
        return url

    except:
        return
Beispiel #43
0
def resolve(url):
    #try:

    referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
    headers = {
        'Referer': referer,
        'Accept':
        'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
        'Content-Type': 'application/x-www-form-urlencoded',
        'Connection': 'keep-alive',
        'Host': 'www.zoomtv.me',
        'Origin': urlparse.urlparse(referer).netloc,
        'User-Agent': client.agent()
    }
    fid = urlparse.parse_qs(urlparse.urlparse(url).query)['v'][0]
    pid = urlparse.parse_qs(urlparse.urlparse(url).query)['pid'][0]
    url = 'http://www.zoomtv.me/embed.php?v=%s&vw=650&vh=450' % fid
    pageUrl = url

    #get desktop stream
    #headers.update({ 'User-Agent' : 'Apple-iPhone/701.341' })
    post_data = urllib.urlencode({
        'uagent': 'Apple-iPhone/701.341',
        'pid': pid
    })
    result = req(url, post_data, headers)
    log(result)

    rtmp = re.findall(
        '.*[^\w](\w+)\s*=.{0,20}(rtmp[^\']*).*(?:streamer.{0,20}\1).*',
        result)[0]

    #for HQ links(no rtmp)
    if rtmp is None:
        return streamer + '|%s' % urllib.urlencode({
            'user-agent': client.agent(),
            'Referer': referer
        })

    url = rtmp + ' playpath=' + file + ' swfUrl=http://static.zoomtv.me/player/jwplayer.6.7.4.swf flashver=' + constants.flash_ver(
    ) + ' conn=S:' + file + ' conn=S:' + ts + ' conn=S:' + sg + ' conn=S:' + auth + ' live=1 timeout=15 token=H69d331eccdf347b swfVfy=1 pageUrl=' + pageUrl

    return url
Beispiel #44
0
def resolve(url):
    #try:
        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        page = url.replace(referer, '').replace('&referer=', '').replace('referer=', '')

        result = client.request(page, referer=referer)
        result = decryptionUtils.doDemystify(result)
        log(result)
        rtmp = re.findall('.*(?:file|streamer|hestia):\s*["\']([^\'"]+).*',result)[0]
        rtmp=rtmp.replace('rtmpe://l.mybeststream.xyz/r/','')
        url='rtmpe://l.mybeststream.xyz/r/'+ rtmp + ' swfUrl=http://mybeststream.xyz/jwplayer.flash.swf swfsize=61916 swfhash=e54728508e787f43cd472ef9ba2e514e2eca3f0679b3782206a3808b8d89b164 token=c.r.e.a.t.e.S.t. flashver=' + constants.flash_ver() + ' live=1 timeout=15 swfVfy=1 pageUrl=' + page
        return url
Beispiel #45
0
def resolve(url):
    try:
        
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer=url
        
        url = liveresolver_utils.remove_referer(url)
        pageUrl=url

        result = client.request(url, referer=referer)

        id,channel,pk = re.findall('id=(\d+)&s=([^&\'"]+).+?&pk=([^&\'"]+).*',result)[0]
        r2 = client.request('http://www.streamifypublisher.com:1935/loadbalancer?%s'%channel,pageUrl)
        ip = r2.split('=')[1]

        url = 'rtmp://%s/live'%ip
        url = url + ' playPath=' + channel + '?id=' + id + '&pk='+pk+' swfVfy=1 timeout=15 live=true conn=S:OK swfUrl=http://www.streamifyplayer.com/resources/scripts/eplayer.swf flashver=' + constants.flash_ver() + ' pageUrl=' + pageUrl

        return url
    
    except:
        return
Beispiel #46
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url

        url = liveresolver_utils.remove_referer(url)

        result = client.request(url, referer=referer)
        result = decryptionUtils.doDemystify(result)
        rtmp = re.findall('.*file:"([^"]+)"', result)[0]
        token = re.findall('token:"([^"]+)"', result)[0]
        url = rtmp + ' swfUrl=http://akamaistreaming.com/YjFlMTI0MT/jwplayer.flash.swf token=' + token + ' flashver=' + constants.flash_ver(
        ) + ' live=1 timeout=15 pageUrl=' + url
        return url
    except:
        return
Beispiel #47
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        url = liveresolver_utils.remove_referer(url)

        result = client.request(url, referer = referer)
        streamer = re.findall("'streamer',\s*'(.+?)'\);",result)[0]
        file = re.findall("'file',\s*'(.+?)'\);",result)[0]

        token = re.findall("'token',\s*'(.+?)'\);",result)[0]
        url = streamer +' playpath='+ file + ' swfUrl=http://www.castfree.me/player.swf flashver=' + constants.flash_ver() + ' token='+ token.decode('ascii','ignore') +' live=1 timeout=14 swfVfy=1 pageUrl=' + url
        return url
    except:
        return
Beispiel #48
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer=url


        id = urlparse.parse_qs(urlparse.urlparse(url).query)['u'][0]
        url = 'http://www.finecast.tv/embed4.php?u=%s&vw=640&vh=450'%id

        headers=[("User-Agent", client.agent()), ("Referer", referer)]
        cj = get_cj()

        result = unCaptcha.performCaptcha(url, cj, headers = headers)

        cj.save (cookieFile,ignore_discard=True)
        


        file = re.findall('[\'\"](.+?.stream)[\'\"]',result)[0]
        auth = re.findall('[\'\"](\?wmsAuthSign.+?)[\'\"]',result)[0]
        rtmp = 'rtmp://play.finecast.tv:1935/live%s'%auth

        url = rtmp +  ' playpath=' + file + ' swfUrl=http://www.finecast.tv/player6/jwplayer.flash.swf flashver=' + constants.flash_ver() + ' live=1 timeout=14 pageUrl=' + url
        return url

        
    except:
        return
Beispiel #49
0
def resolve(url):
    try:
        pageUrl = url
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url

        url = liveresolver_utils.remove_referer(url)

        result = client.request(url, referer=referer, headers= { 'Host': urlparse.urlparse(url).netloc} )
        file = re.findall('file=([^&]+)',result)[0]
        streamer = re.findall('streamer=([^&]+)',result)[0]
        swf = re.findall('[\"\'](.+?.swf)[\"\']',result)[0]
        url = streamer + ' playpath=' + file + ' swfUrl=' + swf + ' live=1 token=Fo5_n0w?U.rA6l3-70w47ch flashver=' + constants.flash_ver() + ' timeout=13 swfVfy=1 pageUrl=' + pageUrl
        return url
    except:
        return
Beispiel #50
0
def resolve(url):
    if 'embed' in url:
        import streamlive_embed
        return streamlive_embed.resolve(url)

    try:
        page = url
        addonid = 'script.module.liveresolver'

        user, password = control.setting('streamlive_user'), control.setting(
            'streamlive_pass')
        if (user == '' or password == ''):
            user, password = control.addon(addonid).getSetting(
                'streamlive_user'), control.addon(addonid).getSetting(
                    'streamlive_pass')
        if (user == '' or password == ''): return ''

        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
            url = url.replace(referer,
                              '').replace('?referer=',
                                          '').replace('&referer=', '')
        except:
            referer = url

        post_data = 'username=%s&password=%s&accessed_by=web&submit=Login' % (
            user, password)

        cj = get_cj()
        result = client.request(url,
                                cj=cj,
                                headers={
                                    'referer': 'http://www.streamlive.to',
                                    'Content-type':
                                    'application/x-www-form-urlencoded',
                                    'Origin': 'http://www.streamlive.to',
                                    'Host': 'www.streamlive.to',
                                    'User-agent': client.agent()
                                })
        if 'this channel is a premium channel.' in result.lower():
            control.infoDialog(
                'Premium channel. Upgrade your account to watch it!',
                heading='Streamlive.to')
            return

        if 'not logged in yet' in result.lower(
        ) or 'you have reached the limit today' in result.lower():
            #Cookie expired or not valid, request new cookie
            cj = login(cj, post_data)
            cj.save(cookieFile, ignore_discard=True)
            result = client.request(url, cj=cj)

        token_url = re.compile('getJSON\("(.+?)"').findall(result)[0]
        r2 = client.request(token_url, referer=referer)
        token = json.loads(r2)["token"]

        file = re.compile(
            '(?:[\"\'])?file(?:[\"\'])?\s*:\s*(?:\'|\")(.+?)(?:\'|\")'
        ).findall(result)[0].replace('.flv', '')
        rtmp = re.compile('streamer\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(
            result)[0].replace(r'\\', '\\').replace(r'\/', '/')
        app = re.compile('.*.*rtmp://[\.\w:]*/([^\s]+)').findall(rtmp)[0]
        url = rtmp + ' app=' + app + ' playpath=' + file + ' swfUrl=http://www.streamlive.to/ads/streamlive.swf flashver=' + constants.flash_ver(
        ) + ' live=1 timeout=15 token=' + token + ' swfVfy=1 pageUrl=' + page

        return url
    except:
        return
Beispiel #51
0
def resolve(url):
    try:
        id  = urlparse.parse_qs(urlparse.urlparse(url).query)['c'][0] 
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer= url 
        url = 'http://castamp.com/embed.php?c=%s&vwidth=640&vheight=380'%id
        pageUrl=url

        
        result = client.request(url, referer=referer,headers = {'Host':'www.castamp.com'})
        result = urllib.unquote(result).replace('unescape(','').replace("'+'",'')
        rplcs = re.findall('=(.+?).replace\([\"\'](.+?)[\"\']\s*,\s*[\"\']([^\"\']*)[\"\']',result)
        result = re.sub('\/\*[^*]+\*\/','',result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        var_dict = dict(var)
        file = re.compile('\'file\'\s*:\s*(.+?),').findall(result)[-1]
        file = var_dict[file]
        rtmp = re.compile('(rtmp://[^\"\']+)').findall(result)[0]
        for r in rplcs:
            file = file.replace(r[1],r[2])
        url = rtmp + ' playpath=' + file + ' swfUrl=http://p.castamp.com/cplayer.swf' + ' flashver=' + constants.flash_ver() + ' live=true timeout=15 swfVfy=1 pageUrl=' + pageUrl
        
        return url
    
    except:
        return
Beispiel #52
0
def resolve(url):

    try:
        session = requests.Session()
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url
        id = urlparse.parse_qs(urlparse.urlparse(url).query)['stream'][0]
        url = 'http://www.04stream.com/weed.js?stream=%s&width=600&height=460&str=is&link=1&cat=1' % id

        session.headers.update({
            'referer': referer,
            'User-agent': client.agent()
        })

        result = session.get(url).text
        result = decryptionUtils.doDemystify(result)
        src = re.compile('.*?src=([^\'"><]+).*').findall(
            result)[0] + 'thefeed2all.eu'
        page = src
        ref2 = src
        result = session.get(src).text

        try:
            captcha = re.compile(
                "<input type=\"hidden\" name=\"x\" value=\"(.+?)\">").findall(
                    result)[0]
            url = re.compile(
                "<input type=\"hidden\" name=\"url\" value=\"(.+?)\">"
            ).findall(result)[0]
            if 'http' not in url:
                url = 'http://www.04stream.com' + url
            cap_url = 'http://www.blocked.com/captcha.php?x=' + captcha
            urllib.urlretrieve(cap_url, captcha_img)
            input = get_response(captcha_img)
            post_data = {
                'blockscript': 'captcha',
                'x': captcha,
                'url': url,
                'val': input
            }
            session.headers.update({
                'Host': 'www.04stream.com',
                'Origin': 'http://www.04stream.com',
                'Referer': ref2
            })

            result = session.put(url, data=urllib.urlencode(post_data))
            result = result.text
        except:
            pass
        result = decryptionUtils.doDemystify(result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        server_id = re.findall('.*?boxig=.*?&srp=(\d+)', result)[0]
        rtmp = rowbalance.get(server_id)
        var.append(('thist', rtmp))
        for i in range(100):
            for v in var:
                result = result.replace("+%s+" % v[0], '%s' % v[1])
            for v in var:
                result = result.replace("+%s" % v[0], '%s' % v[1])
            for v in var:
                result = result.replace("%s+" % v[0], '%s' % v[1])

        file = re.findall(
            "&file=(rtmp://[^&]+)&", result
        )[0]  #.replace('/stream//','').replace('/stream/','').replace('?.stream','.stream')
        file = file.replace('\'', '').replace('"', '')
        url = file + ' swfUrl=http://thecdn.04stream.com/p/ooolo1.swf flashver=' + constants.flash_ver(
        ) + ' timeout=15 live=1 pageUrl=' + page
        return url
    except:
        return
def resolve(url):
    try:
        try:
            cid  = urlparse.parse_qs(urlparse.urlparse(url).query)['cid'][0] 
        except:
            cid = re.compile('channel/(.+?)(?:/|$)').findall(url)[0]

        
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer='http://castalba.tv'
        
        url = 'http://castalba.tv/embed.php?cid=%s&wh=600&ht=380&r=%s'%(cid,urlparse.urlparse(referer).netloc)
        pageUrl=url

        result = client.request(url, referer=referer,mobile=True)
        result=urllib.unquote(result)
        log(result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        var_dict = dict(var)


        if 'm3u8' in result:
            url = re.compile('file.+?\s*=\s*(?:unescape\()[\'\"](.+?)[\'\"]').findall(result)[0]
            url = 'http://' + url + '.m3u8'
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': referer})
            log("Castalba: Found m3u8 url: " + url)
            
        else:
            try:
                filePath = re.compile("'file'\s*:\s*(?:unescape\()?'(.+?)'").findall(result)[0]
                
            except:
                file = re.findall('var file\s*=\s*(?:unescape\()?(?:\'|\")(.+?)(?:\'|\")',result)[0]
                try:
                    file2 = re.findall("'file':\s*unescape\(file\)\s*\+\s*unescape\('(.+?)'\)",result)[0]
                    filePath = file+file2
                except:
                    filePath = file
            swf = re.compile("'flashplayer'\s*:\s*\"(.+?)\"").findall(result)[0]
            
            strm_func = re.findall('function streamer\(\)\s*\{([^\{]+)',result)[0]
            strm_func = re.sub('\s//[^;]+','',strm_func)

            streamer = re.findall('return\s*([^;]+)',strm_func)[0]
            for v in var_dict.keys():
                streamer = streamer.replace(v,var_dict[v])

            streamer = streamer.replace('"','').replace("'",'').replace('+','').strip()

            streamer = 'rtmp://' +  re.findall('.*//([^\'"]+live).*',streamer)[0]
            streamer = streamer.replace('///','//')
            url = streamer  + ' playpath=' + filePath +' swfUrl=' + swf + ' flashver=' + constants.flash_ver() +' live=true timeout=15 swfVfy=1 pageUrl=' + pageUrl
            log("Castalba: Found rtmp link: " + url)

        return url
    
    except:
        log("Castalba: Resolver failed. Returning...")
        return
Beispiel #54
0
def resolve(url):
    #try:
        pageUrl = url
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url

        url = liveresolver_utils.remove_referer(url)

        result = client.request(url, referer=referer, headers= { 'Host': urlparse.urlparse(url).netloc} )
        
        file = re.findall('file=([^&]+)',result)[0]
        streamer = re.findall('streamer=([^&]+)',result)[0]
        swf = re.findall('[\"\'](.+?.swf)[\"\']',result)[0]
        url = streamer + ' playpath=' + file + ' swfUrl=' + swf + ' live=1 token=Fo5_n0w?U.rA6l3-70w47ch flashver=' + constants.flash_ver() + ' timeout=13 swfVfy=1 pageUrl=' + pageUrl
        return url