示例#1
0
    def __getMediaLinkForGuest(self):
        
        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()
        
        #fh = open('c:\\test.txt', "w")
        #fh.write(sHtmlContent)
        #fh.close()
        
        #Debut des tests de decodage
        oParser = cParser()
        string = ''
       
        #"aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)"
        sPattern = "<video(?:.|\s)*?<script\s[^>]*?>((?:.|\s)*?)<\/script"
        aResult = oParser.parse(sHtmlContent, sPattern)
        if (aResult[0] == True):
            string = AADecoder(aResult[1][0]).decode()
            print string
                
        if not (string): 
            #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])
                string = JJDecoder(sUnpacked).decode()

        if (string):
            sContent = string.replace('\\','')
            
            api_call = ''

            sPattern = 'src=\s*?"(.*?)\?'
            aResult = oParser.parse(sContent, sPattern)
            if (aResult[0] == True):
                api_call = aResult[1][0]
                
            if not api_call:
                sPattern = 'window\.vr *=["\'](.+?)["\']'
                aResult = oParser.parse(sContent, sPattern)
                if (aResult[0] == True):
                    api_call = aResult[1][0]

        if (api_call):
            return True, api_call
            
        return False, False
示例#2
0
    def __getMediaLinkForGuest(self):

        #VSlog(self.__sUrl)

        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()

        oParser = cParser()

        api_call = False

        sPattern = '(?:[>;]\s*)(゚ω゚.+?\(\'_\'\);)'
        aResult = oParser.parse(sHtmlContent, sPattern)
        if aResult[0]:
            for i in aResult[1]:
                decoded = AADecoder(i).decode()
                r = re.search("\('src', '([^']+)'\);", decoded,
                              re.DOTALL | re.UNICODE)
                if r:
                    api_call = r.group(1)
                    break

        #VSlog(api_call)

        if (api_call):
            return True, api_call

        return False, False
    def __getMediaLinkForGuest(self):

        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()

        #fh = open('c:\\test.txt', "w")
        #fh.write(sHtmlContent)
        #fh.close()

        #Debut des tests de decodage
        oParser = cParser()
        string = ''

        #"aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)"
        sPattern = "<video(?:.|\s)*?<script\s[^>]*?>((?:.|\s)*?)<\/script"
        aResult = oParser.parse(sHtmlContent, sPattern)
        if (aResult[0] == True):
            string = AADecoder(aResult[1][0]).decode()

        if not (string):
            #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])
                string = JJDecoder(sUnpacked).decode()

        if (string):
            sContent = string.replace('\\', '')

            api_call = ''

            sPattern = 'src=\s*?"(.*?)\?'
            aResult = oParser.parse(sContent, sPattern)
            if (aResult[0] == True):
                api_call = aResult[1][0]

            if not api_call:
                sPattern = 'window\.vr *="(.+?)"'
                aResult = oParser.parse(sContent, sPattern)
                if (aResult[0] == True):
                    api_call = aResult[1][0]

        if (api_call):
            return True, api_call

        return False, False
示例#4
0
def CheckAADecoder(str):
    aResult = re.search('([>;]\s*)(゚ω゚.+?\(\'_\'\);)', str, re.DOTALL | re.UNICODE)
    if (aResult):
        print('AA encryption')
        tmp = aResult.group(1) + AADecoder(aResult.group(2)).decode()
        return str[:aResult.start()] + tmp + str[aResult.end():]

    return str
示例#5
0
def CheckAADecoder(str):
    oParser = cParser()
    sPattern = '(゚ω゚.+?)<\/script>'
    aResult = oParser.parse(str, sPattern)
    if (aResult[0]):
        xbmc.log('AA encryption')
        return AADecoder(aResult[1][0]).decode()

    return str
示例#6
0
def CheckAADecoder(str):
    sPattern = '[>;]\s*(゚ω゚.+?\(\'_\'\);)'
    aResult = re.search(sPattern, str, re.DOTALL | re.UNICODE)
    if (aResult):
        #xbmc.log('AA encryption')
        tmp = AADecoder(aResult.group(1)).decode()
        #xbmc.log('>> ' + tmp)
        return str[:aResult.start()] + tmp + str[aResult.end():]

    return str
