Beispiel #1
0
def Hoster_Telerium(url, referer):
    oRequestHandler = cRequestHandler(url)
    oRequestHandler.addHeaderEntry('User-Agent', UA)
    oRequestHandler.addHeaderEntry('Referer', referer)
    sHtmlContent = oRequestHandler.request()

    urlrederict = oRequestHandler.getRealUrl()
    urlmain = 'https://' + urlrederict.split('/')[
        2]  # ex https://telerium.club

    sPattern = 'var\s+cid[^\'"]+[\'"]{1}([0-9]+)'
    aResult = re.findall(sPattern, sHtmlContent)

    if aResult:
        str2 = aResult[0]
        datetoken = int(getTimer()) * 1000

        jsonUrl = urlmain + '/streams/' + str2 + '/' + str(datetoken) + '.json'
        tokens = getRealTokenJson(jsonUrl, urlrederict)
        m3url = tokens['url']
        nxturl = urlmain + tokens['tokenurl']
        realtoken = getRealTokenJson(nxturl, urlrederict)[10][::-1]
        try:
            m3url = m3url.decode("utf-8")
        except:
            pass

        sHosterUrl = 'https:' + m3url + realtoken
        sHosterUrl += '|User-Agent=' + UA + '&Referer=' + Quote(
            urlrederict)  # + '&Sec-F'

        return True, sHosterUrl

    return False, False
Beispiel #2
0
def showSearch():
    VSlog('showSearch global0')
    oGui = cGui()
    addons = addon()
    VSlog('showSearch global1')
    oInputParameterHandler = cInputParameterHandler()
    VSlog('showSearch global2')
    sSearchText = oInputParameterHandler.getValue('searchtext')
    VSlog('showSearch global3')
    sCat = oInputParameterHandler.getValue('sCat')
    VSlog('showSearch global4')
    VSlog('sText=' + str(sSearchText))
    oHandler = cRechercheHandler()
    oHandler.setText(sSearchText)
    oHandler.setCat(sCat)
    aPlugins = oHandler.getAvailablePlugins()
    if not aPlugins:
        return True
    VSlog('aPlugins=' + str(len(aPlugins)))
    total = len(aPlugins)
    progress_ = progress().VScreate(large=True)

    # kodi 17 vire la fenetre busy qui se pose au dessus de la barre de Progress
    try:
        xbmc.executebuiltin('Dialog.Close(busydialog)')
    except:
        pass

    oGui.addText('globalSearch',
                 addons.VSlang(30081) % sSearchText, 'search.png')
    sSearchText = Quote(sSearchText)

    count = 1
    for plugin in aPlugins:
        if not os.path.exists(
                GetCacheSubDir('Tsiplayer') + 'VStream_listing.search'):
            break
        progress_.VSupdate(progress_, total, plugin['name'], True)
        if progress_.iscanceled():
            break
        oGui.addText(plugin['identifier'],
                     '%s. [COLOR olive]%s[/COLOR]' % (count, plugin['name']),
                     'sites/%s.png' % (plugin['identifier']))
        oGui.searchResults[:] = [
        ]  # vider le tableau de résultats pour les récupérer par source

        _pluginSearch(plugin, sSearchText)
        count += 1

    if not count:  # aucune source ne retourne de résultats
        oGui.addText('globalSearch')  # "Aucune information"

    progress_.VSclose(progress_)

    cGui.CONTENT = 'files'

    oGui.setEndOfDirectory()
    return True
Beispiel #3
0
def showSearch():
    oGui = cGui()

    sSearchText = oGui.showKeyBoard()
    if (sSearchText != False):
        sUrl = URL_SEARCH[0] + Quote(sSearchText)
        showSearchResult(sUrl)
        oGui.setEndOfDirectory()
        return
Beispiel #4
0
    def __handle_escape(self, key):
        while True:
            start_js = self.js
            offset = self.js.find(key) + len(key)
            if self.js[offset] == '(' and self.js[offset + 2] == ')':
                c = self.js[offset + 1]
                self.js = self.js.replace('%s(%s)' % (key, c), Quote(c))

            if start_js == self.js:
                break
