Exemplo n.º 1
0
 def get_results(self,Extra,str_ch,year):
     printDBG('--------------> startstart '+Extra+'<----------------')
     exec (Extra+'TSIPHost')
     host = TSIPHost()				
     urlTab = host.MediaBoxResult(str_ch,year,Extra)				
     printDBG('result='+str(urlTab))
     if len(urlTab)>0:
         elm_1 = urlTab[0]
         ratio = difflib.SequenceMatcher(None,elm_1['titre'], str_ch).ratio()
         elm_1['title'] = elm_1['title']+' ('+str(ratio)+')'
         if elm_1.get('category','')=='video':
             self.addVideo(elm_1)
         else: self.addDir(elm_1)        
Exemplo n.º 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
Exemplo n.º 3
0
    def get_links(self, cItem):
        urlTab = []
        Type_ = cItem.get('Type_', 'na')
        Url = cItem.get('url', '')
        Name = cItem.get('title', '')
        printDBG('Get Links: ' + str(cItem))
        if Type_ == 'VIP':
            urlTab = self.Get_VIP_Servers(Url)
        elif Type_ == 'DB-Media':
            urlTab = self.Get_DBMedia_Servers(Url)
        elif Type_ == 'Gomostream':
            urlTab = self.Get_Gomostream_Servers(Url)
        elif Type_ == 'Resolve':
            urlTab.append({'name': Name, 'url': Url, 'need_resolve': 1})
        elif Type_ == '123Movies':
            from tsiplayer.host_X123movies import TSIPHost
            host = TSIPHost()
            urlTab.extend(host.get_links({'url': Url}))
        elif Type_ == 'Vidcloud':
            from tsiplayer.host_vidcloud import TSIPHost
            host = TSIPHost()
            urlTab.extend(host.get_links({'url': Url}))
        elif Type_ == 'Vidlink':
            from tsiplayer.host_vidlink import TSIPHost
            host = TSIPHost()
            urlTab.extend(host.get_links({'url': Url}))
        elif Type_ == 'Seehd':
            from tsiplayer.host_seehdpl import TSIPHost
            host = TSIPHost()
            urlTab.extend(host.get_links({'url': Url}))

        elif Type_ == 'Chillax':
            from tsiplayer.host_chillax import TSIPHost
            host = TSIPHost()
            urlTab.extend(host.get_links({'url': Url}))
        return urlTab
