Ejemplo n.º 1
0
 def getChannels(page):
     x = []
     logger.debug("using tvshowme...")
     if str(page) == '0':
         page = Tvshowme.MAIN_URL
         html = Tvshowme.getContentFromUrl(page, "", Tvshowme.cookie, "")
         table = Decoder.extract('<ul>', '</ul>', html)
         x = Tvshowme.extractElements(table)
     elif page == "search":
         #display keyboard, it will wait for result
         keyboard = XBMCUtils.getKeyboard()
         keyboard.doModal()
         text = ""
         if (keyboard.isConfirmed()):
             text = keyboard.getText()
             page = "http://www.tvshow.me/?s=" + urllib.quote(text)
         html = Tvshowme.getContentFromUrl(url=page)
         logger.debug(html)
         table = Decoder.extract('<div id="content"',
                                 '<h3 class="assistive-text">', html)
         logger.debug("table is: " + table)
         x = Tvshowme.extractLinks2(table)
     else:
         html = Tvshowme.getContentFromUrl(page, "", Tvshowme.cookie,
                                           Tvshowme.MAIN_URL)
         logger.debug(html)
         table = Decoder.extract('<div id="content"', '</article>', html)
         x = Tvshowme.extractLinks(table)
     return x
Ejemplo n.º 2
0
    def getChannels(page):
        x = []
        logger.debug("page: " + page)
        if (str(page) == "0"):
            html = Peliculasbiz.getContentFromUrl(Peliculasbiz.MAIN_URL)
            menuHtml = Decoder.extract('<ul class="clearfix">', '</ul>', html)
            for itemHtml in menuHtml.split("<li>"):
                if "href=" in itemHtml:
                    item = {}
                    item["title"] = Decoder.extract('">', '<', itemHtml)
                    item["link"] = Decoder.extract('href="', '"', itemHtml)
                    x.append(item)
            search = {}
            search["title"] = XBMCUtils.getString(11018)
            search["link"] = ".search"
            x.append(search)

        elif page == '.search':
            #display keyboard, it will wait for result
            keyboard = XBMCUtils.getKeyboard()
            keyboard.doModal()
            text = ""
            if (keyboard.isConfirmed()):
                text = keyboard.getText()
                x = Peliculasbiz.search(text)
        elif str(page).isdigit():
            logger.debug("numeric detected...")
            link = Peliculasbiz.extractProviderFromLink(page)
            element = {}
            element["link"] = link
            x.append(element)
        else:
            x = Peliculasbiz.extractProvidersFromLink(page)

        return x
Ejemplo n.º 3
0
    def getChannels(page='0'):
        x = []
        if str(page) == '0':
            page = Youtube.MAIN_URL + "/"
            html = Youtube.getContentFromUrl(page, "", Youtube.cookie, "")
            logger.debug("html: " + html)
            jsonScript = Decoder.extract('ytInitialGuideData = ', ';', html)
            x = Youtube.extractMainChannelsJSON(jsonScript)
            element = {}
            element["title"] = XBMCUtils.getString(11018)
            element["page"] = 'search'
            x.append(element)
        elif '/channel/' in page or '/trending' in page:
            headers = Youtube.buildHeaders()
            response = Youtube.getContentFromUrl(url=str(page + "?pbj=1"),
                                                 headers=headers,
                                                 launchLocation=True)
            try:
                jsonResponse = json.loads(response)
                logger.debug("parsed json from '" + page + "', continue...")
                logger.debug("json is: " + response)
                try:
                    logger.debug("using way 1...")
                    x = Youtube.extractVideosFromJSON(
                        jsonResponse[1]["response"])
                except:
                    logger.debug("fails way 1, using way 2...")
                    x = Youtube.extractVideosFromSpecialChannelJSON(
                        jsonResponse[1]["response"])
                    pass
            except:
                logger.error("Could not parse response: " + str(response))
                pass
        elif str(page) == 'search':
            keyboard = XBMCUtils.getKeyboard()
            keyboard.doModal()
            text = ""
            if (keyboard.isConfirmed()):
                text = keyboard.getText()
                text = urllib.quote_plus(text)

                headers = Youtube.buildHeaders()
                response = Youtube.getContentFromUrl(
                    url=str(Youtube.SEARCH_URL + text + "?pbj=1"),
                    headers=headers)
                try:
                    jsonResponse = json.loads(response)
                    logger.debug("parsed search json with text: '" + page +
                                 "', continue...")
                    x = Youtube.extractVideosFromSpecialChannelJSON(
                        jsonResponse[1]["response"])
                except:
                    logger.error("Could not parse response: " + str(response))
                logger.debug("finished search logic!")
        else:
            element = Youtube.extractTargetVideoJSON(page)
            x.append(element)
        return x
