Exemple #1
0
	def get_links(self,cItem):
		urlTab = []	
		URL=cItem['url'].replace('/post/','/embed/')
		x1,id_=URL.split('/embed/')
		URL = 'https://vidlink.org/embed/update_views'
		post_data = {'postID':id_}
		sts, data = self.getPage(URL,post_data=post_data)
		if sts:
			printDBG('data='+data)
			data = cPacker().unpack(data.strip())
			printDBG('dataaaaa'+data)
			ol_data = re.findall('var.*?oploadID="(.*?)"', data, re.S)
			gitURL_data = re.findall('var.*?gitURL="(.*?)"', data, re.S)
			sub_data = re.findall('var.*?subs=\[(.*?)\]', data, re.S)						
			file1_data = re.findall('var.*?file1="(.*?)"', data, re.S)

			if ol_data:
				if ol_data[0]!='':
					urlTab.append({'name':'Openload', 'url':'https://openload.co/embed/'+ol_data[0], 'need_resolve':1})
			if file1_data:
				if file1_data[0]!='':
					urlTab.append({'name':'HLS', 'url':'hst#tshost#'+file1_data[0]+'|0||XXVID', 'need_resolve':1,'type':'local'})		
			if gitURL_data:
				if gitURL_data[0]!='':
					sts, data = self.getPage(gitURL_data[0])
					if sts:	
						sub_data = re.findall('URI="/sub/vtt/(.*?)/.*?LANGUAGE="(.*?)"', data, re.S)
						for (vtt,lng) in sub_data:
							if file1_data:
								if file1_data[0]!='':							
									urlTab.append({'name':'|'+lng+' Sub| HLS', 'url':'hst#tshost#'+file1_data[0]+'|'+vtt+'|'+lng+'|XXVID', 'need_resolve':1,'type':'local'})	
						
		return urlTab
Exemple #2
0
	def getVideos(self,videoUrl):
		urlTab = []	
		url_ref=videoUrl
		printDBG("1")
		if videoUrl.startswith('http'):
			i=0
			while True:
				i=i+1
				printDBG(str(i)+">>>>Start<<<< "+videoUrl)
				oldURL=videoUrl
				videoUrl = self.extractLink(videoUrl)
				printDBG(str(i)+">>>>End<<<< "+videoUrl)
				if videoUrl == 'None': 
					printDBG('1') 			
					urlTab.append((oldURL,'1'))
					break 				
					
				elif '.m3u8' in videoUrl:
					printDBG('2')
					URL1=strwithmeta(videoUrl, {'Referer':url_ref})
					urlTab.append((URL1,'3'))
					break
					
				elif 'arabramadan' in videoUrl:
					params = dict(self.defaultParams)
					params['header']['Referer'] = oldURL
					sts, data = self.getPage(videoUrl,params)
					if sts:
						_data3 = re.findall('JuicyCodes.Run\("(.*?)"\)',data, re.S)	
						if _data3:
							packed = base64.b64decode(_data3[0].replace('"+"',''))
							printDBG('packed'+packed)
							Unpacked = cPacker().unpack(packed)
							printDBG('packed'+Unpacked)
							

							meta_ = {'Referer':'https://arabramadan.com/embed/L00w0FyU0if4mHD/'}

							
							_data3 = re.findall('src".*?"(.*?)".*?label":"(.*?)"',Unpacked, re.S)	
							for (uurl,ttitre) in _data3:
								uurl = strwithmeta(ttitre+'|'+uurl,meta_)
								urlTab.append((uurl,'4'))
					break									
				elif (self.up.checkHostSupport(videoUrl) == 1):	
					printDBG('3')
					urlTab.append((videoUrl,'1'))
					break
				printDBG('4')								 									
							 					
		else:
			printDBG("2")
			post_data = {'action':'doo_player_ajax','post':videoUrl,'nume':'trailer','type':'movie'}		
			sts, data2 = self.getPage(self.MAIN_URL+'/wp-admin/admin-ajax.php', post_data=post_data)
			if sts:
				printDBG("20")
				_data0 = re.findall('<iframe.*?src="(.*?)"',data2, re.S)
				if _data0:	
					urlTab.append((_data0[0],'1'))	
		return urlTab
Exemple #3
0
 def parser_(self, baseUrl):
     printDBG("parser baseUrl[%s]" % baseUrl)
     videoTab = []
     HTTP_HEADER = self.cm.getDefaultHeader(browser='chrome')
     defaultParams = {'header': HTTP_HEADER}
     sts, data = self.cm.getPage(baseUrl.replace('/v/', '/e/'),
                                 defaultParams)
     if not sts: return []
     Liste_els = re.findall('(eval.*?)</script>', data, re.S)
     tmp = cPacker().unpack(Liste_els[1].strip())
     printDBG('data=' + tmp)
     Liste_els = re.findall('vldAb="(.*?)"', tmp, re.S)
     if Liste_els:
         URL = Liste_els[0]
         if URL.startswith('//'): URL = 'https:' + URL
         videoTab.append({'url': URL, 'name': 'Thevid'})
     return videoTab
