Example #1
0
 def getVideos(self, videoUrl):
     urlTab = []
     printDBG('videoUrl' + videoUrl)
     sts, data = self.getPage(videoUrl)
     if sts:
         printDBG('data' + data)
         Liste_els = re.findall('sources.{,9}?"(.*?)"', data, re.S)
         if not Liste_els:
             L_els = re.findall('(eval.*?)</script>', data, re.S)
             if L_els:
                 printDBG('p,a,c,k,e,d Trouver')
                 data = cPacker().unpack(L_els[0].strip())
                 printDBG(data)
                 Liste_els = re.findall('sources.*?"(.*?)"', data, re.S)
         if Liste_els:
             URL = Liste_els[0]
             if ('m3u8' in URL):
                 urlTab.append((URL, '3'))
             else:
                 urlTab.append((URL, '0'))
         else:
             if 'File is no longer available' in data:
                 SetIPTVPlayerLastHostError('File is no longer available')
     return urlTab
Example #2
0
    def getVideos(self, videoUrl):
        urlTab = []
        videoUrl0, gnr = videoUrl.split('|', 1)
        if 'XX123' in gnr:
            from tsiplayer.host_X123movies import TSIPHost
            host = TSIPHost()
            urlTab = host.getVideos(videoUrl)
        if 'XXVID' in gnr:
            from tsiplayer.host_vidlink import TSIPHost
            host = TSIPHost()
            urlTab = host.getVideos(videoUrl)
        if 'XXCHI' in gnr:
            from tsiplayer.host_chillax import TSIPHost
            host = TSIPHost()
            urlTab = host.getVideos(videoUrl)
        if 'XXSEE' in gnr:
            from tsiplayer.host_seehdpl import TSIPHost
            host = TSIPHost()
            urlTab = host.getVideos(videoUrl)
        if 'XXVIC' in gnr:
            from tsiplayer.host_vidcloud import TSIPHost
            host = TSIPHost()
            urlTab = host.getVideos(videoUrl)
        if 'XXGOM' in gnr:
            sts, data = self.getPage(videoUrl0)
            if sts:
                pack_data = re.findall('text/javascript\'>(.*?)</script>',
                                       data, re.S)
                if pack_data:
                    data = cPacker().unpack(pack_data[0].strip())
                    link_data = re.findall('sources:.*?\[(.*?)\]', data, re.S)
                    if link_data:
                        printDBG('datakkkkkkkkkkkkkkkkkkk' + link_data[0])
                        link_data = re.findall('{file:"(.*?)"(.*?)}',
                                               link_data[0], re.S)
                        for (url, label) in link_data:
                            if 'm3u8' in url: label = 'HLS'
                            label = label.replace(',label:"',
                                                  '').replace('"', '')
                            if 'm3u8' in url:
                                urlTab.append((url, '3'))
                            else:
                                if not 'manifest.mpd' in url:
                                    urlTab.append((label + '|' + url, '4'))

        elif gnr == 'DB-Media':
            sts, data = self.getPage(videoUrl0)
            printDBG('datakkkkkkkkkkkkkkkkkkk' + data)
            if 'data-sitekey' in data:
                getParams = {}
                sitekey = self.cm.ph.getSearchGroups(
                    data, '''data\-sitekey=['"]([^'^"]+?)['"]''')[0]
                if sitekey != '':
                    token, errorMsgTab = self.processCaptcha(
                        sitekey, self.cm.meta['url'])
                    if token != '':
                        getParams['gresponse'] = token

            post_data = {'g-recaptcha-response': token, 'hivecaptcha': '1'}
            params = dict(self.defaultParams)
            params['no_redirection'] = True
            sts, data = self.getPage(videoUrl0, params, post_data=post_data)
            if sts:
                URL = self.cm.meta.get('location', 'non')
                if URL != 'non':
                    sts, data = self.getPage(URL)
                    if sts:
                        params['header']['Referer'] = URL
                        sts, data = self.getPage('https://oload.party/watch',
                                                 params)
                        if sts:
                            lst_data = re.findall(
                                'span.class="source.*?data-id="(.*?)">(.*?)<',
                                data, re.S)
                            for (id_, name) in lst_data:
                                if name == 'verystream':
                                    url_ = 'https://verystream.com/e/' + id_
                                elif name == 'gounlimited':
                                    url_ = 'https://gounlimited.to/embed-' + id_ + '.html'
                                elif name == 'openload':
                                    url_ = 'https://oload.site/embed/' + id_
                                elif name == 'vidcloud':
                                    url_ = 'https://vidcloud.icu/load.php?id=' + id_
                                elif name == 'vidlox':
                                    url_ = 'https://vidlox.me/embed-' + id_ + '.html'
                                elif name == 'flix555':
                                    url_ = 'https://flix555.com/embed-' + id_ + '.html'
                                elif name == 'onlystream':
                                    url_ = 'https://onlystream.tv/e/' + id_
                                elif name == 'clipwatching':
                                    url_ = 'https://clipwatching.com/embed-' + id_ + '.html'
                                urlTab.append((name + '|' + url_, '5'))

        return urlTab