示例#7
0
    def __getMediaLinkForGuest(self):
        api_call = ''
        oParser = cParser()

        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()

        aResult = oParser.parse(sHtmlContent, sPattern1)
        if (aResult[0] == True):
            sUrl = aResult[1][0]

            oRequest = cRequestHandler(sUrl)
            oRequest.addHeaderEntry('User-Agent', UA)
            oRequest.addHeaderEntry('Referer', self.__sUrl)
            sHtmlContent = oRequest.request()

            aResult = oParser.parse(sHtmlContent, sPattern1)
            if (aResult[0] == True):
                sUrl2 = aResult[1][0]

                oRequest = cRequestHandler(sUrl2)
                oRequest.addHeaderEntry('User-Agent', UA)
                oRequest.addHeaderEntry('Referer', sUrl)
                sHtmlContent = oRequest.request()
                sHtmlContent = sHtmlContent.replace('\n', '')

                aResult = re.search('id="code".+?value="(.+?)"', sHtmlContent,
                                    re.DOTALL)
                if (aResult):
                    sFunc = base64.b64decode(aResult.group(1))

                aResult = re.search('(゚ω゚.+?\(\'_\'\);)', sHtmlContent,
                                    re.DOTALL | re.UNICODE)
                if (aResult):
                    sHtmlContent = AADecoder(aResult.group(1)).decode()
                    if sHtmlContent:
                        aResult = re.search("func.innerHTML.+?\('(.+?)',",
                                            sHtmlContent, re.DOTALL)
                        if (aResult):
                            chars = aResult.group(1)
                            final = sDecode(chars, sFunc)
                            sPattern = "source\.setAttribute\('src', '([^']+)'\)"
                            aResult = oParser.parse(final, sPattern)
                            if (aResult[0] == True):
                                api_call = aResult[1][0]

        if (api_call):
            return True, api_call

        return False, False
示例#8
0
    def __getMediaLinkForGuest(self):

        url = self.__sUrl

        oRequest = cRequestHandler(url)
        oRequest.addHeaderEntry('User-Agent', UA)
        oRequest.addHeaderEntry('Referer',self.__sUrl)
        oRequest.addHeaderEntry('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')
        
        #VSlog(self.__sUrl)

        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()
        #VSlog(sHtmlContent)
        oParser = cParser()
        
        api_call = False
        
        sPattern =  '(?:[>;]\s*)(゚ω゚.+?\(\'_\'\);)'
        aResult = oParser.parse(sHtmlContent, sPattern)
         
		
        if aResult[0]:
            for i in aResult[1]:
                decoded = AADecoder(i).decode()

                r = re.search('file:"(.+?)",', decoded, re.DOTALL | re.UNICODE)
                if r:
                    api_call = r.group(1)
                    break
        
        #VSlog(api_call)

        if (api_call):
            return True, api_call

        return False, False
示例#9
0
    def __getMediaLinkForGuest(self):

        api_call = False
        url = self.__sUrl

        oRequest = cRequestHandler(url)
        oRequest.addHeaderEntry('User-Agent', UA)
        oRequest.addHeaderEntry('Referer', self.__sUrl)
        oRequest.addHeaderEntry('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')

        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()

        list_url = []
        list_q = []
        oParser = cParser()
        
        sPattern = '(?:[>;]\s*)(゚ω゚.+?\(\'_\'\);)'
        aResult = oParser.parse(sHtmlContent, sPattern)

        if (aResult[0]== True):  # 1 seul à vérifier ici ?
            sdec = AADecoder(aResult[1][0]).decode()
            sPattern =  'file:"([^"]+).+?label:"([^"]+)'
            aResult = oParser.parse(sdec, sPattern)

            if (aResult[0] == True):
                for aentry in aResult[1]:  # ou là
                    list_url.append(aentry[0])
                    list_q.append(aentry[1])

                api_call = dialog().VSselectqual(list_q, list_url)

        if (api_call):
            return True, api_call

        return False, False