Exemple #4
0
 def get_links(self, cItem):
     urlTab = []
     Url = cItem['url']
     printDBG('getdata from:' + Url)
     post_data = {'watch': '1'}
     sts, data = self.getPage(Url, post_data=post_data)
     if sts:
         #Local server
         iframe = re.findall('EmbedCode">.*?<IFRAME.*?SRC="(.*?)"', data,
                             re.S | re.IGNORECASE)
         if iframe:
             sts, data0 = self.getPage(iframe[0])
             if sts:
                 packed_ = re.findall('(eval.*?)</script>', data0, re.S)
                 if packed_:
                     try:
                         packed = packed_[0].strip()
                         printDBG('packed=' + packed)
                         unpacked = cPacker().unpack(packed)
                         printDBG('unpacked=' + unpacked)
                         data0 = data0.replace(packed, unpacked)
                     except:
                         printDBG('erreur: packer')
                 iframe = re.findall('{.{0,3}file:"(.*?)"(.*?)}', data0,
                                     re.S)
                 for (url, label) in iframe:
                     if 'onclick' not in label:
                         if 'm3u8' in url: label = 'HLS'
                         label = '|' + label.replace(
                             ',label:"', '').replace('"',
                                                     '') + '| Moshahada'
                         if 'm3u8' in url:
                             urlTab.append({
                                 'name': label,
                                 'url': 'hst#tshost#' + url,
                                 'need_resolve': 1,
                                 'type': 'local'
                             })
                         else:
                             urlTab.append({
                                 'name': label,
                                 'url': url,
                                 'need_resolve': 0,
                                 'type': 'local'
                             })
         # other servers
         iframe = re.findall('<li data.*?">(.*?)<.*?src="(.*?)"', data,
                             re.S | re.IGNORECASE)
         for (server, href) in iframe:
             urlTab.append({'name': server, 'url': href, 'need_resolve': 1})
         # mobile version
         iframe = re.findall(
             'rgba\(203, 0, 44, 0.36\).*?href="(.*?)".*?ViewMovieNow">(.*?)<',
             data, re.S | re.IGNORECASE)
         for (url_, titre_) in iframe:
             if 'منخفضة' in titre_: titre_ = '|Low| Movizland'
             if 'sd' in titre_.lower(): titre_ = '|SD| Movizland'
             if 'hd' in titre_.lower(): titre_ = '|HD| Movizland'
             if 'و حمل' in titre_: titre_ = '|HLS| Movizland'
             if 'تحميل' in titre_: titre_ = '|Download Server| Movizland'
             if '|HLS|' in titre_:
                 if False:
                     post_data = {'watch': '1'}
                     sts, data = self.getPage(url_, post_data=post_data)
                     if sts:
                         printDBG('data00=' + data)
                         iframe = re.findall(
                             'EmbedCode">.*?<IFRAME.*?SRC="(.*?)"', data,
                             re.S | re.IGNORECASE)
                         if iframe:
                             sts, data0 = self.getPage(iframe[0])
                             if sts:
                                 packed_ = re.findall(
                                     '(eval.*?)</script>', data0, re.S)
                                 if packed_:
                                     #try:
                                     packed = packed_[0].strip()
                                     printDBG('packed=' + packed)
                                     unpacked = cPacker().unpack(packed)
                                     printDBG('unpacked=' + unpacked)
                                     data0 = data0.replace(packed, unpacked)
                                     #except:
                                     #	printDBG('erreur: packer')
                                 iframe = re.findall(
                                     '{.{0,3}file:"(.*?)"(.*?)}', data0,
                                     re.S)
                                 for (url, label) in iframe:
                                     if 'm3u8' in url:
                                         urlTab.append({
                                             'name':
                                             titre_,
                                             'url':
                                             'hst#tshost#' + url,
                                             'need_resolve':
                                             1,
                                             'type':
                                             'local'
                                         })
             else:
                 link = strwithmeta(url_, {'Referer': Url})
                 urlTab.append({
                     'name': titre_,
                     'url': link,
                     'need_resolve': 0,
                     'type': 'local'
                 })
     return urlTab