Ejemplo n.º 4
0
    def getChannels(page):
        x = []
        logger.debug("page: "+page)
        if(str(page)=="0"):
            html = MejorTorrent.getContentFromUrl(url=MejorTorrent.MAIN_URL)
            menuHtml = Decoder.extract("<table width='140' border='0' cellpadding='0' cellspacing='0' style='border-left:1px solid black; border-right:1px solid black; border-bottom:1px solid black;'>",'</table>',html)
            for itemHtml in menuHtml.split("<a"):
                logger.debug("li --> HTML is: "+itemHtml)
                if "href=" in itemHtml:
                    item = {}
                    title = Decoder.extract('">','</a>',itemHtml)
                    title = Decoder.removeHTML(title)
                    if len(title)>0:
                        item["title"] = title
                        link = Decoder.extract("href='", "'", itemHtml)
                        if 'musica' not in link and 'juegos' not in link and 'variados' not in link:
                            if "://" not in link:
                                item["link"] = MejorTorrent.MAIN_URL+link
                            x.append(item)
            search = {}
            search["title"] = XBMCUtils.getString(11018)
            search["link"] = ".search"
            x.append(search)

        elif page=='.search':
            #display keyboard, it will wait for result
            keyboard = XBMCUtils.getKeyboard()
            keyboard.doModal()
            text = ""
            if (keyboard.isConfirmed()):
                text = keyboard.getText()
                x = MejorTorrent.search(text)
        elif '-descargar-' in page:
            logger.debug("-descargar- page detected...")
            x = MejorTorrent.extractProvidersFromLink(page)
        elif 'sec=descargas' in page and '&p=' not in page:
            logger.debug("decoding torrent..."+page)
            html = MejorTorrent.getContentFromUrl(url=page)
            link = MejorTorrent.MAIN_URL+Decoder.extract("Pincha <a href='/","'",html)
            logger.debug("extracted torrent link: "+link)
            element = {}
            element["link"] = link
            element["title"] = page
            element["finalLink"] = True
            x.append(element)
        else:
            x = MejorTorrent.extractContentFromLink(page)

        return x
Ejemplo n.º 5
0
 def getChannels(page):
     x = []
     subpage = RTVE.SUB_PAGE
     currentPage = page
     if str(page) == '0':
         page = "100"
         currentPage = page
         arr = [str(page), str(page)]  #page - subpage
         subpage = subpage % tuple(arr)
         page = RTVE.MAIN_URL + subpage  # final parse
     elif '.search' in str(page):
         keyboard = XBMCUtils.getKeyboard()
         keyboard.doModal()
         text = ""
         if (keyboard.isConfirmed()):
             text = keyboard.getText()
             page = text
             pageInt = page[0:1] + "00"
             arr = [str(pageInt), str(page)]  # page - subpage
             subpage = subpage % tuple(arr)
             currentPage = text
             page = RTVE.MAIN_URL + subpage  # final parse
     else:
         logger.debug("Nothing done for page: " + str(page))
         subpage = page[page.rfind("/") + 1:]
         subpage = subpage[:subpage.rfind("_")]
         logger.debug("Subpage is: " + str(subpage))
         currentPage = subpage
         page = page.replace("/" + subpage + "/", "/" + currentPage + "/")
     element = {}
     element["link"] = RTVE.MAIN_URL + ".search"
     element["title"] = XBMCUtils.getString(10013)
     x.append(element)
     html = RTVE.getContentFromUrl(url=page, referer=RTVE.MAIN_URL)
     element = {}
     element["thumbnail"] = Decoder.extract('<img id="FABTTXImage" src="',
                                            '"', html)
     if "://" not in element["thumbnail"]:
         thumbnailPage = element["thumbnail"][:element["thumbnail"].find("_"
                                                                         )]
         element["thumbnail"] = RTVE.MAIN_URL + (
             thumbnailPage[0:1] + "00") + "/" + element["thumbnail"]
     x.append(element)
     teletextHtml = Decoder.extract('<span class="LB">', '</span>', html)
     x2 = RTVE.extractElements(currentPage, teletextHtml)
     x.extend(x2)
     return x
