Esempio n. 1
0
def resolve(url):
    try:
        page = url
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url
        if 'streamcdn' not in url:
            page = urlparse.parse_qs(urlparse.urlparse(url).query)['id'][0]
            page = 'http://p2pcast.tech/stream.php?id=%s&osr=2&live=0&p2p=0&stretching=uniform' % page

        result = client.request(page, referer=referer)
        if 'streamcdn' not in url:
            token = client.request(
                'http://p2pcast.tech/getTok.php',
                referer=page,
                headers={
                    'User-Agent': client.agent(),
                    'X-Requested-With': 'XMLHttpRequest'
                })
        try:
            token = json.loads(token)['token']
        except:
            token = ''
        url = re.compile('murl\s*=\s*[\'|\"](.+?)[\'|\"]').findall(result)[0]
        url = base64.b64decode(url) + token
        url += '|Referer=' + page + '&User-Agent=%s&X-Requested-With=%s&Host=%s' % (
            client.agent(), constants.get_shockwave(),
            urlparse.urlparse(url).netloc)

        return url
    except:
        return
Esempio n. 2
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
Esempio n. 3
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
Esempio n. 4
0
def resolve(url):
    try:
        url = (urlparse.urlparse(url).path).split('/')[1]

        result = client.request('http://lancer.streamup.com/api/channels/%ss-stream/playlists'%url.lower())
        js = json.loads(result)
        hls = js['hls']
        mpd = js['mpd']
        hls+='|%s' % urllib.urlencode('User-agent':client.agent())
        return hls

       
    except:
       return
Esempio n. 5
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url

        page=url
        result = client.request(url, referer=referer)
        url = re.findall('src="(http://zerocast.+?)"',result)[0]
        result = client.request(url)
        result = re.compile('url\s*=\s*(?:\'|\")(.*?)(?:\'|\")').findall(result)[0]
        result = client.request(result)
        result = urllib.unquote(result)
        print(result)
        result = re.compile('file\s*:\s*(?:unescape\()?(?:\'|\")(.*?)(?:\'|\")').findall(result)[0]
        if result.startswith('rtmp'):
            return '%s pageUrl=%s live=1 timeout=20' % (result, page)

        elif '.m3u8' in result:
            chunk = client.request(result)
            chunk = re.compile('(chunklist_.+)').findall(chunk)[0]
            url = result.split('.m3u8')[0].rsplit('/', 1)[0] + '/' + chunk
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent()})
            return url

    except:
        return
Esempio n. 6
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
Esempio n. 7
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url

        if 'chan=' in url:
            result = client.request(url, referer=referer)
            url = re.findall('<script\stype=[\'"]text/javascript[\'"]\ssrc=[\'"](.+?)[\'"]>', result)[0]

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

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

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

        r = re.findall('curl\s*=\s*[\'"](.+?)[\'"]', result)
        r += re.findall('file\s*:\s*["\'](.+?)["\']', result)
        r = r[0].decode('base64', 'strict')

        if r.startswith('rtmp'):
            return '%s pageUrl=%s live=1 timeout=30' % (r, url)

        elif '.m3u8' in r:
            chunk = client.request(r)
            chunk = re.compile('(chunklist_.+)').findall(chunk)[0]
            url = r.split('.m3u8')[0].rsplit('/', 1)[0] + '/' + chunk
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent()})
            return url
    except:
        return
Esempio n. 8
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
Esempio n. 9
0
def resolve(url):
    #try:
        s = requests.Session()

        ref = liveresolver_utils.remove_referer(url)
        result = s.get(url, headers={'User-agent':client.agent()}).text
        log(s.cookies)
Esempio n. 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)['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)
        result = decryptionUtils.doDemystify(result)
        cj.save (cookieFile,ignore_discard=True)
        


        file = re.findall('[\'\"](.+?.stream)[\'\"]',result)[0]
        auth = re.findall('[\'\"](\?wmsAuthSign.+?)[\'\"]',result)[0]
        rtmp = 'http://play.finecast.tv:1935/live/%s/playlist.m3u8%s'%(file,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 rtmp

        
    except:
        return
Esempio n. 11
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
Esempio n. 12
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 = 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()

            url = streamer.replace('///','//') + ' 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
Esempio n. 13
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: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        result = client.request(url,referer=referer)
        url = re.compile('(?:\'|\")?file(?:\'|\")?\s*:\s*(?:\'|\")(.+?)(?:\'|\")').findall(result)[0].replace('.flv','')
        url+='|%s'%urllib.urlencode({'referer':referer,'user-agent':client.agent()})
        return url
    except:
        return
Esempio n. 15
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)
        url = re.findall('src=(?:\'|\")(.+?\.m3u8)(?:\'|\")',result)[0]
        url+='|%s' % urllib.urlencode({'Referer':referer,'User-agent':client.agent()})
        return url
    except:
        return
Esempio n. 16
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://streamup.global.ssl.fastly.net/app/%ss-stream/playlist.m3u8'%id
        url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': referer})
        return url
    except:
       return
Esempio n. 17
0
def resolve(url):
    #try:
        s = requests.Session()
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer= url 


        ref = liveresolver_utils.remove_referer(url)
        result = s.get(url, headers={'Referer':referer,'User-agent':client.agent()}).text
        log(result)
        curl = re.findall('curl\s*=\s*[\"\']([^\"\']+)',result)[0]
        url = base64.b64decode(curl)
        token = json.loads(s.get('http://bro.adcast.tech/getToken.php').text)['token']
        url+=token

        url+='|%s' % urllib.urlencode({'User-agent':client.agent(),'Referer':ref,'X-Requested-With':constants.get_shockwave(),'Host':urlparse.urlparse(url).netloc})
        return url
Esempio n. 18
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)
        file = re.findall('.*(http[^"\']+\.m3u8[^"\']*).*',result)[0]
        url = file+'|Referer='+referer+'&User-Agent=' + client.agent() + '&X-Requested-With=' + constants.get_shockwave()
        return url
    
    except:
        return