Exemple #5
0
    def getVideos(self, videoUrl):
        urlTab = []
        refer = ''
        if '|' in videoUrl:
            url_ref, refer = videoUrl.split('|')
            videoUrl = url_ref
        printDBG("1")
        if videoUrl.startswith('http'):
            i = 0
            while True:
                i = i + 1
                printDBG(str(i) + ">>>>Start<<<< " + videoUrl)
                oldURL = videoUrl
                videoUrl = self.extractLink(videoUrl, refer)
                printDBG(str(i) + ">>>>End<<<< " + videoUrl)
                if videoUrl.startswith('['):
                    _data3 = re.findall('label":"(.*?)".*?file":"(.*?)"',
                                        videoUrl, re.S)
                    for (label, uurl) in _data3:
                        urlTab.append((label + '|' + uurl, '4'))
                    break
                elif videoUrl == 'None':
                    printDBG('1')
                    urlTab.append((oldURL, '1'))
                    break
                elif '.m3u8' in videoUrl:
                    printDBG('2')
                    URL1 = strwithmeta(videoUrl, {'Referer': url_ref})
                    urlTab.append((URL1, '3'))
                    break
                elif 'arabramadan' in videoUrl:
                    params = dict(self.defaultParams)
                    params['header']['Referer'] = oldURL
                    sts, data = self.getPage(videoUrl, params)
                    if sts:
                        _data3 = re.findall('JuicyCodes.Run\("(.*?)"\)', data,
                                            re.S)
                        if _data3:
                            packed = base64.b64decode(_data3[0].replace(
                                '"+"', ''))
                            printDBG('packed' + packed)
                            Unpacked = cPacker().unpack(packed)
                            printDBG('packed' + Unpacked)
                            meta_ = {
                                'Referer':
                                'https://arabramadan.com/embed/L00w0FyU0if4mHD/'
                            }
                            _data3 = re.findall(
                                'src".*?"(.*?)".*?label":"(.*?)"', Unpacked,
                                re.S)
                            for (uurl, ttitre) in _data3:
                                uurl = strwithmeta(ttitre + '|' + uurl, meta_)
                                urlTab.append((uurl, '4'))
                    break
                elif 'gdriveplayer' in videoUrl:
                    params = dict(self.defaultParams)
                    params['header']['Referer'] = oldURL
                    sts, data = self.getPage(videoUrl, params)
                    if sts:
                        result = re.findall('(eval\(function\(p.*?)</script>',
                                            data, re.S)
                        if result:
                            data = result[0].strip()
                            printDBG('eval trouver=' + result[0].strip() + '#')
                            data0 = cPacker().unpack(result[0].strip())
                            printDBG('data0=' + data0 + '#')
                            result = re.findall(
                                'data=.*?(\{.*?}).*?null.*?[\'"](.*?)[\'"]',
                                data0, re.S)
                            if result:
                                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:
                                        _url = elm['file']
                                        _label = elm.get('label', 'Google')
                                        if 'm3u8' in _url:
                                            urlTab.append((_url, '3'))
                                        else:
                                            urlTab.append(
                                                ('Google (' + _label + ')|' +
                                                 _url, '4'))
                    break

                elif 'aflamyz' in videoUrl:
                    params = dict(self.defaultParams)
                    params['header']['Referer'] = oldURL
                    sts, data = self.getPage(videoUrl, params)
                    if sts:
                        result = re.findall('data-en="(.*?)".*?data-p="(.*?)"',
                                            data, re.S)
                        if result:
                            code_ = json_loads(urllib.unquote(result[0][0]))
                            pass_ = result[0][1]
                            printDBG('Code=' + str(code_))
                            printDBG('Pass='******'ct'])
                            iv = unhexlify(code_['iv'])
                            salt = unhexlify(code_['s'])
                            b = pass_
                            decrypted = cryptoJS_AES_decrypt(
                                ciphertext, b, salt)
                            printDBG('decrypted=' + decrypted)
                            URL = decrypted.replace('\/', '/').replace('"', '')
                            printDBG('URL=' + URL)
                            params['header']['Referer'] = videoUrl
                            sts, data = self.getPage(URL, params)
                            if sts:
                                url_list = re.findall('"sources":(\[.*?\])',
                                                      data, re.S)
                                if url_list:
                                    src_lst = json_loads(url_list[0])
                                    printDBG('src_lst=' + str(src_lst) + '#')
                                    for elm in src_lst:
                                        _url = elm['file']
                                        _label = elm.get('label', 'Aflamyz')
                                        if 'm3u8' in _url:
                                            urlTab.append((_url, '3'))
                                        else:
                                            urlTab.append(
                                                ('Aflamyz (' + _label + ')|' +
                                                 _url, '4'))
                    break

                elif (self.up.checkHostSupport(videoUrl) == 1):
                    printDBG('3')
                    urlTab.append((videoUrl, '1'))
                    break
                printDBG('4')

        else:
            printDBG("2")
            post_data = {
                'action': 'doo_player_ajax',
                'post': videoUrl,
                'nume': 'trailer',
                'type': 'movie'
            }
            sts, data2 = self.getPage(self.MAIN_URL +
                                      '/wp-admin/admin-ajax.php',
                                      post_data=post_data)
            if sts:
                printDBG("20")
                _data0 = re.findall('<iframe.*?src="(.*?)"', data2, re.S)
                if _data0:
                    urlTab.append((_data0[0], '1'))
        return urlTab