Beispiel #5
0
    def __getMediaLinkForGuest2(self):
        api_call = ''

        oRequest = cRequestHandler('https://ytoffline.net/fr1')
        oRequest.addHeaderEntry(
            'User-Agent',
            'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:70.0) Gecko/20100101 Firefox/70.0'
        )
        oRequest.addHeaderEntry(
            'Accept',
            'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')
        oRequest.addHeaderEntry('Accept-Language',
                                'fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3')
        sHtmlContent = oRequest.request()

        tok = re.search('id="token" value="(.+?)"', sHtmlContent).group(1)
        UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:70.0) Gecko/20100101 Firefox/70.0'

        oParser = cParser()
        pdata = 'url=' + Quote(self.__sUrl) + '&token=' + tok

        oRequest = cRequestHandler('https://ytoffline.net/fr1/download/')
        oRequest.setRequestType(1)
        oRequest.addHeaderEntry('User-Agent', UA)
        oRequest.addHeaderEntry('Accept-Encoding', 'gzip, deflate')
        oRequest.addHeaderEntry(
            'Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
        oRequest.addHeaderEntry('Content-Length', len(pdata))
        oRequest.addHeaderEntry('Referer', 'https://ytoffline.net/fr1/')
        oRequest.addParametersLine(pdata)

        sHtmlContent = oRequest.request()

        sStart = '<div id="mp4" class="display-block tabcontent">'
        sEnd = '<div id="audio" class="tabcontent">'
        sHtmlContent1 = oParser.abParse(sHtmlContent, sStart, sEnd)
        sPattern = '<td>([^<]+)<small>.+?data-href="([^"]+)"'
        aResult = oParser.parse(sHtmlContent1, sPattern)

        if (aResult[0] == True):
            # initialisation des tableaux
            url = []
            qua = []
            # Remplissage des tableaux
            for i in aResult[1]:
                url.append(str(i[1]))
                qua.append(str(i[0]))

            # dialogue qualité
            api_call = dialog().VSselectqual(qua, url)

        if (api_call):
            return True, api_call

        return False, False
Beispiel #6
0
def showSearch():
    oGui = cGui()

    sSearchText = oGui.showKeyBoard()
    if (sSearchText != False):
        oInputParameterHandler = cInputParameterHandler()
        sUrl = oInputParameterHandler.getValue('siteUrl')
        sUrl = sUrl + Quote(sSearchText)
        showMovies(sUrl)
        oGui.setEndOfDirectory()
        return
def showSearch():
    oGui = cGui()

    sSearchText = oGui.showKeyBoard()
    if (sSearchText != False):
        sSearchText = Quote(sSearchText)
        sUrl = URL_SEARCH[
            0] + sSearchText + '&note=0&art=0&AiffchageMode=0&inputTirePar=0&cstart=0'
        showMovies(sUrl)
        oGui.setEndOfDirectory()
        return
Beispiel #8
0
def Hoster_Andrhino(url, referer):
    oRequestHandler = cRequestHandler(url)
    oRequestHandler.addHeaderEntry('User-Agent', UA)
    oRequestHandler.addHeaderEntry('Referer', referer)
    sHtmlContent = oRequestHandler.request()

    sPattern = "atob\('([^']+)"
    aResult = re.findall(sPattern, sHtmlContent)

    if aResult:
        url2 = base64.b64decode(aResult[0])
        return True, url2.strip() + '|User-Agent=' + UA + '&Referer=' + Quote(url)

    # fichier vu mais ne sait plus dans quel cas
    sPattern = "source:\s'(https.+?m3u8)"
    aResult = re.findall(sPattern, sHtmlContent)

    if aResult:
        return True, aResult[0] + '|User-Agent=' + UA + '&Referer=' + Quote(url)

    return False, False
Beispiel #9
0
def Hoster_Laylow(url, referer):
    oRequestHandler = cRequestHandler(url)
    oRequestHandler.addHeaderEntry('User-Agent', UA)
    oRequestHandler.addHeaderEntry('Referer', referer)
    sHtmlContent = oRequestHandler.request()

    sPattern = "source:\s'(https.+?m3u8)"
    aResult = re.findall(sPattern, sHtmlContent)
    if aResult:
        return True, aResult[0] + '|User-Agent=' + UA + '&Referer=' + Quote(url)

    return False, False
Beispiel #10
0
def Hoster_Wigistream(url, referer):
    oRequestHandler = cRequestHandler(url)
    oRequestHandler.addHeaderEntry('User-Agent', UA)
    oRequestHandler.addHeaderEntry('Referer', referer)
    sHtmlContent = oRequestHandler.request()

    sPattern = 'source.+?: "(.+?)"'
    aResult = re.search(sPattern, sHtmlContent).group(1)
    if aResult:
        return True, aResult + '|User-Agent=' + UA + '&Referer=' + Quote(url)

    return False, False
Beispiel #11
0
def showTitle(sMovieTitle, sUrl):

    sExtraTitle = ''
    # si c'est une serie
    if sUrl != 'none':
        sExtraTitle = sUrl.split('|')[1]
        sMovieTitle = sUrl.split('|')[0]

    try:
        # ancien decodage
        sMovieTitle = unicode(
            sMovieTitle,
            'utf-8')  # converti en unicode pour aider aux convertions
        sMovieTitle = unicodedata.normalize('NFD', sMovieTitle).encode(
            'ascii', 'ignore').decode("unicode_escape")  # vire accent et '\'
        sMovieTitle = sMovieTitle.encode(
            "utf-8").lower()  # on repasse en utf-8
    except:
        sMovieTitle = sMovieTitle.lower()

    sMovieTitle = Quote(sMovieTitle)
    sMovieTitle = re.sub('\(.+?\)', ' ',
                         sMovieTitle)  # vire les tags entre parentheses

    # modif venom si le titre comporte un - il doit le chercher
    sMovieTitle = re.sub(
        r'[^a-z -]', ' ',
        sMovieTitle)  # vire les caracteres a la con qui peuvent trainer
    # sMovieTitle = re.sub('( |^)(le|la|les|du|au|a|l)( |$)', ' ', sMovieTitle)  # vire les articles

    # vire les espaces multiples et on laisse les espaces sans modifs car certains codent avec %20 d'autres avec +
    sMovieTitle = re.sub(' +', ' ', sMovieTitle)
    # modif ici
    if sExtraTitle:
        sMovieTitle = sMovieTitle.replace('%C3%A9', 'e').replace('%C3%A0', 'a')
        sMovieTitle = sMovieTitle + sExtraTitle
    else:
        sMovieTitle = sMovieTitle

    return sMovieTitle
Beispiel #12
0
    def __getMediaLinkForGuest2(self):
        api_call = ''

        oParser = cParser()
        pdata = 'url=' + Quote('https://www.youtube.com/embed/' +
                               self.__sUrl) + '&submit=1'

        oRequest = cRequestHandler('https://ytoffline.net/fr/validate/')
        oRequest.setRequestType(1)
        oRequest.addHeaderEntry(
            'User-Agent',
            'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:70.0) Gecko/20100101 Firefox/70.0'
        )
        oRequest.addHeaderEntry(
            'Referer',
            'https://ytoffline.net/fr/download/?url=https://www.youtube.com/embed/'
            + self.__sUrl)
        oRequest.addHeaderEntry(
            'Accept',
            'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8')
        oRequest.addHeaderEntry('Accept-Language',
                                'fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3')

        oRequest.addParametersLine(pdata)

        sHtmlContent = oRequest.request()
        sHtmlContent1 = oParser.abParse(
            sHtmlContent, '<div id="mp4" class="display-block tabcontent">',
            '<div id="audio" class="tabcontent">')
        sPattern = '<td>([^<]+)<small>.+?data-href="([^"]+)"'
        aResult = oParser.parse(sHtmlContent1, sPattern)

        if (aResult[0] == True):
            # initialisation des tableaux
            url = []
            qua = []
            # Remplissage des tableaux
            for i in aResult[1]:
                url.append(str(i[1]))
                qua.append(str(i[0]))

            # dialogue qualité
            api_call = dialog().VSselectqual(qua, url)

        if (api_call):
            return True, api_call

        return False, False
Beispiel #13
0
def getData():
    if addon().getSetting("PlutoTV_sid"):
        deviceID = addon().getSetting("PlutoTV_deviceID")
        clientID = addon().getSetting("PlutoTV_clientID")
        sid = addon().getSetting("PlutoTV_sid")

    else:
        sid = str(uuid.uuid1().hex)
        deviceID = str(uuid.uuid4().hex)
        clientID = Quote(''.join(random.choice(string.ascii_uppercase + string.ascii_lowercase + string.digits + '=+') for _ in range(24)))

        addon().setSetting("PlutoTV_deviceID", deviceID)
        addon().setSetting("PlutoTV_clientID", clientID)
        addon().setSetting("PlutoTV_sid", sid)

    return clientID, deviceID, sid
Beispiel #14
0
def Hoster_Cloudstream(url, referer):
    oRequestHandler = cRequestHandler(url)
    oRequestHandler.addHeaderEntry('User-Agent', UA)
    oRequestHandler.addHeaderEntry('Referer', referer)
    sHtmlContent = oRequestHandler.request()

    sPattern = '(\s*eval\s*\(\s*function(?:.|\s)+?{}\)\))'
    aResult = re.findall(sPattern, sHtmlContent)

    if aResult:
        sstr = aResult[0]
        if not sstr.endswith(';'):
            sstr = sstr + ';'
        sUnpack = cPacker().unpack(sstr)
        sPattern = 'source:"(.+?)"'
        aResult = re.findall(sPattern, sUnpack)
        if aResult:
            return True, aResult[0] + '|User-Agent=' + UA + '&Referer=' + Quote(url)

    return False, False
Beispiel #15
0
def showHosters():
    oGui = cGui()
    oInputParameterHandler = cInputParameterHandler()
    sUrl = oInputParameterHandler.getValue('siteUrl')
    sMovieTitle = oInputParameterHandler.getValue('sMovieTitle')
    sThumb = oInputParameterHandler.getValue('sThumb')

    if 'forum-tv' in sUrl:
        dialog().VSinfo('Décodage en cours', "Patientez", 5)
        s = requests.Session()

        response = s.get(sUrl, headers={'User-Agent': UA})
        sHtmlContent = str(response.content)
        cookie_string = "; ".join(
            [str(x) + "=" + str(y) for x, y in s.cookies.items()])

        oParser = cParser()
        sPattern = '<input type="hidden".+?value="([^"]+)"'
        aResult = oParser.parse(sHtmlContent, sPattern)

        if (aResult[0] == True):
            data = "_method=" + aResult[1][0] + "&_csrfToken=" + aResult[1][
                1] + "&ad_form_data=" + Quote(
                    aResult[1][2]) + "&_Token%5Bfields%5D=" + Quote(
                        aResult[1][3]) + "&_Token%5Bunlocked%5D=" + Quote(
                            aResult[1][4])

            # Obligatoire pour validé les cookies.
            xbmc.sleep(6000)
            oRequestHandler = cRequestHandler(
                'https://forum-tv.org/adslinkme/links/go')
            oRequestHandler.setRequestType(1)
            oRequestHandler.addHeaderEntry('Referer', sUrl)
            oRequestHandler.addHeaderEntry(
                'Accept', 'application/json, text/javascript, */*; q=0.01')
            oRequestHandler.addHeaderEntry('User-Agent', UA)
            oRequestHandler.addHeaderEntry('Content-Length', len(data))
            oRequestHandler.addHeaderEntry(
                'Content-Type',
                "application/x-www-form-urlencoded; charset=UTF-8")
            oRequestHandler.addHeaderEntry('X-Requested-With',
                                           'XMLHttpRequest')
            oRequestHandler.addHeaderEntry('Cookie', cookie_string)
            oRequestHandler.addParametersLine(data)
            sHtmlContent = oRequestHandler.request()

            sPattern = 'url":"([^"]+)"'
            aResult = oParser.parse(sHtmlContent, sPattern)
            if (aResult[0] == True):
                sHosterUrl = aResult[1][0]
                oHoster = cHosterGui().checkHoster(sHosterUrl)
                if (oHoster != False):
                    oHoster.setDisplayName(sMovieTitle)
                    oHoster.setFileName(sMovieTitle)
                    cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumb)
    else:
        sHosterUrl = sUrl
        oHoster = cHosterGui().checkHoster(sHosterUrl)
        if (oHoster != False):
            oHoster.setDisplayName(sMovieTitle)
            oHoster.setFileName(sMovieTitle)
            cHosterGui().showHoster(oGui, oHoster, sHosterUrl, sThumb)

    oGui.setEndOfDirectory()