Ejemplo n.º 6
0
def displayBBCTeletext(url, page, version):
    logger.debug("displaying teletext for BBC1 provider")
    imgPath = 'http://www.ceefax.tv/cgi-bin/gfx.cgi?font=big&channel=bbc' + version + '&page=100_0'  # first
    if '.search' in url:
        keyboard = XBMCUtils.getKeyboard()
        keyboard.doModal()
        text = ""
        if (keyboard.isConfirmed()):
            text = keyboard.getText()
            imgPath = imgPath[:imgPath.rfind('100_')] + text + '_0'
    imgPath = 'http://anonymous-images-proxy.com/proxy.php?url=' + urllib.quote(
        imgPath)
    add_dir('bbc' + version + '.search', 'bbc' + version + '.search', 4,
            'bbc' + version + 'teletext.search', 'teletext',
            'bbc' + version + 'teletext.search')
    # finally show img (before render, xbmc will wait until some event happens)
    displayImg(imgPath)
Ejemplo n.º 7
0
    def getChannels(page):
        x = []
        logger.debug("page: " + page)
        cookie = Elitetorrent.getValidCookie()
        logger.debug("Using new cookie: " + cookie)
        if (str(page) == "0"):
            html = Elitetorrent.getContentFromUrl(url=Elitetorrent.MAIN_URL,
                                                  cookie=cookie)
            menuHtml = Decoder.extract('<div class="wrap">', '</div>', html)
            for itemHtml in menuHtml.split("<a"):
                logger.debug("li --> HTML is: " + itemHtml)
                if "href=" in itemHtml:
                    item = {}
                    item["title"] = Decoder.extract('">', '<', itemHtml)
                    link = Decoder.extract('href="', '"', itemHtml)
                    if "://" not in link:
                        item["link"] = Elitetorrent.MAIN_URL + link
                        x.append(item)
            search = {}
            search["title"] = XBMCUtils.getString(11018)
            search["link"] = ".search"
            x.append(search)

        elif page == '.search':
            #display keyboard, it will wait for result
            keyboard = XBMCUtils.getKeyboard()
            keyboard.doModal()
            text = ""
            if (keyboard.isConfirmed()):
                text = keyboard.getText()
                x = Elitetorrent.search(text, cookie)
        elif '/torrent/' in page:
            logger.debug("torrent page detected...")
            link = Elitetorrent.extractProviderFromLink(page, cookie)
            element = {}
            element["link"] = link
            x.append(element)
        else:
            x = Elitetorrent.extractContentFromLink(page, cookie)

        return x