示例#10
0
    def __getMediaLinkForGuest(self):

        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()

        #fh = open('c:\\test.txt', "w")
        #fh.write(sHtmlContent)
        #fh.close()

        #Debut des tests de decodage
        oParser = cParser()
        string = ''

        #"aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)"
        sPattern = '<script type="text\/javascript">(゚ω゚.+?)<\/script>'
        #sPattern = "<video(?:.|\s)*?<script\s[^>]*?>.+?<\/script>\s<script\s[^>]*?>((?:.|\s)*?)<\/"

        aResult = oParser.parse(sHtmlContent, sPattern)
        #xbmc.log(str(aResult))

        #ok on a maintenant 4 liens
        vid = 'XXXXXX'
        string2 = []
        for aEntry in aResult[1]:
            s = AADecoder(aEntry).decode()
            #xbmc.log(s)
            string2.append(s)

            if 'welikekodi_ya_rly' in s:
                c0 = re.search('welikekodi_ya_rly = ([^<>;"]+);', s)
                if c0:
                    c = c0.group(1)
                    c = c.replace('Math.round', 'int')
                    #xbmc.log('calcul : ' + c )
                    cc = str(eval(c))
                    vid = '[' + cc + ']'
                    #xbmc.log('resultat : ' + vid )

        for string3 in string2:
            if ('toString' in string3) and (vid in string3):

                #xbmc.log(string3)

                base = int(re.findall('toString\(a\+([0-9]+)\)', string3)[0])
                table = re.findall('(\([0-9][^)]+\))', string3)

                for str1 in table:
                    val = re.findall('([0-9]+),([0-9]+)', str1)
                    base2 = base + int(val[0][0])
                    str2 = base10toN(int(val[0][1]), base2)
                    string3 = string3.replace(str1, str2)

                #nettoyage
                string3 = string3.replace('+', '')
                string3 = string3.replace('"', '')
                string3 = string3.replace('', '')

                #bidouille pour pas avoir a tout recoder
                url = re.findall('(http[^<>}]+)', string3)[0]
                string = 'src="' + url + '?mime=true"'

        if not (string):
            #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])
                string = JJDecoder(sUnpacked).decode()

        if (string):
            sContent = string.replace('\\', '')

            api_call = ''

            sPattern = 'src=\s*?"(.*?)\?'
            aResult = oParser.parse(sContent, sPattern)

            #print aResult

            if (aResult[0] == True):
                api_call = aResult[1][0]

            if not api_call:
                sPattern = 'window\.vr *=["\'](.+?)["\']'
                aResult = oParser.parse(sContent, sPattern)
                if (aResult[0] == True):
                    api_call = aResult[1][0]

        if (api_call):

            if 'openload.co/stream' in api_call:
                UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0'
                headers = {'User-Agent': UA}

                req = urllib2.Request(api_call, None, headers)
                res = urllib2.urlopen(req)
                finalurl = res.geturl()
                #xbmc.log(finalurl)
                api_call = finalurl

            return True, api_call

        return False, False
