Ejemplo n.º 1
0
    def getVideos(self, videoUrl):
        urlTab = []
        str_ = 'getsource.php?key='
        try:
            data = urllib.unquote(videoUrl)
            data = json_loads(data.strip())
            ciphertext = base64.b64decode(data['ct'])
            iv = unhexlify(data['iv'])
            salt = unhexlify(data['s'])
            b = "Fex-XFa_x3MjW4w"
            decrypted = cryptoJS_AES_decrypt(ciphertext, b, salt)
            cUrl = decrypted.replace('\\', '').replace('"', '')
            sts, data = self.getPage(cUrl, dict(self.defaultParams))
            if sts:
                cUrl = data.meta['url']
                if 'beeload.php' in cUrl:
                    sts, data = self.getPage(cUrl, dict(self.defaultParams))
                    if sts:
                        lst_dat2 = re.findall('eval(.*?)</script>', data, re.S)
                        if lst_dat2:
                            packed = 'eval' + lst_dat2[0].strip()
                            printDBG('ppppppp#' + packed + '#')
                            try:
                                data = unpackJSPlayerParams(
                                    packed, VIDUPME_decryptPlayerParams, 1)
                                printDBG(data)
                            except:
                                printDBG('erreur')
                            lst_dat2 = re.findall("='(.*?)'", data, re.S)
                            if lst_dat2:
                                urlTab.append((lst_dat2[0], '0'))

                elif 'wp-embed.php?url=' in cUrl:
                    #cUrl = cUrl.replace('wp-embed.php?url=','getsource.php?key=')
                    cUrl = cUrl.replace('wp-embed.php?url=', str_)

                    sts, data = self.getPage(cUrl, dict(self.defaultParams))
                    if sts:
                        lst_dat2 = re.findall(
                            'file".*?"(.*?)".*?label".*?"(.*?)"', data, re.S)
                        for (url, label) in lst_dat2:
                            urlTab.append((label + '|' + url, '4'))

                else:
                    urlTab.append((cUrl, '1'))
        except:
            urlTab = []
        return urlTab
Ejemplo n.º 2
0
	def getVideos(self,videoUrl):
		urlTab = []	
		sts, data = self.getPage(videoUrl)
		if sts:
			Liste_els_3 = re.findall('embedVal="(.+?)"', data, re.S)	
			if Liste_els_3:
				encrypted = base64.b64decode(Liste_els_3[0])
				salt = encrypted[8:16]
				decrypted = cryptoJS_AES_decrypt(encrypted[16:], self.password, salt)
				Liste_els_4 = re.findall('url":"(.*?)"', decrypted, re.S)
				if Liste_els_4:
					url_=Liste_els_4[0]	
					if self.up.checkHostSupport(url_)==1:
						urlTab.append((url_,'1'))
					else:	
						sts, data = self.getPage(url_)
						if sts:
							Liste_els_5 = re.findall('media="(.*?)"', data, re.S)
							if Liste_els_5:
								url_1=Liste_els_5[0]				
								urlTab.append((url_1,'3'))
		return urlTab
Ejemplo n.º 3
0
 def getVideos(self, videoUrl):
     urlTab = []
     videoUrl, referer = videoUrl.split('|')
     # New methode
     if 'meomeo' in videoUrl:
         self.defaultParams['header']['Referer'] = referer
         sts, data = self.getPage(videoUrl)
         if sts:
             printDBG('data=' + data)
             Liste_els_5 = re.findall('"playlist":.*?"file":"(.*?)"', data,
                                      re.S)
             if Liste_els_5:
                 url_1 = Liste_els_5[0]
                 if url_1.startswith('//'): url_1 = 'https:' + url_1
                 urlTab.append((url_1, '3'))
     # Old methode
         Liste_els_3 = re.findall('embedVal="(.+?)"', data, re.S)
         if Liste_els_3:
             encrypted = base64.b64decode(Liste_els_3[0])
             salt = encrypted[8:16]
             decrypted = cryptoJS_AES_decrypt(encrypted[16:], self.password,
                                              salt)
             Liste_els_4 = re.findall('url":"(.*?)"', decrypted, re.S)
             if Liste_els_4:
                 url_ = Liste_els_4[0]
                 if self.up.checkHostSupport(url_) == 1:
                     urlTab.append((url_, '1'))
                 else:
                     sts, data = self.getPage(url_)
                     if sts:
                         Liste_els_5 = re.findall('media="(.*?)"', data,
                                                  re.S)
                         if Liste_els_5:
                             url_1 = Liste_els_5[0]
                             urlTab.append((url_1, '3'))
     return urlTab