Beispiel #1
0
def descargas(args):
   
    url = args.get('url_', None)
    html = tools.getUrl(url[0])
    pagedata = BeautifulSoup(html, "html.parser")
    ldesc = pagedata.find_all("article")
    for link in ldesc:
        try:
            ldiv=link.findAll("div")
            href = ldiv[0].find("a").get("href")
            title = str(link.find("h3").text.encode("utf-8", "ignore")).translate(None, '\t\n')
#             title = ""
            thumbnail = ldiv[0].find("img").get("src").encode("utf-8", "ignore")
            action=canalAction+"descargaspage"
            url = tools.build_url({'action':action,'url_':href})
            tools.addItemMenu(label = title,thumbnail= thumbnail, url= url,IsPlayable = 'false', isFolder= True)     
        except Exception as e:
            logger.debug(str(e))      
            
    nextpage = pagedata.find_all("a", class_ = "next page-numbers")
    try:
        href = nextpage[0].get("href")
        title =config.get_localized_string(30012)
        thumbnail = ''
        action=canalAction+"descargas"
        url = tools.build_url({'action':action,'url_':href})
        tools.addItemMenu(label = title,thumbnail= thumbnail, url= url,IsPlayable = 'false', isFolder= True)     
    except Exception as e:
        logger.debug(str(e))      
    logger.info("")
Beispiel #2
0
def menu():
    #     label='Latelete.tv'
    #     thumbnail=''
    #     url=''
    #     tools.addItemMenu(label = label,thumbnail= thumbnail, url= url,IsPlayable = 'false', isFolder= True)
    #     label='Configurar'
    #     thumbnail=''
    #     url=''
    #     tools.addItemMenu(label = label,thumbnail= thumbnail, url= url,IsPlayable = 'false', isFolder= True)
    domain = "http://latelete.tv/"
    html = tools.getUrl(domain)
    # <center>(.*?)</center>
    pattern = '<center>(.*?)</center>'
    canalesTabla = tools.findall(pattern, html, re.DOTALL)[0]
    logger.debug(canalesTabla)
    pattern = '<td>(.*?)</td>'
    canallista = tools.findall(pattern, canalesTabla, re.DOTALL)
    for canal in canallista:
        try:
            pattern = '<a href.*title="(.*?)"><.*></a>'
            label = tools.findall(pattern, canal, re.DOTALL)[0]
            pattern = '<img src="(.*?)" height'
            thumbnail = domain + tools.findall(pattern, canal, re.DOTALL)[0]
            pattern = '<a href="(.*?)" title=".*</a>'
            url_ = tools.findall(pattern, canal, re.DOTALL)[0]
            url = tools.build_url({'action': 'lateletetvAction', 'url_': url_})
            tools.addItemMenu(label=label,
                              thumbnail=thumbnail,
                              url=url,
                              IsPlayable='false',
                              isFolder=True)
        except Exception as e:
            logger.debug(str(e))
Beispiel #3
0
def todo(args):
    logger.info("")
    categoria = args.get('categoria', None)
    estado = args.get('estado', None)
    sql = 'SELECT idKodi, nombre, idExterno, poster, fanart, plot, estado FROM Series;'
    if (categoria is not None):
        sql = 'SELECT s.idKodi, s.nombre, s.idExterno, s.poster, s.fanart, s.plot, s.estado FROM Series s, CategoriaSeries c where s.idKodi=c.idKodi and c.idCategoria=' + categoria[
            0] + ';'
    if (estado is not None):
        sql = 'SELECT s.idKodi, s.nombre, s.idExterno, s.poster, s.fanart, s.plot, s.estado FROM Series s where s.estado="' + estado[
            0] + '";'
    nun_records, records = sqliteDB.execute_sql(sql)
    if nun_records == 0:
        href = ''
        title = config.get_localized_string(30016)
        thumbnail = ''
        action = ''
        url = tools.build_url({'action': action, 'url_': href})
        tools.addItemMenu(label=title,
                          thumbnail=thumbnail,
                          url=url,
                          IsPlayable='false',
                          isFolder=False)
    else:
        for row in records:
            colorB = ""
            colorE = ""
            if (row[6] == "Ended"):
                colorB = "[COLOR springgreen]"
                colorE = "[/COLOR]"
            elif (row[6] == "Canceled"):
                colorB = "[COLOR tomato]"
                colorE = "[/COLOR]"
            tempo, epiodioAct = searchinKodi(str(row[0]))
            if (tempo != -1):
                if (tempo == 0):
                    tempo = 1
                sqlepi = 'SELECT idKodi, temporada, Capitulos FROM Temporadas where idKodi=' + str(
                    row[0]) + ' and temporada=' + str(tempo) + ';'
                nun_recordsepi, recordsepi = sqliteDB.execute_sql(sqlepi)
                if nun_recordsepi != 0 and epiodioAct >= recordsepi[0][2]:
                    href = ''
                    title = colorB + row[1].encode(
                        "utf-8",
                        "ignore") + " (T. " + str(tempo) + ")" + colorE
                    thumbnail = row[3]
                    fanart = row[4]
                    action = ''
                    url = tools.build_url({'action': action, 'url_': href})
                    tools.addItemMenu(label=title,
                                      thumbnail=thumbnail,
                                      url=url,
                                      IsPlayable='false',
                                      isFolder=False,
                                      fanart=fanart)
