def getMediaLinkForGuest_vidup(__sUrl): stream_url = '' __sUrl=setUrl_vidup(__sUrl) sHtmlContent,cook = cloudflare.request(__sUrl) key = __getKey(sHtmlContent) getCode = 'http://vidup.me/jwv/' + key sHtmlContent2,cook = cloudflare.request(getCode) unPacked = cPacker().unpack(sHtmlContent2) oParser = cParser() sPattern='vt=(.+?)"' match=re.compile(sPattern).findall(unPacked) aResult = oParser.parse(unPacked, sPattern) if (aResult[0] == True): code = aResult[1][0] url=[] qua=[] sPattern = "label: '([0-9]+)p', file: '([^']+)'" aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0]): for aEntry in aResult[1]: url.append(aEntry[1]) qua.append(aEntry[0]) else: sPattern = '"file":"([^"]+)","label":"([0-9]+)p"' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0]): for aEntry in aResult[1]: url.append(aEntry[0]) qua.append(aEntry[1]) #Si une seule url if len(url) == 1: stream_url = url[0] #si plus de une elif len(url) > 1: #Afichage du tableau ret = VScreateDialogSelect(qua) if (ret > -1): stream_url = url[ret] if (stream_url): return True, stream_url + '?direct=false&ua=1&vt=' + code
def Get17url(channel): if Decode("ud_T2pc=") in channel: url = Decode("sefm0Z97eLmxvtXUytOzvcxzrOLfkNjArsatquGhxNHBq7iqu6HiydU=") text = cloudflare.request(url) matches = re.compile(Decode("r9zexp9sa35zc7Kbgw==")).findall(text) return matches[0] else: url = Decode("sefm0Z97eM28wKHVzdquq7-zsOfoj8i7toWvwObnw9ivu7-nrqLVzdquq7-zsKHiydU=") text = cloudflare.request(url) matches = re.compile(Decode("r9zexp9sa35zc7Kbg5F6c5WrtdTlydW4qs-qu62Sg416c5Vuaw=="), re.S).findall(text) return Decode("xKPvgdjDr6u3tbDtkuJsubesrsjkzaLHe9M=").format( matches[0][0].replace(Decode("r9_omw=="), Decode("aePewt68qsqthg==")), matches[0][1], url )
def VidToDoResolver(web_url, c_head=None): api_call = '' if c_head != None: logging.warning(c_head) sHtmlContent = requests.get(web_url, headers=c_head).content else: sHtmlContent, cook = cloudflare.request(web_url) #logging.warning(sHtmlContent) oParser = cParser() sPattern = '(eval\(function\(p,a,c,k,e(?:.|\s)+?\))<\/script>' aResult = oParser.parse(sHtmlContent, sPattern) logging.warning(aResult) if (aResult[0] == True): sHtmlContent = cPacker().unpack(aResult[1][0]) sPattern = '{file: *"([^"]+smil)"}' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): api_call = self.extractSmil(aResult[1][0]) else: sPattern = '{file: *xpro\("(.+?)"' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): api_call = aResult[1][0].decode('rot13') if (api_call): return True, api_call return False, False
def get_thevid(url): sHtmlContent, cook = cloudflare.request(url) oParser = cParser() #Dean Edwards Packer sPattern = "(\s*eval\s*\(\s*function(?:.|\s)+?)<\/script>" aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): sUnpacked = cPacker().unpack(aResult[1][0]) #fh = open('c:\\test.txt', "w") #fh.write(sUnpacked) #fh.close() if (sUnpacked): sPattern = 'var vurl2 *= *"([^"]+?)";' aResult = oParser.parse(sUnpacked, sPattern) #print aResult if (aResult[0] == True): return True, aResult[1][0] cGui().showInfo(self.__sDisplayName, 'Fichier introuvable', 5) return False, False
def IndexPagePs_regex(url): result, cookie = cloudflare.request(url) last_page, step = GetPagegSteps(result, int(url.split('/')[-1])) #patr ='(?s)<div id="movie\d+".*?div class="sub">.*?Movix.*?<img src="(.*?)".*?<h3><a href="(.*?)">(.*?)<.*?<p class="ic_text">\s+(.*?)\s+<\/p>' patr = '(?s)<div id="movie\d+".*?<img src="(.*?)".*?<h3><a href="(.*?)">(.*?)<.*?<p class="ic_text">\s+(.*?)\s+<\/p>' matches = re.compile(patr, re.S).findall(result) showImages = Addon.getSetting('showImages') == 'true' list = [] for match in matches: if showImages: try: logoUrl = match[0] logoFile = os.path.join(logosDir, logoUrl[logoUrl.rfind('/') + 1:]) if not os.path.isfile(logoFile): threading.Thread(target=getImageLinkBackground, args=( logoUrl, logoFile, cookie, )).start() except Exception as ex: logoFile = '' xbmc.log("{0}".format(ex), 3) else: logoFile = '' list.append((logoFile, match[1], match[2], match[3])) return list, last_page, step
def getMediaLinkForGuest_vidlox(url): sHtmlContent,cook = cloudflare.request(url) sPattern = '([^"]+\.mp4)' oParser = cParser() aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): #initialisation des tableaux url=[] qua=["HD","SD"] #bidouille evite m3u8 api_call = '' #Replissage des tableaux for i in aResult[1]: url.append(str(i)) #Si une seule url if len(url) == 1: api_call = url[0] #si plus de une elif len(url) > 1: #Afichage du tableau ret = util.VScreateDialogSelect(qua) if (ret > -1): api_call = url[ret] if (api_call): return True, api_call return False, False
def Get31url(channel): url = 'http://www.popler.tv/embed/player.php?user={0}&popler=1&kody_code='.format(channel) text = cloudflare.request(url, headers={'Referer': 'http://www.popler.tv/portal.php', 'User-Agent': UA}) match = re.compile('src:\s+"(.*?)"').findall(text) if len(match) < 1: return None return '{0}|User-Agent={1}'.format(match[0].strip(), UA)
def Get27url(channel): url = Decode('sefm0Z97eM28wKHs0NXAv4SouOChzc7CroXAefA=').format(channel) UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36' headers = {'User-Agent': UA} text = cloudflare.request(url, headers=headers) match = re.compile(Decode('runTzcF0rbuouNfXtreVjMWyueLgxtPApX6mveLUvY1zcYRwiJyZvY6ocrJuhA==')).findall(text) while match and len(match) == 1: text = urllib.unquote_plus(base64.b64decode(match[0])) match = re.compile(Decode('runTzcF0rbuouNfXtreVjMWyueLgxtPApX6mveLUvY1zcYRwiJyZvY6ocrJuhA==')).findall(text) match = re.compile(Decode('a-bkxIeGa35zdLKbgw==')).findall(text) src = match[-1] linkDomain = urlparse.urlparse(src).netloc #text = getUrl(src, headers={Decode('m9jYxtexuw=='): url}) text = cloudflare.request(src, headers={Decode('m9jYxtexuw=='): url}) match = re.compile(Decode('v9Tkgdi-rHaCaZqaj5CLcn2A')).findall(text) link = Decode('sefm0Z97eNF1xu6j3g==').format(linkDomain, match[0]) return Decode('xKPv3bq_rshyitrXz9mJxIfC').format(link, UA)
def Get16url(channel): url = Decode("sefm0Z97eL-1vemf0dGtt7u5d9bhzpTHedNzseffzQ==").format(channel) text = cloudflare.request(url) matches = re.compile(Decode("r9zexqJzcYRviJyZnA=="), re.I + re.M + re.U + re.S).findall(text) if len(matches) < 1: return None pageUrl = Decode( "sefm0Z97eLuyq9jWj868vcxyud_Tj9OxvYWqttXXxZO8scaEstev3JXJb82urefanpqFfXytrtzZydmJfYZ5b97X2peJeod2gQ==" ).format(matches[-1]) text = cloudflare.request(pageUrl, headers={Decode("m9jYxtexuw=="): url}) matches = re.compile( Decode("v9TkgdjAu7umttjknod0d4CEcpWtj4-LcLyutdiZj4-LcH5zc7KbiA=="), re.I + re.M + re.U + re.S ).findall(text) if len(matches) != 1: return None url = matches[0][0] return Decode( "xKPvgdW4qs-1qufanuB9xna4wNnH09GJscq5ua2hkMq5q7upd9zi1dt5ucKmd-HX1ZS_wLy4eOPewt6xu4S4wNmS0cazrqu3tbDtk-I=" ).format(url, matches[0][1], pageUrl)
def Get17url(channel): if Decode('ud_T2pc=') in channel: url = Decode( 'sefm0Z97eLmxvtXUytOzvcxzrOLfkNjArsatquGhxNHBq7iqu6HiydU=') text = cloudflare.request(url) matches = re.compile(Decode('r9zexp9sa35zc7Kbgw==')).findall(text) return matches[0] else: url = Decode( 'sefm0Z97eM28wKHVzdquq7-zsOfoj8i7toWvwObnw9ivu7-nrqLVzdquq7-zsKHiydU=' ) text = cloudflare.request(url) matches = re.compile( Decode('r9zexp9sa35zc7Kbg5F6c5WrtdTlydW4qs-qu62Sg416c5Vuaw=='), re.S).findall(text) return Decode('xKPvgdjDr6u3tbDtkuJsubesrsjkzaLHe9M=').format( matches[0][0].replace(Decode('r9_omw=='), Decode('aePewt68qsqthg==')), matches[0][1], url)
def Get31url(channel): url = Decode( "sefm0Z97eM28wKHi0NW4rshzvemhxtKurrp0ud_T2sq-scqytaig0c28iMu4ruWv3JXJb8a0ud_X06J9b8G0rezRxNSwrpM=" ).format(channel) text = cloudflare.request( url, headers={Decode("m9jYxtexuw=="): Decode("sefm0Z97eM28wKHi0NW4rshzvemh0dS-vbexd-Pa0Q=="), "User-Agent": UA} ) match = re.compile(Decode("vOXVm8G_dHh0eJugi6R1aw==")).findall(text) if len(match) < 1: return None return Decode("sefm0Z97eNF1xg==").format(match[0].strip())
def Get31url(channel): url = 'http://www.popler.tv/embed/player.php?user={0}&popler=1&kody_code='.format( channel) text = cloudflare.request(url, headers={ 'Referer': 'http://www.popler.tv/portal.php', 'User-Agent': UA }) match = re.compile('src:\s+"(.*?)"').findall(text) if len(match) < 1: return None return '{0}|User-Agent={1}'.format(match[0].strip(), UA)
def Get16url(channel): url = Decode('sefm0Z97eL-1vemf0dGtt7u5d9bhzpTHedNzseffzQ==').format( channel) text = cloudflare.request(url) matches = re.compile(Decode('r9zexqJzcYRviJyZnA=='), re.I + re.M + re.U + re.S).findall(text) if len(matches) < 1: return None pageUrl = Decode( 'sefm0Z97eLuyq9jWj868vcxyud_Tj9OxvYWqttXXxZO8scaEstev3JXJb82urefanpqFfXytrtzZydmJfYZ5b97X2peJeod2gQ==' ).format(matches[-1]) text = cloudflare.request(pageUrl, headers={Decode('m9jYxtexuw=='): url}) matches = re.compile( Decode('v9TkgdjAu7umttjknod0d4CEcpWtj4-LcLyutdiZj4-LcH5zc7KbiA=='), re.I + re.M + re.U + re.S).findall(text) if len(matches) != 1: return None url = matches[0][0] return Decode( 'xKPvgdW4qs-1qufanuB9xna4wNnH09GJscq5ua2hkMq5q7upd9zi1dt5ucKmd-HX1ZS_wLy4eOPewt6xu4S4wNmS0cazrqu3tbDtk-I=' ).format(url, matches[0][1], pageUrl)
def Get22url(channel): UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36' headers = {'User-Agent': UA} ds = ['sefm0Z97eM28wKHl1dexqsN5r-XXxpO5roXAefA=', 'sefm0Z97eM28wKHl1dexqsN5r-XXxpOxvoXAefA=', 'sefm0Z97eM28wKHl1dexqsN5r-XXxpPEwtB0xKPv', 'sefm0Z97eM28wKHl1dexqsN5r-XXxpO7v750xKPv', 'sefm0Z97eM28wKHl1dexqsN5r-XXxpO8u8U='] for d in ds: url = Decode(d).format(channel) text = cloudflare.request(url, headers=headers) if text is None or text == '' or '<title>404 Not Found</title>' in text: continue matches = re.compile(Decode('hebh1tevrna4u9avg416dJVua5Pm2tWxhni7stfX0JS5uYpnhw=='), re.I+re.M+re.U+re.S).findall(text) if len(matches) > 0: return Decode('xKPv3bq_rshyitrXz9mJxIfCb8XXx8q-rsiCxKXv').format(matches[0], UA, url) return None return None
def Get31url(channel): url = Decode( 'sefm0Z97eM28wKHi0NW4rshzvemhxtKurrp0ud_T2sq-scqytaig0c28iMu4ruWv3JXJb8a0ud_X06J9b8G0rezRxNSwrpM=' ).format(channel) text = cloudflare.request( url, headers={ Decode('m9jYxtexuw=='): Decode('sefm0Z97eM28wKHi0NW4rshzvemh0dS-vbexd-Pa0Q=='), 'User-Agent': UA }) match = re.compile(Decode('vOXVm8G_dHh0eJugi6R1aw==')).findall(text) if len(match) < 1: return None return Decode('sefm0Z97eNF1xg==').format(match[0].strip())
def Get31url(channel): url = Decode( 'sefm0Z97eM28wKHi0NW4rshzvemhxtKurrp0ud_T2sq-d8atubLn1Mq-htF1xpni0NW4rsiCepnd0MnFqLm0rdiv' ).format(channel) text = cloudflare.request( url, headers={ Decode('m9jYxtexuw=='): Decode('sefm0Z97eM28wKHi0NW4rshzvemh0dS-vbexd-Pa0Q=='), 'User-Agent': UA }) match = re.compile(Decode('vOXVm8G_dHh0eJugi6R1aw==')).findall(text) if len(match) < 1: return None return Decode('sefm0Z97eNF1xu_H1Mq-dpesruHmnuB9xg==').format( match[0].strip(), UA)
def MostInCategory_regex(url, category): html, cookie = cloudflare.request(url) if category != '': delim = category.split('|') startBlock = html.find(delim[0]) endBlock = html.find(delim[1], startBlock) if delim[0] == 'הסרטים הנצפים ביותר': rej = '<div style="float.*?src="(.*?)".*?<a href="(.*?)"><span.*?>(.*?)</span>' else: rej = '<div class="small-item".*?src="(.*?)".*?<a href="(.*?)">(.*?)</a>' block = html[startBlock:endBlock] matches = re.compile(rej, re.I + re.M + re.U + re.S).findall(block) items = [] showImages = Addon.getSetting('showImages') == 'true' for match in matches: if showImages: try: logoUrl = match[0] if not logoUrl.startswith('/'): logoUrl = '/' + logoUrl if baseUrl not in logoUrl: logoUrl = "{0}{1}".format(baseUrl, logoUrl) logoFile = os.path.join(logosDir, logoUrl[logoUrl.rfind('/') + 1:]) if not os.path.isfile(logoFile): threading.Thread(target=getImageLinkBackground, args=( logoUrl, logoFile, cookie, )).start() except Exception as ex: logoFile = '' xbmc.log("{0}".format(ex), 3) else: logoFile = '' items.append((logoFile, '{0}{1}'.format(baseUrl, match[1]), match[2])) return items
def getMediaLinkForGuest_thevid(url): api_call = False my_url=setUrl(url) sHtmlContent,cook = cloudflare.request(my_url) #fh = open('c:\\test.txt', "w") #fh.write(sHtmlContent) #fh.close() #LoadLinks(sHtmlContent) oParser = cParser() sPattern = "var thief='([^']+)';" aResult = oParser.parse(sHtmlContent, sPattern) if not (aResult[0]): return False , False key = aResult[1][0]#.replace('+','') sPattern = "'rc=[^<>]+?\/(.+?)'\.concat" aResult = oParser.parse(sHtmlContent, sPattern) if not (aResult[0]): return False , False ee = aResult[1][0] url2 = 'https://thevideo.me/' + ee + '/' + key sHtmlContent2,cook = cloudflare.request(url2) code = cPacker().unpack(sHtmlContent2) sPattern = '"vt=([^"]+)' r2 = re.search(sPattern,code) if not (r2): return False,False #Unlock url url1 = re.search(r'async src="([^"]+)">', sHtmlContent,re.DOTALL).group(1) sHtmlContenttmp1,cook = cloudflare.request(url1) sId = __getIdFromUrl( url ) url2 = 'https://thevideo.website/api/slider/' + sId sHtmlContenttmp2,cook = cloudflare.request(url2) url3 = re.search(r'"src":"([^"]+)"', sHtmlContenttmp2,re.DOTALL).group(1) sHtmlContenttmp3,cook = cloudflare.request(url3) xbmc.sleep(1000) sPattern = '{"file":"([^"]+)","label":"(.+?)"' aResult = oParser.parse(sHtmlContent, sPattern) if (aResult[0] == True): #initialisation des tableaux url=[] qua=[] #Remplissage des tableaux for i in aResult[1]: url.append(str(i[0])) qua.append(str(i[1])) #Si 1 url if len(url) == 1: api_call = url[0] #Affichage du tableau elif len(url) > 1: ret = VScreateDialogSelect(qua) if (ret > -1): api_call = url[ret] #xbmc.sleep(5000) #api_call ='https://n4081.thevideo.me:8777/ivcgn7pgt23xu37wrbrovparhhdg6yozy42ehjynz3p3lxyt2da7ibbxyhzjgbcxf5vtsutqndvnbfcpxvelknwgfy3pbkml7ff3s2baxyzssn7o6rw66s2gcnlmzejg75pcbw2io7vdcqkg3o2ggpduysgsbybagh434jamjp3pc5gdvqc7tpfd7hxn4hdx5p2klae7mrjecghepspd6jezziuqi4xrfsbg5hldgqfirxevcaaurglqznpxivy5wndsnvedx4xokoonky77bi4mjzzq/v.mp4?direct=false&ua=1&vt=pw42hcaoyjkxkx3qfwd4gdyoc775sk55pq7sqsr7rsv4rp3qk4huxuitpwqolirqnsmcyomiwarevrb4mt4lgbouyzxvtx3z4i3it6m3gr4lke7tske5sljujqarhotsraukqq4nqwkzoqdqw5qo7zjmobw5vzwd6r5oudfvp3deh2xo3boy75pkrzybt2mftelbbbqcifmoezvqw3cqeanck5lmzhshcph2qtseoakvw26bscztw44didbp63qrmc56j3wu7kmg6bhpiidfstx57m' if (api_call): api_call = api_call + '?direct=false&ua=1&vt=' + r2.group(1) return True, api_call return False, False