Exemplo n.º 4
0
    def showhosts(self, cItem):
        urlTab = []
        lng = cItem.get('lng', 'eng')
        elm = cItem['elm']
        if lng == 'eng':
            printDBG('start showhosts' + str(elm))
            streams = elm.get('streams', [])
            if streams == []:
                streams = elm.get('tvdb_id', '')
                URL = self.MAIN_URL + '/episode/' + streams
                sts, data = self.getPage(URL, self.defaultParams)
                if sts:
                    data = json_loads(data)
                    streams = data.get('streams', [])

            Image = cItem['icon']
            stream_lst = []
            titre_ = cItem['title'].replace('>> ', '')

            if ' - ' + tscolor('\c0000????') in titre_:
                titre_ = titre_.split(' - ' + tscolor('\c0000????'))[0]
            for elm1 in streams:
                stream = elm1['stream']
                name = elm1.get('source', '!!')
                type_ = elm1.get('type', 0)
                if (stream not in stream_lst):
                    stream_lst.append(stream)
                    if type_ in [98, 99]:
                        Name = 'VIP [' + name.replace('VIP', '').strip() + ']'
                        Url = stream
                        Type_ = 'VIP'
                        Desc = 'Direct Links'
                        Image = 'https://i.ibb.co/L6vctvL/VIP-1024x672.png'
                    elif type_ in [39]:
                        Name = 'Vidcloud [Multi]'
                        Url = stream
                        Type_ = 'Vidcloud'
                        Desc = 'Multi Hosts'
                        Image = 'https://vidcloud.icu/img/logo_vid.png?1'
                    elif type_ in [27, 28, 29, 30, 31]:
                        Name = 'Youtube'
                        Url = stream
                        Type_ = 'Resolve'
                        Desc = 'Youtube'
                    elif type_ in [77]:
                        Name = '123Movies [Multi]'
                        Url = stream
                        Type_ = '123Movies'
                        Desc = 'Multi Hosts'
                        Image = 'https://i.ibb.co/kQGDxLc/x123.png'
                    elif type_ in [20]:
                        Name = 'Vidlink [Multi]'
                        Url = stream
                        Type_ = 'Vidlink'
                        Desc = 'Multi Hosts\nM3u8 server\nWith subs'
                        Image = 'https://i.ibb.co/bJwn22Q/vidlink.png'
                    elif type_ in [71]:
                        Name = 'Seehd.pl [Multi]'
                        Url = stream
                        Type_ = 'Seehd'
                        Desc = 'Multi Hosts'
                        Image = 'https://i.ibb.co/mJymy06/seehd.png'
                    elif type_ in [73]:
                        Name = 'Chillax [Multi]'
                        Url = stream
                        Type_ = 'Chillax'
                        Desc = '---- >  ' + tscolor(
                            '\c00????00') + 'Work only in eplayer3 ' + tscolor(
                                '\c0000??00') + 'WITH BUFFERING ' + tscolor(
                                    '\c00??????') + '<----'
                        Desc = Desc + '\n' + tscolor(
                            '\c00??????'
                        ) + 'Good M3u8 Server\nMust wait for cloudflare bypass'
                        Image = 'https://i.ibb.co/r2kKX5s/chillax.png'
                    elif type_ in [61, 62, 63]:
                        Name = 'Gomostream [Multi]'
                        Url = stream
                        Type_ = 'Gomostream'
                        Desc = 'Multi Hosts'
                        Image = 'https://i.ibb.co/TH2kJm6/putstream.png'
                    elif type_ in [11]:
                        Name = 'DB-Media [Multi]'
                        Url = stream
                        Type_ = 'DB-Media'
                        Desc = 'Multi Hosts, Need To Resolve captcha'
                        Image = 'https://i.ibb.co/6tTVtx5/Logo-d-B-Media.png'
                    elif type_ in [2, 4, 9, 6]:
                        printDBG('eeeeeeeeeeeeeee' + str(elm1))
                        Name = gethostname(stream).capitalize()
                        Url = stream
                        Type_ = 'Resolve'
                        Desc = stream
                    elif type_ in [53, 15, 64]:
                        Type_ = 'Non'
                    else:
                        printDBG('eeeeeeeeeeeeeee' + str(elm1))
                        Name = '|' + str(type_) + '| ' + name
                        Url = stream
                        Type_ = 'Non'  #'na'
                        Desc = stream
                    if Type_ != 'Non':
                        self.addVideo({
                            'import':
                            cItem['import'],
                            'category':
                            'host2',
                            'url':
                            Url,
                            'title':
                            titre_,
                            'desc':
                            tscolor('\c00????00') + Name +
                            tscolor('\c00??????') + '\n' + Desc,
                            'icon':
                            Image,
                            'hst':
                            'tshost',
                            'Type_':
                            Type_
                        })
        elif lng == 'ar':
            hsts = [
                'host_egybest', 'host_faselhd', 'host_akoam', 'host_movs4u'
            ]
            for hst in hsts:
                Extra = 'from tsiplayer.' + hst + ' import '
                exec(Extra + 'TSIPHost')
                host = TSIPHost()
                printDBG('elm=' + str(elm))
                printDBG('citem=' + str(cItem))
                str_ch = elm.get('title', '')
                urlTab = host.MediaBoxResult(str_ch, cItem.get('year', ''),
                                             Extra)
                printDBG('result=' + str(urlTab))
                if len(urlTab) > 0:
                    elm_1 = urlTab[0]
                    ratio = difflib.SequenceMatcher(None, elm_1['titre'],
                                                    str_ch).ratio()
                    elm_1['title'] = elm_1['title'] + ' (' + str(ratio) + ')'
                    if elm_1.get('category', '') == 'video':
                        self.addVideo(elm_1)
                    else:
                        self.addDir(elm_1)