示例#11
0
    def __getMediaLinkForGuest(self):

        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()

        #fh = open('c:\\test.txt', "w")
        #fh.write(sHtmlContent)
        #fh.close()

        #Debut des tests de decodage
        oParser = cParser()
        string = ''

        #"aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)"
        sPattern = "<video(?:.|\s)*?<script\s[^>]*?>((?:.|\s)*?)<\/script"
        aResult = oParser.parse(sHtmlContent, sPattern)
        if (aResult[0] == True):
            string = AADecoder(aResult[1][0]).decode()
            #print string
            if 'toString' in string:
                base = int(re.findall('toString\(a\+([0-9]+)\)', string)[0])
                table = re.findall('(\([0-9][^)]+\))', string)

                for str1 in table:
                    val = re.findall('([0-9]+),([0-9]+)', str1)
                    base2 = base + int(val[0][0])
                    str2 = base10toN(int(val[0][1]), base2)
                    string = string.replace(str1, str2)

                #nettoyage
                string = string.replace('+', '')
                string = string.replace('"', '')
                string = string.replace('', '')

                #bidouille pour pas avoir a tout recoder
                url = re.findall('(http[^<>}]+)', string)[0]
                string = 'src="' + url + '?mime=true"'

        if not (string):
            #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])
                string = JJDecoder(sUnpacked).decode()

        if (string):
            sContent = string.replace('\\', '')

            api_call = ''

            sPattern = 'src=\s*?"(.*?)\?'
            aResult = oParser.parse(sContent, sPattern)

            #print aResult

            if (aResult[0] == True):
                api_call = aResult[1][0]

            if not api_call:
                sPattern = 'window\.vr *=["\'](.+?)["\']'
                aResult = oParser.parse(sContent, sPattern)
                if (aResult[0] == True):
                    api_call = aResult[1][0]

        if (api_call):
            return True, api_call

        return False, False
示例#12
0
    def __getMediaLinkForGuest(self):

        api_call = False
        url = self.__sUrl

        keymorocco = ''
        keymycountry= ''
        morocco = ''
        mycountry = ''

        urlapi = "https://userload.co/api/assets/userload/js/videojs.js"

        #A voir quel encodage il faut pour Kodi 18.
        sHtmlContent1 = requests.get(urlapi).content.decode('utf-8')

        oParser = cParser()
        sPattern = '(゚ω゚.+?\(\'_\'\);)'
        aResult = oParser.parse(sHtmlContent1 , sPattern)

        if (aResult[0]== True):
            sdecode = AADecoder(aResult[1][0]).decode()

            sPattern =  'morocco=".([^\W]+).+?"&mycountry=".([^\W]+)'
            aResult_2 = oParser.parse(sdecode, sPattern)

            if (aResult_2[0] == True):
                keymorocco = aResult_2[1][0][0]
                keymycountry = aResult_2[1][0][1]

        referer = url.split('|Referer=')[1]
        url = url.split('|Referer=')[:-1][0]

        oRequestHandler = cRequestHandler(url)
        oRequestHandler.addHeaderEntry('Referer', referer)
        sHtmlContent1 = oRequestHandler.request()

        sPattern2 = '<script type="text/javascript">(\s*eval\s*\(\s*function(?:.|\s)+?{}\)\))'
        aResult = re.findall(sPattern2, sHtmlContent1)

        if aResult:
            str2 = aResult[0]
            if not str2.endswith(';'):
                str2 = str2 + ';'

            strs = cPacker().unpack(str2)

            oParser = cParser()
            sPattern = 'var\s(.+?)="([^"]*)'
            aResult = oParser.parse(strs, sPattern)

            if (aResult[0]== True):
                for r in aResult[1]:
                    if r[0] == keymorocco:
                        morocco = r[1]
                    if r[0] == keymycountry:
                        mycountry = r[1]

        if morocco and mycountry:
            url2 = 'https://userload.co/api/request/'
            pdata = 'morocco=' + morocco + '&mycountry=' + mycountry
            oRequest = cRequestHandler(url2)
            oRequest.setRequestType(1)
            oRequestHandler.addHeaderEntry('User-Agent', UA)
            oRequest.addHeaderEntry('Content-Type', 'application/x-www-form-urlencoded')
            oRequest.addHeaderEntry('Content-Length', len(str(pdata)))
            oRequest.addHeaderEntry('Referer', url)
            oRequest.addParametersLine(pdata)
            api_call = oRequest.request()

            if 'mp4' in api_call  and 'uloadcdn.com' in api_call :
                return True, api_call.strip()

        return False, False