Beispiel #4
0
def estadomenu():
    sql = "Select distinct(estado) from Series;"
    nun_records, records = sqliteDB.execute_sql(sql)
    for row in records:
        href = ''
        title = (row[0]).encode("utf-8", "ignore")
        thumbnail = ''
        action = canalAction + "todo"
        url = tools.build_url({'action': action, 'estado': str(row[0])})
        tools.addItemMenu(label=title,
                          thumbnail=thumbnail,
                          url=url,
                          IsPlayable='false',
                          isFolder=True)
Beispiel #5
0
def categoriamenu():
    sql = "SELECT idCategoria, descripcion FROM Categorias;"
    nun_records, records = sqliteDB.execute_sql(sql)
    for row in records:
        href = ''
        title = (row[1]).encode("utf-8", "ignore")
        thumbnail = ''
        action = canalAction + "todo"
        url = tools.build_url({'action': action, 'categoria': str(row[0])})
        tools.addItemMenu(label=title,
                          thumbnail=thumbnail,
                          url=url,
                          IsPlayable='false',
                          isFolder=True)
Beispiel #6
0
def mainlistotro(args):
    html = tools.getUrl(host)
    logger.debug(html)
    pagedata = BeautifulSoup(html, "html.parser")
    table = pagedata.find_all("table", class_ = "wdn_responsive_table flush-left")
    tabledata = BeautifulSoup(table[0].__str__(), "html.parser")
    
    links=tabledata.find_all("td")
    for link in links:
        href = link.find("a").get("href")
        title = link.find("a").get("href")
        thumbnail = link.find("img").get("src")
        url = tools.build_url({'action':'eventoshq','url_':href})
        tools.addItemMenu(label = title,thumbnail= thumbnail, url= url,IsPlayable = 'false', isFolder= True)