Beispiel #16
0
def showWeb(infile=None):  # Code qui s'occupe de liens TV du Web
    oGui = cGui()
    oInputParameterHandler = cInputParameterHandler()

    if infile is None:
        sUrl = oInputParameterHandler.getValue('siteUrl')

        playlist = parseM3U(sUrl=sUrl)
    else:
        playlist = parseM3U(infile=infile)

    if oInputParameterHandler.exist('AZ'):
        sAZ = oInputParameterHandler.getValue('AZ')
        string = filter(lambda t: t.title.strip().capitalize().startswith(sAZ),
                        playlist)
        playlist = sorted(string, key=lambda t: t.title.strip().capitalize())
    else:
        playlist = sorted(playlist, key=lambda t: t.title.strip().capitalize())

    if not playlist:
        oOutputParameterHandler = cOutputParameterHandler()
        oOutputParameterHandler.addParameter('siteUrl', 'http://')
        oGui.addText(
            SITE_IDENTIFIER,
            '[COLOR red]Problème de lecture avec la playlist[/COLOR]')

    else:
        total = len(playlist)
        progress_ = progress().VScreate(SITE_NAME)
        for track in playlist:
            progress_.VSupdate(progress_, total)
            if progress_.iscanceled():
                break
            sThumb = track.icon
            if not sThumb:
                sThumb = 'tv.png'

            # les + ne peuvent pas passer
            url2 = track.path.replace('+', 'P_L_U_S')
            if not xbmc.getInfoLabel('system.buildversion')[0:2] >= '19':
                if '[' not in url2 and ']' not in url2 and '.m3u8' not in url2 and 'dailymotion' not in url2:
                    url2 = 'plugin://plugin.video.f4mTester/?url=' + QuotePlus(
                        url2)
                    url2 += '&amp;streamtype=TSDOWNLOADER&name=' + Quote(
                        track.title)

            thumb = '/'.join([sRootArt, sThumb])

            oOutputParameterHandler = cOutputParameterHandler()
            oOutputParameterHandler.addParameter('siteUrl', url2)
            oOutputParameterHandler.addParameter('sMovieTitle', track.title)
            oOutputParameterHandler.addParameter('sThumbnail', thumb)

            oGuiElement = cGuiElement()
            oGuiElement.setSiteName(SITE_IDENTIFIER)
            oGuiElement.setFunction('play__')
            oGuiElement.setTitle(track.title)
            oGuiElement.setFileName(track.title)
            oGuiElement.setIcon('tv.png')
            oGuiElement.setMeta(0)
            oGuiElement.setThumbnail(thumb)
            oGuiElement.setDirectTvFanart()
            oGuiElement.setCat(6)

            oGui.CreateSimpleMenu(oGuiElement, oOutputParameterHandler,
                                  SITE_IDENTIFIER, SITE_IDENTIFIER,
                                  'direct_epg', 'Guide tv Direct')
            oGui.CreateSimpleMenu(oGuiElement, oOutputParameterHandler,
                                  SITE_IDENTIFIER, SITE_IDENTIFIER, 'soir_epg',
                                  'Guide tv Soir')
            oGui.CreateSimpleMenu(oGuiElement, oOutputParameterHandler,
                                  SITE_IDENTIFIER, SITE_IDENTIFIER,
                                  'enregistrement', 'Enregistrement')
            oGui.createContexMenuBookmark(oGuiElement, oOutputParameterHandler)
            oGui.addFolder(oGuiElement, oOutputParameterHandler)

        progress_.VSclose(progress_)

    oGui.setEndOfDirectory()