Ejemplo n.º 8
0
    def getChannels(page="", cookie=""):
        x = []
        ##main has sections: nuevos lanzamientos, episodios estrenos, peliculas mas vistas, series mas listas, peliculas actualizadas, episodios actualizados and "Search"
        if cookie == "":
            cookie = HdfullTv.getNewCookie()

        logger.debug("page: " + page)
        if (page == "0"):
            itemFirst = {}
            itemFirst["title"] = 'Últimos Emitidos'
            itemFirst["permalink"] = 'episodios#latest'
            x.append(itemFirst)
            itemFirst2 = {}
            itemFirst2["title"] = 'Episodios Estreno'
            itemFirst2["permalink"] = 'episodios#premiere'
            x.append(itemFirst2)
            itemFirst3 = {}
            itemFirst3["title"] = 'Episodios Actualizados'
            itemFirst3["permalink"] = 'episodios#updated'
            x.append(itemFirst3)
            itemFirst4 = {}
            itemFirst4["title"] = 'Películas Estreno'
            itemFirst4["permalink"] = 'peliculas-estreno'
            x.append(itemFirst4)
            itemFirst5 = {}
            itemFirst5["title"] = 'Películas Actualizadas'
            itemFirst5["permalink"] = 'peliculas-actualizadas'
            x.append(itemFirst5)
            itemFirst6 = {}
            itemFirst6["title"] = XBMCUtils.getString(11018)
            itemFirst6["permalink"] = "search"
            x.append(itemFirst6)
        elif page == 'https://hdfull.me/episodios#latest':
            html = HdfullTv.getContentFromUrl(
                url="https://hdfull.me/a/episodes",
                data="action=latest&start=0&limit=24&elang=ALL",
                cookie=cookie)
            logger.debug(html)
            x = json.loads(html)
        elif page == 'https://hdfull.me/episodios#premiere':
            html = HdfullTv.getContentFromUrl(
                url="https://hdfull.me/a/episodes",
                data="action=premiere&start=0&limit=24&elang=ALL",
                cookie=cookie)
            logger.debug(html)
            x = json.loads(html)
        elif page == 'https://hdfull.me/episodios#updated':
            html = HdfullTv.getContentFromUrl(
                url="https://hdfull.me/a/episodes",
                data="action=updated&start=0&limit=24&elang=ALL",
                cookie=cookie)
            logger.debug(html)
            x = json.loads(html)
        elif page == 'https://hdfull.me/peliculas-estreno':
            html = HdfullTv.getContentFromUrl(
                "https://hdfull.me/peliculas-estreno")
            logger.debug(html)
            x = HdfullTv.extractItems(html)
        elif page == 'https://hdfull.me/peliculas-actualizadas':
            html = HdfullTv.getContentFromUrl(
                "https://hdfull.me/peliculas-actualizadas")
            logger.debug(html)
            x = HdfullTv.extractItems(html)
        elif page == 'https://hdfull.me/search':
            #display keyboard, it will wait for result
            keyboard = XBMCUtils.getKeyboard()
            keyboard.doModal()
            text = ""
            if (keyboard.isConfirmed()):
                text = keyboard.getText()
                x = HdfullTv.search(text)
        elif page.find("https://hdfull.me/serie/") > -1 and page.find(
                "episodio-") == -1:
            #proccess serie article, could be: 1) obtain seasons 2) obtains chapters from a season #temporada-2/episodio-2
            if page.find("/temporada-") == -1:
                html = HdfullTv.getContentFromUrl(page)
                x = HdfullTv.extractSeasons(html, page)
            else:
                season = page[page.find("temporada-") + len("temporada-"):]
                html = HdfullTv.getContentFromUrl(page)
                sid = Decoder.extract(
                    "var sid = '", "'", html
                )  #fix for hardcoded value '126', it was the internal series id, now works fine
                bruteJson = HdfullTv.getContentFromUrl(
                    url="https://hdfull.me/a/episodes",
                    data={
                        "action": "season",
                        "limit": "0",
                        "season": season,
                        "show": sid,
                        "start": "0"
                    },
                    cookie=cookie).read()
                x = json.loads(bruteJson)
        else:
            x = HdfullTv.extractProvidersFromLink(page, cookie)
        return x