Esempio n. 19
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)
        result=urllib.unquote(result)
        if 'm3u8' in result:
            url = re.compile('filez\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]
            try:
                streamer=re.findall('streamer\(\)\s*\{\s*return \'(.+?)\';\s*\}',result)[0]
                if 'rtmp' not in streamer:
                    streamer = 'rtmp://' + streamer
            except:
                try:
                    streamer = re.compile("var sts\s*=\s*'(.+?)'").findall(result)[0]
                except:
                    streamer=re.findall('streamer\(\)\s*\{\s*return \'(.+?)\';\s*\}',result)[0]
              
            url = streamer.replace('///','//') + ' playpath=' + filePath +' swfUrl=' + swf + ' flashver=WIN\\2020,0,0,286 live=true timeout=15 swfVfy=1 pageUrl=' + pageUrl
            log("Castalba: Found rtmp link: " + url)

        return url
    
    except:
        log("Castalba: Resolver failed. Returning...")
        return
Esempio n. 20
0
def resolve(url):
    #try:
        id = re.findall('streamup.com/([^$/]+)',url)[0]
        playUrl = 'https://streamup.com/%s/embeds/video?startMuted=true'%id

        url = 'https://api.streamup.com/v1/channels/' + id
        result = client.request(url, referer=playUrl)
        slug = re.findall('.*?["\']slug["\']\s*:\s*["\']([^"\']+)["\'].*',result)[0]

        url2 = 'https://lancer.streamup.com/api/channels/%s/playlists'%slug
        result = client.request(url2, referer=playUrl)
        url = re.findall('.*(http[^"\']+\.m3u8[^"\']*).*',result)[0]
        url+='|%s' %urllib.urlencode({'Referer':playUrl,'User-agent':client.agent()})
        return url
Esempio n. 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)
        file = re.findall('.*(http[^"\']+\.m3u8[^"\']*).*', result)[0]
        url = file + '|Referer=' + referer + '&User-Agent=' + client.agent(
        ) + '&X-Requested-With=' + constants.get_shockwave()
        return url

    except:
        return
Esempio n. 22
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


        result = client.request(url,referer=referer)
        url = re.findall('(http://.+?\.m3u8)',result)[0]
        url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': referer})
        return url
    except:
        return
Esempio n. 23
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]
        
        page = client.request(url)
        page = re.findall('.*?src=([^"\' ]+).*',page)[0]
        page = page + id + '&vw=650&vh=500'

        result = client.request(page,referer=referer)
        url = re.findall('.*(http[^"\']+\.m3u8[^"\']*).*',result)[0]
        url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': page,'X-Requested-With':constants.get_shockwave()})
        
        return url
    except:
        return
Esempio n. 24
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)
        file = re.findall("&file=rtmp://'\+thist\+'(.+?)&",result)[0].replace('/stream//','').replace('/stream/','').replace('?.stream','.stream')
        rtmp = rowbalance.get()
        rtmp = 'rtmp://%s/stream/'%rtmp
        url = rtmp+ ' playpath=' + file + r' swfUrl=http://thecdn.04stream.com/p/ooolo1.swf flashver=WIN/2020,0,0,286  timeout=15 live=1 pageUrl='+page
        return url
    except:
        return
Esempio n. 25
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, mobile=True)
        r2 = client.request('http://cdn.mipspublisher.com:1935/loadbalancer')
        ipad = re.findall('redirect=([^$]+)',r2)[0]
        m3u8 = 'http://' + ipad + re.findall('[\"\'](:.+?m3u8[^\"\']+)',result)[0]
        m3u8 += '|%s' % urllib.urlencode({'Referer':referer,'User-agent':client.agent(),'X-Requested-With':constants.get_shockwave()})
        return m3u8 
        
    except:
        return