Beispiel #17
0
def showHoster():
    oGui = cGui()
    oParser = cParser()

    oInputParameterHandler = cInputParameterHandler()
    sUrl = oInputParameterHandler.getValue('siteUrl')
    sTitle = oInputParameterHandler.getValue('sMovieTitle')
    sThumb = oInputParameterHandler.getValue('sThumb')

    oRequestHandler = cRequestHandler(sUrl)
    sHtmlContent = oRequestHandler.request()

    info = cePg().getChannelEpg(sTitle)
    sDesc = info['plot']

    sMovieTitle = info['title']
    if not sMovieTitle:
        sMovieTitle = sTitle

    sMeta = 0
    sCat = info['media_type']
    if sCat:
        if 'Film' in sCat:
            sMeta = 1
        if 'Série' in sCat:
            sMeta = 2
    sYear = info['year']
    coverUrl = info['cover_url']
    if coverUrl:
        sThumb = coverUrl

    # Double Iframe a passer.
    sPattern = '<iframe.+?src="([^"]+)"'
    iframeURL = oParser.parse(sHtmlContent, sPattern)[1][0]

    oRequestHandler = cRequestHandler(iframeURL)
    sHtmlContent = oRequestHandler.request()

    sPattern = '<iframe.+?src="([^"]+)"'
    aResult = oParser.parse(sHtmlContent, sPattern)

    if not aResult[1]:  # Pas de flux
        oGui.setEndOfDirectory()
        return

    iframeURL1 = aResult[1][0]
    sHosterUrl = iframeURL1

    oOutputParameterHandler = cOutputParameterHandler()
    oOutputParameterHandler.addParameter('sMovieTitle', sMovieTitle)
    oOutputParameterHandler.addParameter('sThumbnail', sThumb)
    oOutputParameterHandler.addParameter('sYear', sYear)
    oOutputParameterHandler.addParameter('sDesc', sDesc)

    oGuiElement = cGuiElement()
    oGuiElement.setTitle(sMovieTitle)
    oGuiElement.setDescription(sDesc)
    oGuiElement.setFileName(sMovieTitle)
    oGuiElement.setSiteName(Plugins.Extensions.IPTVPlayer.tsiplayer.addons.
                            resources.sites.freebox.SITE_IDENTIFIER)
    oGuiElement.setFunction('play__')
    oGuiElement.setIcon('tv.png')
    oGuiElement.setMeta(sMeta)
    oGuiElement.setThumbnail(sThumb)
    oGuiElement.setDirectTvFanart()
    oGuiElement.setCat(sMeta)

    # oGui.CreateSimpleMenu(oGuiElement, oOutputParameterHandler, resources.sites.freebox.SITE_IDENTIFIER, SITE_IDENTIFIER, 'direct_epg', 'Guide tv Direct')
    # oGui.CreateSimpleMenu(oGuiElement, oOutputParameterHandler, resources.sites.freebox.SITE_IDENTIFIER, SITE_IDENTIFIER, 'soir_epg', 'Guide tv Soir')
    if addon().getSetting('enregistrement_activer') == 'true':
        oGui.CreateSimpleMenu(
            oGuiElement, oOutputParameterHandler,
            Plugins.Extensions.IPTVPlayer.tsiplayer.addons.resources.sites.
            freebox.SITE_IDENTIFIER, SITE_IDENTIFIER, 'enregistrement',
            'Enregistrement')

    # Menu pour les films
    if sMeta == 1:
        oGui.createContexMenuinfo(oGuiElement, oOutputParameterHandler)
        oGui.createContexMenuba(oGuiElement, oOutputParameterHandler)
        oGui.createContexMenuSimil(oGuiElement, oOutputParameterHandler)
        oGui.createContexMenuWatch(oGuiElement, oOutputParameterHandler)

    if 'dailymotion' in sHosterUrl:
        oOutputParameterHandler.addParameter('sHosterIdentifier',
                                             'dailymotion')
        oOutputParameterHandler.addParameter('sMediaUrl', sHosterUrl)
        oOutputParameterHandler.addParameter('siteUrl', sHosterUrl)
        oOutputParameterHandler.addParameter('sFileName', sMovieTitle)
        oGuiElement.setFunction('play')
        oGuiElement.setSiteName('cHosterGui')
        oGui.addHost(oGuiElement, oOutputParameterHandler)
        cGui.CONTENT = 'movies'
        oGui.setEndOfDirectory()
        return

    oRequestHandler = cRequestHandler(iframeURL1)
    oRequestHandler.addHeaderEntry('User-Agent', UA)
    oRequestHandler.addHeaderEntry('Referer', iframeURL)
    sHtmlContent2 = oRequestHandler.request()

    sPattern2 = 'var\s+cid[^\'"]+[\'"]{1}([0-9]+)'
    aResult = re.findall(sPattern2, sHtmlContent2)

    if aResult:
        str2 = aResult[0]
        datetoken = int(getTimer()) * 1000

        jsonUrl = 'https://telerium.live/streams/' + str2 + '/' + str(
            datetoken) + '.json'
        tokens = getRealTokenJson(jsonUrl, iframeURL1)
        m3url = tokens['url']
        nxturl = 'https://telerium.live' + tokens['tokenurl']

        realtoken = getRealTokenJson(nxturl, iframeURL1)[10][::-1]

        try:
            m3url = m3url.decode("utf-8")
        except:
            pass

        sHosterUrl = 'https:' + m3url + realtoken + '|User-Agent=' + UA
        sHosterUrl += '&Referer=' + Quote(
            iframeURL1) + '&Sec-Fetch-Mode=cors&Origin=https://telerium.tv'

    oOutputParameterHandler.addParameter('siteUrl', sHosterUrl)
    oGui.addFolder(oGuiElement, oOutputParameterHandler)

    cGui.CONTENT = 'movies'
    oGui.setEndOfDirectory()