Beispiel #7
0
def bseriesmenu():
    label = config.get_localized_string(30011)
    thumbnail = ''
    url = tools.build_url({'action': 'BSEnProgreso', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
    label = config.get_localized_string(30005)
    thumbnail = ''
    url = tools.build_url({'action': 'BSCategoria', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
    label = config.get_localized_string(30006)
    thumbnail = ''
    url = tools.build_url({'action': 'BSNoVistos', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
    label = config.get_localized_string(30008)
    thumbnail = ''
    url = tools.build_url({'action': 'BSGeneros', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
Beispiel #8
0
def herramientasMantenimiento():
    logger.info("")
    sqlSelect = "Select idKodi, nombre, idExterno, poster, fanart, plot, estado  from Series"
    nun_recordsS, recordsS = sqliteDB.execute_sql(sqlSelect)
    if (nun_recordsS != 0):
        for row in recordsS:
            href = ''
            title = (row[1]).encode("utf-8", "ignore")
            thumbnail = row[3]
            action = ""
            url = tools.build_url({'action': action, 'url_': href})
            tools.addItemMenu(label=title,
                              thumbnail=thumbnail,
                              url=url,
                              IsPlayable='false',
                              isFolder=False)
Beispiel #9
0
def envivo(args):
    logger.info("")
    url = args.get('url_', None)
    html = tools.getUrl(url[0])
    pagedata = BeautifulSoup(html, "html.parser")
    lcat = pagedata.find_all("td")
    for link in lcat:
        try:
            if "t535230_row_0" in link.get("id"):
                href = link.find("a").get("href")
                title = link.find("a").get("href")
                thumbnail = link.find("img").get("src")
                action=canalAction+"envivov2"
                url = tools.build_url({'action':action,'url_':href})
                tools.addItemMenu(label = title,thumbnail= thumbnail, url= url,IsPlayable = 'false', isFolder= True)     
        except Exception as e:
            logger.debug(str(e))       
    logger.info("")
Beispiel #10
0
def bpeliculasmenu():
    label = config.get_localized_string(30004)
    thumbnail = ''
    url = tools.build_url({'action': 'BPAnadidos', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
    label = config.get_localized_string(30005)
    thumbnail = ''
    url = tools.build_url({'action': 'BPCategoria', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
    label = config.get_localized_string(30006)
    thumbnail = ''
    url = tools.build_url({'action': 'BPNoVistos', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
    label = config.get_localized_string(30007)
    thumbnail = ''
    url = tools.build_url({'action': 'BPSagas', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
    label = config.get_localized_string(30008)
    thumbnail = ''
    url = tools.build_url({'action': 'BPGeneros', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
Beispiel #11
0
def bscategoriamenu():
    label = config.get_localized_string(30008)
    thumbnail = ''
    url = tools.build_url({'action': 'BSGeneros', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
    label = config.get_localized_string(30009)
    thumbnail = ''
    url = tools.build_url({'action': 'BSCTitulo', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
    label = config.get_localized_string(30010)
    thumbnail = ''
    url = tools.build_url({'action': 'BSCAnyo', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
Beispiel #12
0
def herramientasMenu():
    logger.info("")
    href = ''
    title = config.get_localized_string(30018)
    thumbnail = ''
    action = canalAction + "herramientasHardReset"
    url = tools.build_url({'action': action, 'url_': href})
    tools.addItemMenu(label=title,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=False)

    href = ''
    title = config.get_localized_string(30019)
    thumbnail = ''
    action = canalAction + "herramientasMantenimiento"
    url = tools.build_url({'action': action, 'url_': href})
    tools.addItemMenu(label=title,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
Beispiel #13
0
def descargaspage(args):
   
    url = args.get('url_', None)
    html = tools.getUrl(url[0])
#     html = tools.getUrl("http://descargas.eventoshq.me/2018/04/08/descargar-formula-1-gp-bahrein-2018-carrera-espanol/")
    pagedata = BeautifulSoup(html, "html.parser")
    ldesc = pagedata.find_all("iframe")
    for link in ldesc:
        try:
            href = link.get("src")
            patron = 'http.*\/(.*)'
            matches = re.compile(patron, re.DOTALL).findall(href)
            texto=matches[0]
            logger.debug(texto)
            title = config.get_localized_string(30013) +" "+texto
#             title = ""
            thumbnail = ""
            action=canalAction+"descargasplay"
            url = tools.build_url({'action':action,'url_':href})
            tools.addItemMenu(label = title,thumbnail= thumbnail, url= url,IsPlayable = 'true', isFolder= False)     
        except Exception as e:
            logger.debug(str(e))      
            
    logger.info("")
Beispiel #14
0
def getvideo(url_):
    logger.debug(url_)
    domain = url_
    html = tools.getUrl(domain)
    #     logger.debug(html)
    # <center>(.*?)</center>
    #     pattern = '<iframe.*src="(.*?)"></iframe>'
    #     videoframe = tools.findall(pattern, html )[0]
    #     html = tools.getUrl(videoframe)
    #     pattern = '<iframe.*src="(.*?)"></iframe>'
    #     videoframe = tools.findall(pattern, html )[0]
    #     logger.debug(videoframe)
    label = 'prueba'
    thumbnail = ''
    url = 'rtmp://31.220.0.187/privatestream/ playpath=partidos965?keys=WVTsGhsO-0Apepn4-vkzWg&keyt=1448255210'
    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playlist.clear()
    playlist.add(url, xlistitem)
    xbmc_player.play(playlist, xlistitem)
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='true',
                      isFolder=False)
Beispiel #15
0
def principal():
    logger.info("")
    href = ''
    title = config.get_localized_string(30017)
    thumbnail = ''
    action = canalAction + "herramientasMenu"
    url = tools.build_url({'action': action, 'url_': href})
    tools.addItemMenu(label=title,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)

    href = ''
    title = config.get_localized_string(30015)
    thumbnail = ''
    action = canalAction + "todo"
    url = tools.build_url({'action': action, 'url_': href})
    tools.addItemMenu(label=title,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)

    href = ''
    title = config.get_localized_string(30005)
    thumbnail = ''
    action = canalAction + "categoria"
    url = tools.build_url({'action': action, 'url_': href})
    tools.addItemMenu(label=title,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)

    href = ''
    title = config.get_localized_string(30021)
    thumbnail = ''
    action = canalAction + "estado"
    url = tools.build_url({'action': action, 'url_': href})
    tools.addItemMenu(label=title,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)
Beispiel #16
0
def principal():
    logger.info("")
    href = 'http://www.eventoshq.me/historial-repeticiones-formula-1-2018-eventoshq'
    title = "Formula 1 2018"
    thumbnail = 'http://i.imgur.com/OjRMqwz.png?1'
    action=canalAction+"f12018"
    url = tools.build_url({'action':action,'url_':href})
    tools.addItemMenu(label = title,thumbnail= thumbnail, url= url,IsPlayable = 'false', isFolder= True)
    
    title = "*Programación en vivo"
    action=canalAction+"envivo"
    href = 'http://canales.eventoshq.me/casita.html'
    thumbnail = 'http://i.imgur.com/gmSqxSF.png'
    url = tools.build_url({'action':action,'url_':href})
    tools.addItemMenu(label = title,thumbnail= thumbnail, url= url,IsPlayable = 'false', isFolder= True)

    title = "*Repeticiones Online"
    action=canalAction+"repeticiones"
    href = 'http://www.eventoshq.me/repeticiones-eventoshq'
    thumbnail = 'http://i.imgur.com/fvWZVo2.png'
    url = tools.build_url({'action':action,'url_':href})
    tools.addItemMenu(label = title,thumbnail= thumbnail, url= url,IsPlayable = 'false', isFolder= True)

    title = "Descargas en HQ"
    action=canalAction+"descargas"
    href = 'http://descargas.eventoshq.me/category/formula-1/'
    thumbnail = 'http://i.imgur.com/kIQSz3G.png'
    url = tools.build_url({'action':action,'url_':href})
    tools.addItemMenu(label = title,thumbnail= thumbnail, url= url,IsPlayable = 'false', isFolder= True)

    url = tools.build_url({'action':canalAction+"hitorialrepeticiones",'url_':""})
    tools.addItemMenu(label = "*Historial de Repeticiones",thumbnail= "", url= url,IsPlayable = 'false', isFolder= True)

    url = tools.build_url({'action':canalAction+"wwe",'url_':""})
    tools.addItemMenu(label = "*WWE",thumbnail= "", url= url, IsPlayable = 'false', isFolder= True)

    url = tools.build_url({'action':canalAction+"ppvlatino",'url_':""})
    tools.addItemMenu(label = "*Proyecto PPV Latino",thumbnail= "", url= url, IsPlayable = 'false', isFolder= True)
Beispiel #17
0
def mainmenu():
    label = 'Eventos HQ'
    thumbnail = 'http://4.bp.blogspot.com/-VlnuTY3viAg/UWszxZnB96I/AAAAAAAAApQ/VgnL-wD2czc/s320/LOGONUEVO.png'
    url = tools.build_url({'action': 'eventoshq', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)

    label = config.get_localized_string(30014)
    thumbnail = ''
    url = tools.build_url({'action': 'libreria', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)

    label = config.get_localized_string(30001)
    thumbnail = ''
    url = tools.build_url({'action': 'BPeliculas', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)

    label = config.get_localized_string(30002)
    thumbnail = ''
    url = tools.build_url({'action': 'BSeries', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)

    label = 'Latelete.tv'
    thumbnail = ''
    url = tools.build_url({'action': 'lateletetv', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)

    label = config.get_localized_string(30003)
    thumbnail = ''
    url = tools.build_url({'action': 'configurar', 'url_': ''})
    tools.addItemMenu(label=label,
                      thumbnail=thumbnail,
                      url=url,
                      IsPlayable='false',
                      isFolder=True)