Ejemplo n.º 9
0
    def getChannels(page):
        x = []
        if page == '0':
            keyboard = XBMCUtils.getKeyboard()
            keyboard.doModal()
            text = ""
            if (keyboard.isConfirmed()):
                text = keyboard.getText()
                if len(text)>0:
                    page = TuneIn.SEARCH_PAGE+urllib.quote_plus(text)
                    results = TuneIn.getContentFromUrl(page,ajax=True,referer=TuneIn.MAIN_URL)
                    logger.debug("resultHtml is: "+results)
                    jsonResults = json.loads(results)

                    for resultKind in jsonResults["Items"]:
                        logger.debug("items...")
                        for result in resultKind["Children"]:
                            logger.debug("children...")
                            element = {}
                            img = result["Image"]
                            logger.debug("image is: "+img)
                            guideId = result["GuideId"]
                            url = result["Actions"]["Echo"]["Url"]
                            logger.debug("url is: " + url)
                            id = result["Actions"]["Echo"]["TargetItemId"]#[1:]
                            logger.debug("id is: " + id)
                            #https://api.radiotime.com/profiles/me/activities?serial=11f2610a-b534-41c5-96b4-ccbfd5a6d4c8&partnerId=RadioTime&version=2&formats=mp3%2caac%2cogg%2cflash%2chtml&itemToken=BgQEAAEAAQABAAEACwsAAwQFDAAA
                            serial = url[url.rfind("serial=") + len("serial="):]
                            if "&" in serial:
                                serial = serial[:serial.find("&")]
                            itemToken = url[url.rfind("itemToken=")+len("itemToken="):]
                            if "&" in itemToken:
                                itemToken = itemToken[:itemToken.find("&")]
                            title = result["Title"]
                            link = TuneIn.GUIDE_URL % (id,itemToken,serial)
                            logger.debug("appending result: "+title+", url: "+link)
                            element["title"] = title
                            element["link"] = link
                            element["thumbnail"] = img
                            element["finalLink"] = True
                            x.append(element)

        else:
            logger.debug("extracting stream for: "+page)
            html = TuneIn.getContentFromUrl(url=page)
            logger.debug("decoded html is: "+html)
            #content = json.loads(html)
            element = {}
            while 'https://stream.radiotime.com/listen.stream' in html:
                logger.debug("old html is: " + html)
                html = TuneIn.getContentFromUrl(url=html)
                logger.debug("new html is: " + html)

            if "http://" in html and '"' in html:
                html = html[:html.find('"')]
            elif "http://" in html and "'" in html:
                html = html[:html.find("'")]
            else:
                logger.debug("nothing done")
            logger.debug("new URL is: "+html)
            link = html

            element["link"] = link
            #element["link"] = content["body"][0]["url"]
            #element["title"] = content["body"][0]["element"]
            element["title"] = link
            element["thumbnail"] = ""
            x.append(element)
        return x