Esempio n. 26
0
def resolve(url):
    #try:
        s = requests.Session()
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer= url 


        ref = liveresolver_utils.remove_referer(url)
        result = s.get(url, headers={'Referer':referer,'User-agent':client.agent()}).text
        curl = re.findall('curl\s*=\s*[\"\']([^\"\']+)',result)[0]
        url = base64.b64decode(curl)
        token = json.loads(s.get('http://bro.adcast.tech/getToken.php').text)['token']
        url+= 'wfNz6Pz_jNZfR8wmB8JEPw'
        url+='|%s' % urllib.urlencode({'User-agent':'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36','Referer':ref,'X-Requested-With':constants.get_shockwave(),'Host':urlparse.urlparse(url).netloc,'Accept-Encoding':'gzip, deflate, lzma, sdch'})
        return url
Esempio n. 27
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
Esempio n. 28
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        try: id = urlparse.parse_qs(urlparse.urlparse(url).query)['id'][0]
    	except: id = re.findall('streamup.com/(.+?)/embed',url)[0]
        url = 'https://streamup.com/%s/embeds/video?startMuted=true'%id
        page = url
        result = client.request(url,referer=referer)
        result = decryptionUtils.doDemystify(result)
        roomSlug = re.findall('"roomSlug":\s*"(.+?)"',result)[0]
        url = re.findall('\$.ajax\(\{\s*url:\s*"(.+?),',result)[0].replace('"','').replace(' ','').replace('window.Room.roomSlug',roomSlug).replace('+','')
        item = re.findall('HlsManifestUrl:\s*response\[\'(.+?)\'\]',result)[0]
        resp = json.loads(client.request(url,referer=referer))[item]
        url = resp + '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': page,'X-Requested-With':'ShockwaveFlash/20.0.0.286'})
        return url
    except:
        return
Esempio n. 29
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

        src = re.compile('.*?src=([^\'"><]+).*').findall(result)[0]
        page = src
        ref2 = src
        result = session.get(src).text
        try:
        #if 1:
            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'})
            result = session.post(url, data=urllib.urlencode(post_data)).text

        except:
           pass
        file = re.compile('.*stream/(.+?)&').findall(result)[0]
        rtmp = rowbalance.get()
        rtmp = 'rtmp://%s/stream/'%rtmp
        url = rtmp+' playPath='+file+u' swfUrl=http://thecdn.04stream.com/p/ooolo1.swf flashver=WIN\2019,0,0,226  timeout=15 live=1 pageUrl='+page
        return url
    except:
       return
Esempio n. 30
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]
        host = urlparse.urlparse(url).netloc
        url = 'http://www.%s/jwplayer6.php?channel=%s&vw=700&vh=480'%(host,id)
        result = client.request(url, referer=referer)
        
        json_url = re.findall('getJSON\([\"\']([^\"\']+)',result)[0]
        j = json.loads(client.request(json_url, referer=url))
        token,file,rtmp = j['token'],j['streamname'],j['rtmp']

        ur = rtmp+'/'+file+'/chunklist.m3u8'
        ur += '|%s' %urllib.urlencode({'User-agent':client.agent(),'X-Requested-With':constants.get_shockwave(),'Referer':url,'Host':urlparse.urlparse(rtmp).netloc})
        return ur
    except:
        return
Esempio n. 31
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]

        result = client.request('http://theactionlive.com/livegamecr.js', referer=referer)
        log(result)
        url = re.findall('.*\W(\w+.php).*',result)[0]
        page='http://theactionlive.com/'+url+'?id='+id+'&width=620&height=490&stretching='
        result = client.request(page, referer=referer)
        id=re.findall(".*id=['\"]([^\"']+).*",result)[0]
        result = client.request('http://biggestplayer.me/playercr.js', referer=page)
        url = re.findall('.*\W(\w+.php).*',result)[0]
        page2='http://biggestplayer.me/'+url+'?id='+id+'&width=620&height=490'
        result = client.request(page2, referer=page)
        url=re.findall('.*(http[^"\']+\.m3u8[^"\']*).*',result)[0]
        url+='|%s' % urllib.urlencode({'Referer':page2, 'User-agent':client.agent(), 'X-Requested-With':constants.get_shockwave()})

        return url
Esempio n. 32
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)
        json_url = re.findall('getJSON\([\"\']([^\"\']+)',result)[0]
        j = json.loads(client.request(json_url, referer=url))
        rtmp = j['rtmp']
        file = j['streamname']
        u2 = 'http://'+rtmp+'/player.php?ch='+file
        result = client.request(u2, referer=url)
        auth = re.findall('.*?(c2V[^"\'&]+)',result)[0]
        url = 'http://'+rtmp+'/live/'+file+'.m3u8?token='+auth
        url += '|%s' %urllib.urlencode({'Referer':u2,'User-agent':client.agent(),'X-Requested-With':constants.get_shockwave()})
        return url
    except:
        return