def __getMediaLinkForGuest(self): url_stream = '' oRequest = cRequestHandler(self.__sUrl) sHtmlContent = oRequest.request() oParser = cParser() sPattern = "<script type='text\/javascript'>(eval\(function\(p,a,c,k,e,d.+?)<\/script>" aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): for i in aResult[1]: sHtmlContent = cPacker().unpack(i) #xbmc.log(sHtmlContent) #Premiere methode avec <embed> if '<embed' in sHtmlContent: pass #deuxieme methode, lien code aes else: EncodedLink = re.search('file:"([^"]+)"', sHtmlContent, re.DOTALL) if (EncodedLink): Key = "a949376e37b369" + "f17bc7d3c7a04c5721" x = GKDecrypter(128, 128) sUrl = x.decrypt(EncodedLink.group(1), Key.decode("hex"), "ECB").split('\0')[0] #Si utilise pyaes #import resources.lib.pyaes as pyaes #decryptor = pyaes.new(Key.decode("hex"), pyaes.MODE_ECB, IV='') #sUrl = decryptor.decrypt(lt.decode("hex")).replace('\x00', '') #xbmc.log('>> ' + sUrl) url_stream = sUrl if (url_stream): return True, url_stream else: cGui().showInfo(self.__sDisplayName, 'Fichier introuvable', 5) return False, False return False, False
def showHostersLink(): #En fait ici, tout leur lien sont sur le meme hebergeur d'ou le lien deja traduit oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrllink = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sUrl = '' #Decodage du lien if 'fa*' in sUrllink: EncodedLink = sUrllink.replace('fa*','') Key = "JyI8fNAUVUDrrbbT1nxg" x = GKDecrypter(192,128) sUrl = x.decrypt(EncodedLink, Key, "ECB").split('\0')[0] #print sUrl else: #recuperation urls oRequestHandler = cRequestHandler(sUrllink) sHtmlContent = oRequestHandler.request() #fh = open('c:\\test.txt', "w") #fh.write(sHtmlContent) #fh.close() oParser = cParser() sPattern = 'proxy.link=(.+?)&' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): sUrl = aResult[1][0] #url = re.findall('<iframe src="(.+?)"', sHtmlContent) if (sUrl): sTitle = sMovieTitle sUrl = sUrl sHosterUrl = str(sUrl) oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): oHoster.setDisplayName(sTitle) oHoster.setFileName(sTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, '') oGui.setEndOfDirectory()
def showHostersLink(): #En fait ici, tout leur lien sont sur le meme hebergeur d'ou le lien deja traduit oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrllink = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') sUrl = '' #Decodage du lien if 'fa*' in sUrllink: EncodedLink = sUrllink.replace('fa*', '') Key = "JyI8fNAUVUDrrbbT1nxg" x = GKDecrypter(192, 128) sUrl = x.decrypt(EncodedLink, Key, "ECB").split('\0')[0] #print sUrl else: #recuperation urls oRequestHandler = cRequestHandler(sUrllink) sHtmlContent = oRequestHandler.request() #fh = open('c:\\test.txt', "w") #fh.write(sHtmlContent) #fh.close() oParser = cParser() sPattern = 'proxy.link=(.+?)&' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): sUrl = aResult[1][0] #url = re.findall('<iframe src="(.+?)"', sHtmlContent) if (sUrl): sTitle = sMovieTitle sUrl = sUrl sHosterUrl = str(sUrl) oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): oHoster.setDisplayName(sTitle) oHoster.setFileName(sTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, '') oGui.setEndOfDirectory()
def __getMediaLinkForGuest(self): url_stream = '' oRequest = cRequestHandler(self.__sUrl) sHtmlContent = oRequest.request() oParser = cParser() sPattern = "<script type='text\/javascript'>(eval\(function\(p,a,c,k,e,d.+?)<\/script>" aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): for i in aResult[1]: sHtmlContent = cPacker().unpack(i) #xbmc.log(sHtmlContent) #Premiere methode avec <embed> if '<embed' in sHtmlContent: pass #deuxieme methode, lien code aes else: EncodedLink = re.search('file:"([^"]+)"', sHtmlContent, re.DOTALL) if (EncodedLink): Key = "a949376e37b369" + "f17bc7d3c7a04c5721" x = GKDecrypter(128, 128) sUrl = x.decrypt(EncodedLink.group(1), Key.decode("hex"), "ECB").split('\0')[0] #Si utilise pyaes #import resources.lib.pyaes as pyaes #decryptor = pyaes.new(Key.decode("hex"), pyaes.MODE_ECB, IV = '') #sUrl = decryptor.decrypt(lt.decode("hex")).replace('\x00', '') #xbmc.log('>> ' + sUrl) url_stream = sUrl if (url_stream): return True, url_stream else: return False, False return False, False
def showHostersLink(): #En fait ici, tout leur lien sont sur le meme hebergeur d'ou le lien deja traduit oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') #Decodage du lien if 'poy*' in sUrl: EncodedLink = sUrl.replace('poy*','') Key = "ZgJ4yYMx4aiH2Nh8fpHh" x = GKDecrypter(192,128) sUrl = x.decrypt(EncodedLink, Key, "ECB").split('\0')[0] #recuperation urls #oRequestHandler = cRequestHandler(sUrl) #sHtmlContent = oRequestHandler.request() #fh = open('c:\\test.txt', "w") #fh.write(sHtmlContent) #fh.close() #url = re.findall('<iframe src="(.+?)"', sHtmlContent) if (sUrl): sTitle = sMovieTitle sUrl = sUrl sHosterUrl = str(sUrl) oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): oHoster.setDisplayName(sTitle) oHoster.setFileName(sTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, '') oGui.setEndOfDirectory()
def showHostersLink(): #En fait ici, tout leur lien sont sur le meme hebergeur d'ou le lien deja traduit oGui = cGui() oInputParameterHandler = cInputParameterHandler() sUrl = oInputParameterHandler.getValue('siteUrl') sMovieTitle = oInputParameterHandler.getValue('sMovieTitle') #Decodage du lien if 'poy*' in sUrl: EncodedLink = sUrl.replace('poy*', '') Key = "ZgJ4yYMx4aiH2Nh8fpHh" x = GKDecrypter(192, 128) sUrl = x.decrypt(EncodedLink, Key, "ECB").split('\0')[0] #recuperation urls #oRequestHandler = cRequestHandler(sUrl) #sHtmlContent = oRequestHandler.request() #fh = open('c:\\test.txt', "w") #fh.write(sHtmlContent) #fh.close() #url = re.findall('<iframe src="(.+?)"', sHtmlContent) if (sUrl): sTitle = sMovieTitle sUrl = sUrl sHosterUrl = str(sUrl) oHoster = cHosterGui().checkHoster(sHosterUrl) if (oHoster != False): oHoster.setDisplayName(sTitle) oHoster.setFileName(sTitle) cHosterGui().showHoster(oGui, oHoster, sHosterUrl, '') oGui.setEndOfDirectory()