Ejemplo n.º 10
0
    def getChannels(page):
        x = []
        logger.debug("page for pepecine: " + page)
        movie = 'movie'
        serie = 'series'
        if (str(page) == "0"):
            element = {}
            element["title"] = "Películas"
            element[
                "link"] = 'https://pepecine.tv/titles/paginate?_token=%s&perPage=50&page=1&order=mc_num_of_votesDesc&type=' + movie + '&minRating=&maxRating=&availToStream=1'
            x.append(element)
            element = {}
            element["title"] = "Series"
            element[
                "link"] = 'https://pepecine.tv/titles/paginate?_token=%s&perPage=50&page=1&order=mc_num_of_votesDesc&type=' + serie + '&minRating=&maxRating=&availToStream=1'
            x.append(element)
            last = {}
            last["title"] = "Últimas películas publicadas"
            last[
                "link"] = "https://pepecine.tv/plugins/estrenos-peliculas-online.php"
            x.append(last)
            last = {}
            last["title"] = "Últimas series actualizadas"
            last[
                "link"] = "https://pepecine.tv/plugins/estrenos-episodios-online.php"
            x.append(last)
            search = {}
            search["title"] = XBMCUtils.getString(11018)
            search["link"] = ".search"
            x.append(search)

        elif page == '.search':
            logger.debug("search page detected...")
            #display keyboard, it will wait for result
            keyboard = XBMCUtils.getKeyboard()
            keyboard.doModal()
            text = ""
            if (keyboard.isConfirmed()):
                text = keyboard.getText()
                x = Pepecine.search(text)
        elif '%s' in page:  #token issue
            logger.debug("list page detected...")
            x = Pepecine.extractProvidersFromLink(page)
        elif page.endswith("=") or "://" not in page:  #title in base64 format
            if "://" not in page:
                page += "="  #base64 could be missed
            title = base64.decodestring(page)
            logger.debug("trying to query by title: " + title)
            searchByTitle = "https://pepecine.tv/titles/paginate?_token=%s&perPage=24&page=1&order=mc_num_of_votesDesc&type=series&minRating=&maxRating=&query=" + urllib.quote_plus(
                title) + "&availToStream=true"
            #x = Pepecine.extractProvidersFromLink(searchByTitle,True)
            x = Pepecine.searchItemByTitle(title)
        elif '/ver-online/' in page:
            #extract links from html
            x = Pepecine.extractLinksFromPage(page)
        elif '/ver-serie/' in page:  #serie
            if '/seasons/' in page:
                if '/episodes/' in page:  #draw links
                    x = Pepecine.extractLinksFromPage(page)
                else:  #draw chapters
                    html = Pepecine.getContentFromUrl(
                        url=page, referer=Pepecine.MAIN_URL)
                    episodesHtml = Decoder.extract(
                        '<ul class="list-unstyled" id="episode-list" data-bind="moreLess, playVideos">',
                        '</ul>', html)
                    i = 0
                    for episodeHtml in episodesHtml.split(
                            '<li class="media bord">'):
                        if i > 0:
                            link = Decoder.extract(
                                '<a class="col-sm-3" href="', '"', episodeHtml)
                            img = Decoder.extract(
                                '<img class="media-object img-responsive" src="',
                                '"', episodeHtml)
                            title = Decoder.extract('"><b>', '</a></h4>',
                                                    episodeHtml)
                            element = {}
                            element["link"] = link
                            element["thumbnail"] = img
                            element["title"] = title.replace("</b>", " - ")
                            x.append(element)
                        i += 1
            else:  #draw seasons
                html = Pepecine.getContentFromUrl(url=page,
                                                  referer=Pepecine.MAIN_URL)
                seasonsHtml = Decoder.extract(
                    '<div class="heading bord" style="margin:0 -15px;">',
                    '<br>', html)
                i = 0
                for seasonHtml in seasonsHtml.split('<a '):
                    if i > 0:
                        link = Decoder.extract('href="', '"', seasonHtml)
                        title = Decoder.extract('class="sezon">', "<",
                                                seasonHtml)
                        element = {}
                        element["title"] = title
                        element["link"] = link
                        x.append(element)
                    i += 1
        elif '/plugins/' in page:  #last films and series
            html = Pepecine.getContentFromUrl(url=page,
                                              referer=Pepecine.MAIN_URL)
            i = 0
            for line in html.split('<td><a'):
                if i > 0:
                    link = Pepecine.MAIN_URL + Decoder.extract(
                        'href=', " ", line)
                    title = Decoder.extract(' alt="', '"', line)
                    img = Decoder.extract('<img src=', ' ', line)
                    element = {}
                    element["title"] = title
                    element["link"] = link
                    element["thumbnail"] = img
                    x.append(element)
                i += 1
        else:
            logger.debug("nothing done for page: " + page)
        return x
Ejemplo n.º 11
0
 def getChannels(page):
     x = []
     logger.debug("using Mobdro...")
     if str(page) == '0':
         element = {}
         element["title"] = "Channels"
         element["link"] = "channels"
         x.append(element)
         element = {}
         element["title"] = "News"
         element["link"] = "news"
         x.append(element)
         element = {}
         element["title"] = "Shows"
         element["link"] = "shows"
         x.append(element)
         element = {}
         element["title"] = "Movies"
         element["link"] = "movies"
         x.append(element)
         element = {}
         element["title"] = "Sports"
         element["link"] = "sports"
         x.append(element)
         element = {}
         element["title"] = "Music"
         element["link"] = "music"
         x.append(element)
         element = {}
         element["title"] = "Gaming"
         element["link"] = "gaming"
         x.append(element)
         element = {}
         element["title"] = "Animals"
         element["link"] = "animals"
         x.append(element)
         element = {}
         element["title"] = "Tech"
         element["link"] = "tech"
         x.append(element)
         element = {}
         element["title"] = "Podcasts"
         element["link"] = "podcasts"
         #x.append(element)
         element = {}
         element["title"] = "Spiritual"
         element["link"] = "spiritual"
         #x.append(element)
         element = {}
         element["title"] = "Others"
         element["link"] = "others"
         x.append(element)
         element = {}
         element["title"] = "Search"
         element["link"] = "search"
         #x.append(element) #TODO
     elif str(page) is not 'search':  #action
         logger.debug("launching action: " + page)
         response = Mobdro.channel_list(page)
         x = Mobdro.parse_results(response)
     elif str(page) == "search":  #search
         logger.debug("launching action: SEARCH")
         # display keyboard, it will wait for result
         keyboard = XBMCUtils.getKeyboard()
         keyboard.doModal()
         text = ""
         if (keyboard.isConfirmed()):
             text = keyboard.getText()
             response = Mobdro.search_list(text)
             x = Mobdro.parse_results(response)
     return x