Example #3
0
 def Get_GDDB_Servers(self,Url):
     urlTab = []
     sts, data = self.getPage(Url,self.defaultParams)
     if sts:
         printDBG('0001')
         serv_string  = re.findall('Main Server.*?href="(.*?)"', data, re.S)
         if serv_string: 
             printDBG('0002')
             link_ = serv_string[0]
             if link_.startswith('//'): link_= 'http:'+link_
             sts1, data1 = self.getPage(link_,self.defaultParams)
             if sts1:
                 printDBG('0003')
                 serv_string  = re.findall('class="linkserver".*?data-video="(.*?)"', data1, re.S)
                 for elm in serv_string:
                     printDBG('0004')
                     if elm.startswith('//'): elm = 'http:'+elm
                     urlTab.append({'name':gethostname(elm).capitalize(), 'url':elm, 'need_resolve':1}) 
         
         
         
         if False:
             eval_string  = re.findall('(eval.{1,10}p,a,c,k,e,d.*?)</script>', data, re.S)
             if eval_string:
                 eval_string = eval_string[0].strip()
                 printDBG('eval_string=' + eval_string)
                 script0 = cPacker().unpack(eval_string)
                 printDBG('script0=' + script0)
                 result = re.findall('data=.*?(\{.*?}).*?null.*?[\'"](.*?)[\'"]',script0, re.S)
                 if result:
                     try:
                         code_ = json_loads(result[0][0])
                         printDBG('Code='+str(code_))
                         data1 = result[0][1].strip().replace('\\','')									
                         printDBG('data1='+data1)
                         lst = re.compile("[A-Za-z]{1,}").split(data1)
                         printDBG('lst='+str(lst))
                         script = ''
                         for elm in lst:
                             script = script+chr(int(elm))
                         printDBG('script='+script)
                         result = re.findall('pass.*?[\'"](.*?)[\'"]',script, re.S)
                         if result:
                             pass_ = result[0]								
                             printDBG('pass_='+pass_)
                             ciphertext = base64.b64decode(code_['ct'])
                             iv = unhexlify(code_['iv'])
                             salt = unhexlify(code_['s'])
                             b = pass_
                             decrypted = cryptoJS_AES_decrypt(ciphertext, b, salt)
                             printDBG('decrypted='+decrypted)
                             data2 = decrypted[1:-1]
                             #data2 = decrypted.replace('"','').strip()
                             printDBG('data2='+data2)									
                             data2 = cPacker().unpack(data2)
                             printDBG('data2='+data2)								
                             url_list = re.findall('sources:(\[.*?\])',data2, re.S)	
                             #for data3 in url_list:
                             data3= url_list[0]
                             data3 = data3.replace('\\','').replace('"+countcheck+"','')
                             printDBG('data3='+data3+'#')
                             src_lst = json_loads(data3)
                             printDBG('src_lst='+str(src_lst)+'#')
                             for elm in src_lst:
                                 label = elm.get('label','')
                                 type_ = elm.get('type','')
                                 url_ = elm.get('file','')
                                 if url_.startswith('//'): url_='http:'+url_
                                 urlTab.append({'name':(type_+' '+label).capitalize(), 'url':url_, 'need_resolve':0})
                     except: pass
     return urlTab