示例#13
0
    def __getMediaLinkForGuest(self):

        url = self.__sUrl

        #url = self.__sUrl.replace('embed.mystream.to','mstream.cloud')
        #url = 'https://mstream.cloud/gfa35ebu1nt1'

        oRequest = cRequestHandler(url)
        oRequest.addHeaderEntry('User-Agent', UA)
        oRequest.addHeaderEntry(
            'Accept',
            'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')
        sHtmlContent = oRequest.request()

        oParser = cParser()

        api_call = False
        a = ''
        b = ''
        c = ''
        base64_coded = ''

        sPattern = '(?:[>;]\s*)(゚ω゚.+?\(\'_\'\);)'
        aResult = oParser.parse(sHtmlContent, sPattern)
        if aResult[0]:
            for i in aResult[1]:
                decoded = AADecoder(i).decode()
                r = re.search("atob\(\'([^']+)\'\)", decoded,
                              re.DOTALL | re.UNICODE)
                if r:
                    base64_coded = r.group(1)
                    break
                else:
                    r = re.search("setAttribute\(\'src\', *\'(http.+?mp4)\'\)",
                                  decoded, re.DOTALL)
                    if r:
                        api_call = r.group(1)
                        return True, api_call + '|User-Agent=' + UA

        reducesHtmlContent = oParser.abParse(sHtmlContent, '<z9></z9>',
                                             '{if(document')

        sPattern = '(\w+)'
        aResult = oParser.parse(reducesHtmlContent, sPattern)
        if aResult[0]:
            mlist = sorted(aResult[1], key=len)
            mlist = mlist[-2:]
            a = mlist[0]
            b = mlist[1]

        sPattern = "=\['getAttribute','*([^']+)'*\]"
        aResult = oParser.parse(sHtmlContent, sPattern)
        if aResult[0]:
            winkey = aResult[1][0].replace('window.', '')
            c = Cdecode(sHtmlContent, winkey)  #winkey not used recently
            if c:
                api_call = decode(base64_coded, a, b, c)

        if (api_call):
            return True, api_call + '|User-Agent=' + UA

        return False, False
    def __getMediaLinkForGuest(self):
        
        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()
        
        #fh = open('c:\\test.txt', "w")
        #fh.write(sHtmlContent)
        #fh.close()
        
        #Debut des tests de decodage
        oParser = cParser()
        string = ''
       
        #"aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)"
        sPattern = "<video(?:.|\s)*?<script\s[^>]*?>((?:.|\s)*?)<\/script"
        aResult = oParser.parse(sHtmlContent, sPattern)
        if (aResult[0] == True):
            string = AADecoder(aResult[1][0]).decode()
            #print string
            if 'toString' in string:
                base = int(re.findall('toString\(a\+([0-9]+)\)',string)[0])
                table = re.findall('(\([0-9][^)]+\))',string)
                
                for str1 in table:
                    val = re.findall('([0-9]+),([0-9]+)',str1)
                    base2 = base + int(val[0][0])
                    str2 = base10toN(int(val[0][1]), base2)
                    string = string.replace(str1, str2)
                
                #nettoyage
                string = string.replace('+', '')
                string = string.replace('"', '')
                string = string.replace('', '')

                #bidouille pour pas avoir a tout recoder
                url = re.findall('(http[^<>}]+)',string)[0]
                string = 'src="' + url + '?mime=true"'
                
        if not (string): 
            #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])
                string = JJDecoder(sUnpacked).decode()

        if (string):
            sContent = string.replace('\\','')
            
            api_call = ''

            sPattern = 'src=\s*?"(.*?)\?'
            aResult = oParser.parse(sContent, sPattern)
            
            #print aResult
            
            if (aResult[0] == True):
                api_call = aResult[1][0]
                
            if not api_call:
                sPattern = 'window\.vr *=["\'](.+?)["\']'
                aResult = oParser.parse(sContent, sPattern)
                if (aResult[0] == True):
                    api_call = aResult[1][0]

        if (api_call):
            return True, api_call
            
        return False, False