Ejemplo n.º 12
0
    def getChannels(page):
        x = []
        logger.debug("page: " + page)
        if (str(page) == "0"):
            html = TuMejorTorrent.getContentFromUrl(
                url=TuMejorTorrent.MAIN_URL)
            menuHtml = Decoder.extract('<nav class="nav nav3" ', '</nav>',
                                       html)
            i = 0
            for itemHtml in menuHtml.split("<li>"):
                logger.debug("li --> HTML is: " + itemHtml)
                if i > 1 and "href=" in itemHtml and 'title="' in itemHtml:
                    item = {}
                    title = Decoder.extract('title="', '"', itemHtml)
                    if "Juegos " not in title:
                        #title = Decoder.removeHTML(title)
                        item["title"] = title
                        link = Decoder.extract('href="', '"', itemHtml)
                        if 'page=categorias' not in link:
                            item["link"] = link
                            x.append(item)
                i += 1
            search = {}
            search["title"] = XBMCUtils.getString(11018)
            search["link"] = ".search"
            x.append(search)

        elif page == '.search':
            # display keyboard, it will wait for result
            keyboard = XBMCUtils.getKeyboard()
            keyboard.doModal()
            text = ""
            if (keyboard.isConfirmed()):
                text = keyboard.getText()
                x = TuMejorTorrent.search(text)
        elif '/descargar' in page or '/pelicula/' in page or '/varios/' in page or (
                '/miniseries/' in page
                and page != TuMejorTorrent.MAIN_URL + "miniseries/"):  #decode
            logger.debug("torrent page detected...")
            link = TuMejorTorrent.extractProviderFromLink(page)
            element = {}
            element["link"] = link
            element["title"] = page
            element["finalLink"] = True
            x.append(element)
            logger.debug("DONE!")
        elif (
                "/miniseries/" in page or "/series/" in page
                or '/series-hd/' in page or '/series-vo/' in page
        ) and page != TuMejorTorrent.MAIN_URL + 'series/' and page != TuMejorTorrent.MAIN_URL + 'series-hd/' and page != TuMejorTorrent.MAIN_URL + "series-vo/" and page != TuMejorTorrent.MAIN_URL + "miniseries/":
            html = TuMejorTorrent.getContentFromUrl(
                url=page, referer=TuMejorTorrent.MAIN_URL)
            logger.debug("series html is: " + html)
            if '<ul class="buscar-list">' in html:
                x = TuMejorTorrent.extractItems(html)
            elif 'http://tumejorjuego.com/redirect/index.php?link=descargar-torrent/' in html:
                link = "tumejortorrent.com/download/" + Decoder.extract(
                    'http://tumejorjuego.com/redirect/index.php?link=descargar-torrent/',
                    '/";', html) + ".torrent"
                logger.debug("torrent obtained is: " + link)
                element = {}
                element["link"] = link
                element["finalLink"] = True
                element["title"] = "[T] " + Decoder.extract(
                    '<meta itemprop="description" content="', ' - ', html)
                x.append(element)
        else:
            x = TuMejorTorrent.extractContentFromLink(page)
            logger.debug("finished else part for TuMejorTorrent")
        return x