示例#15
0
def resolve(url):

    oRequest = cRequestHandler(url)
    sHtmlContent = oRequest.request()

    oParser = cParser()
    string = ''

    sPattern = '<script type="text\/javascript">(゚ω゚.+?)<\/script>'
    aResult = oParser.parse(sHtmlContent, sPattern)

    vid = 'XXXXXX'
    string2 = []

    for aEntry in aResult[1]:
        s = AADecoder(aEntry).decode()
        string2.append(s)

        if 'welikekodi_ya_rly' in s:
            c0 = re.search('welikekodi_ya_rly = ([^<>;"]+);', s)
            if c0:
                c = c0.group(1)
                c = c.replace('Math.round', 'int')
                cc = str(eval(c))
                vid = '[' + cc + ']'

    for string3 in string2:
        if ('toString' in string3) and (vid in string3):
            base = int(re.findall('toString\(a\+([0-9]+)\)', string3)[0])
            table = re.findall('(\([0-9][^)]+\))', string3)

            for str1 in table:
                val = re.findall('([0-9]+),([0-9]+)', str1)
                base2 = base + int(val[0][0])
                str2 = base10toN(int(val[0][1]), base2)
                string3 = string3.replace(str1, str2)

            #clean up
            string3 = string3.replace('+', '')
            string3 = string3.replace('"', '')
            string3 = string3.replace('', '')

            #a hack for not having to recode everything
            url = re.findall('(http[^<>}]+)', string3)[0]
            string = 'src="' + url + '?mime=true"'

    if (string):
        sContent = string.replace('\\', '')

        api_call = ''

        sPattern = 'src=\s*?"(.*?)\?'
        aResult = oParser.parse(sContent, sPattern)

        if (aResult[0] == True):
            api_call = aResult[1][0]

        if not api_call:
            sPattern = 'window\.vr *=["\'](.+?)["\']'
            aResult = oParser.parse(sContent, sPattern)
            if (aResult[0] == True):
                api_call = aResult[1][0]

    if (api_call):

        if 'openload.co/stream' in api_call:
            UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0'
            headers = {'User-Agent': UA}

            req = urllib.request.Request(api_call, None, headers)
            res = urllib.request.urlopen(req)
            finalurl = res.geturl()
            api_call = finalurl

    return [{'url': api_call}]
示例#16
0
    def __getMediaLinkForGuest(self):

        UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0'

        api_call = ''

        oParser = cParser()

        #recuperation de la page
        xbmc.log('url teste : ' + self.__sUrl)
        oRequest = cRequestHandler(self.__sUrl)
        oRequest.addHeaderEntry('User-Agent', UA)
        sHtmlContent = oRequest.request()

        #fh = open('c:\\test.txt', "w")
        #fh.write(sHtmlContent)
        #fh.close()

        #"aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)"
        sPattern = '<script type="text\/javascript">(゚ω゚.+?)<\/script>'
        aResult = oParser.parse(sHtmlContent, sPattern)

        if not (aResult[0]):
            return False, False

        s = AADecoder(aResult[1][0]).decode()

        sPattern = '\(tmp\.slice\(-1\)\.charCodeAt\(0\) \+ ([0-9]+)\)'
        aResult = oParser.parse(s, sPattern)

        val = 2
        if (aResult[0]):
            val = int(aResult[1][0])

        sPattern = '<span id="hiddenurl">(.+?)<\/span>'
        aResult = oParser.parse(sHtmlContent, sPattern)

        if not (aResult[0]):
            return False, False

        string = aResult[1][0]

        string = cUtil().unescape(string)

        url = ''

        for c in string:
            v = ord(c)
            if v >= 33 and v <= 126:
                v = ((v + 14) % 94) + 33
            url = url + chr(v)

        url = url[:-1] + chr(ord(url[-1]) + val)

        api_call = "https://openload.co/stream/" + url + "?mime=true"

        xbmc.log(api_call)

        if (api_call):

            if 'openload.co/stream' in api_call:

                headers = {'User-Agent': UA}

                req = urllib2.Request(api_call, None, headers)
                res = urllib2.urlopen(req)
                finalurl = res.geturl()
                #xbmc.log(finalurl)
                api_call = finalurl

            return True, api_call

        return False, False