def getlinkmu(params):
    loginmu()
    url = params.get("url")

    show = plugintools.get_setting("series_id")  # Obtenemos modo de vista del usuario para series TV
    if show is None:
        show = "tvshows"
    elif show == "1":
        show = "seasons"
    elif show == "2":
        show = "fanart"
    elif show == "3":
        show = "list"
    elif show == "4":
        show = "thumbnail"
    elif show == "5":
        show = "movies"
    elif show == "6":
        show = "tvshows"
    elif show == "7":
        show = "episodes"
    params["page"] = show
    plugintools.log("show= " + show)
    plugintools.modo_vista(show)

    # Iniciamos petición de URL que contiene enlaces al capítulo...
    data = scrapertools.get_header_from_response(url, header_to_get="location")
    plugintools.log("data= " + data)
    data = data.split(" ")
    url = data[0].strip()
    plugintools.log("url final= " + url)
    plugintools.log("url= " + url)
    from resources.tools.resolvers import *

    if url.find("allmyvideos") >= 0:
        plugintools.get_params()
        url = url.replace("http://allmyvideos.net", "http://www.allmyvideos.net").strip()
        params["url"] = url
        allmyvideos(params)
    elif url.find("streamcloud") >= 0:
        plugintools.get_params()
        params["url"] = url
        streamcloud(params)
    elif url.find("nowvideo.sx") >= 0:
        plugintools.get_params()
        url = url.replace("http://nowvideo.sx", "http://www.nowvideo.sx").strip()
        params["url"] = url
        nowvideo(params)
    elif url.find("vidspot") >= 0:
        plugintools.get_params()
        url = url.replace("http://vidspot.net", "http://www.vidpot.net").strip()
        params["url"] = url
        vidspot(params)
    elif url.find("playedto") >= 0:
        plugintools.get_params()
        params["url"] = url
        playedto(params)

    plugintools.log("show= " + show)
    plugintools.modo_vista(show)
def play_url(url):
    plugintools.log("[PalcoTV-0.3.0].play "+url)

    params = plugintools.get_params()
    show = params.get("page")
    if show == "":
        show = "list"
    plugintools.modo_vista(show)
    
    # Notificación de inicio de resolver en caso de enlace RTMP
    url = url.strip()

    if url.startswith("http") == True:
        if url.find("allmyvideos") >= 0 :
            params = plugintools.get_params()
            params["url"]=url
            allmyvideos(params)
        elif url.find("streamcloud") >= 0 :
            params["url"]=url
            params["title"]=title
            params = plugintools.get_params() 
            streamcloud(params)
        elif url.find("vidspot") >= 0 :
            params = plugintools.get_params()
            params["url"]=url
            vidspot(params)
        elif url.find("played.to") >= 0 :
            params = plugintools.get_params()
            params["url"]=url
            playedto(params)
        elif url.find("vk.com") >= 0 :
            params = plugintools.get_params()
            params["url"]=url
            vk(params)
        elif url.find("nowvideo") >= 0 :
            params = plugintools.get_params()
            params["url"]=url
            nowvideo(params)
        elif url.find("tumi") >= 0 :
            params = plugintools.get_params()
            params["url"]=url
            tumi(params)
        elif url.find("streamin.to") >= 0 :
            params = plugintools.get_params()
            params["url"]=url
            streaminto(params)
        elif url.find("veehd") >= 0 :
            params = plugintools.get_params()
            params["url"]=url
            veehd(params)             
        else:
            url = url.strip()
            plugintools.play_resolved_url(url)

    elif url.startswith("rtp") >= 0:  # Control para enlaces de Movistar TV
        plugintools.play_resolved_url(url)
       
    else:
        plugintools.play_resolved_url(url)
Example #3
0
def run():
    params = plugintools.get_params()
    action = params.get('action')
    if action == None:
        get_gerne()
    elif action == 'subcate':
        # xbmcgui.Dialog().ok('action', action)
        get_subcate(params.get('url'))
    elif action == 'section':
        # xbmcgui.Dialog().ok('action', action)
        get_section(params.get('url'), params.get('title'),
                    params.get('thumbnail'), params.get('gtitle'))
    elif action == 'ep':
        get_episode(params.get('url'), params.get('title'),
                    params.get('thumbnail'), params.get('extra'),
                    params.get('gtitle'))
    elif action == 'showsearch':
        get_search()
    elif action == 'searchlist':
        get_searchlist(params.get('url'))

    elif action == 'showlast':
        get_last()
    elif action == 'stream':
        streamtv(params.get('url'), params.get('title'),
                 params.get('thumbnail'), params.get('gtitle'))
Example #4
0
def bers_sy4(filename, title_serie):
    plugintools.log('[%s %s] Guardando multilink en %s...' %
                    (addonName, addonVersion, title_serie))

    params = plugintools.get_params()
    show = params.get(
        "series_id")  # Obtenemos modo de vista del usuario para series TV
    plugintools.modo_vista(show)

    filename_serie = parser_title(title_serie) + '.m3u'

    m3u_cap = open(temp + filename, "r")
    m3u_cap.seek(0)
    data = m3u_cap.read()

    if os.path.exists(filename_serie):
        plugintools.log("Creando archivo... temp/" + filename_serie)
        m3u_serie = open(temp + filename_serie, "a")
        m3u_serie.seek(0)
        m3u_serie.write(
            '#EXTM3U,view:tvshows\n\n')  # Fijamos modo de vista para el BERS
        m3u_serie.write(data + '\n')

    else:
        m3u_serie = open(temp + filename_serie, "a")
        m3u_serie.write(data + '\n')

    m3u_cap.close()
    m3u_serie.close()
Example #5
0
def epg_verluego(params):
    plugintools.log('[%s %s].epg_verluego %s' % (addonName, addonVersion, repr(params)))
    url = params.get("url")
    thumbnail = params.get("thumbnail")
    fanart = params.get("extra")

    filename = 'quever.txt'
    quever = open(temp + filename, "wb")      

    data = plugintools.read(url)
    #plugintools.log("data= "+data)
    plugintools.add_item(action="", title= '[COLOR lightyellow][B]¿Qué ver después?[/B][/COLOR]', thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = False)

    body = plugintools.find_multiple_matches(data, '<td class="prga-i">(.*?)</tr>')
    for entry in body:
        channel = plugintools.find_single_match(entry, 'alt=\"([^"]+)')
        hora_luego = plugintools.find_single_match(entry, 'class="fec1">(.*)</span>')
        hora_luego = hora_luego.split("</span>")
        hora_luego = hora_luego[0]
        print 'hora_luego',hora_luego
        diff_luego = plugintools.find_single_match(entry, 'class="fdiff">([^<]+)').strip()
        evento_luego = plugintools.find_single_match(entry, '<span class="tprg1">(.*?)</span>')
        evento_mastarde = plugintools.find_single_match(entry, '<span class="tprg2">(.*?)</span>')
        hora_mastarde = plugintools.find_single_match(entry, 'class="fec2">(.*)</span>')
        hora_mastarde = hora_mastarde.split("</span>")
        hora_mastarde = hora_mastarde[0]
        title = '[COLOR orange][B]'+channel+' [/B][COLOR lightyellow][B]'+hora_luego+'[/B] '+evento_luego+'[/COLOR][COLOR lightgreen][I] ('+diff_luego+') [/I][/COLOR][COLOR white][B]'+hora_mastarde+' [/COLOR][/B]'+evento_mastarde
        quever.write(title+'\n')
        #plugintools.add_item(action="", title= title, thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = False)

    quever.close()
    params = plugintools.get_params()
    params["url"]=temp+filename
    txt_reader(params)         
Example #6
0
def bers_sy1(plot, title_fixed, title, title_serie, title_bers, page_url, thumbnail, fanart, source_web):
    plugintools.log('[%s %s] Creando archivos BERS... %s' % (addonName, addonVersion, title))

    params = plugintools.get_params()
    show = params.get("series_id")  # Obtenemos modo de vista del usuario para series TV
    plugintools.modo_vista(show)

    plugintools.log("title_fixed= "+title_fixed)
    plugintools.log("title= "+title)
    plugintools.log("title_serie= "+title_serie)

    title_fixed = title_serie + " " + title_fixed
    filename = parser_title(title_fixed)+".m3u"
    plugintools.log("page_url= "+page_url)
    	
    # Vamos a crear los archivos si no existen para cada idioma de audio
    if not os.path.isfile(temp + filename):    
        plugintools.log("Creando archivo... temp/"+filename)
        backup_serie = open(temp + filename, "a")
        backup_serie.seek(0)
        title = parser_title(title_fixed)
        #backup_serie.write('#EXTM3U,view:tvshows\n\n')  # Fijamos modo de vista para la lista de películas
        backup_serie.write('#EXTINF:-1,'+title+',tvg-logo="'+thumbnail+'",'+'plot="'+plot+'"\n')
        backup_serie.write('#multilink\n')
        backup_serie.close()

    bers_sy2(title, title_bers, page_url, thumbnail, fanart, filename)
Example #7
0
def bers_sy4(filename, title_serie):
    plugintools.log('[%s %s] Guardando multilink en %s...' % (addonName, addonVersion, title_serie))

    params = plugintools.get_params()
    show = params.get("series_id")  # Obtenemos modo de vista del usuario para series TV
    plugintools.modo_vista(show)    
	
    filename_serie = parser_title(title_serie)+'.m3u'
        
    m3u_cap = open(temp + filename, "r")
    m3u_cap.seek(0)
    data = m3u_cap.read()
    
    if os.path.exists(filename_serie):
        plugintools.log("Creando archivo... temp/"+filename_serie)
        m3u_serie = open(temp + filename_serie, "a")
        m3u_serie.seek(0)
        m3u_serie.write('#EXTM3U,view:tvshows\n\n')  # Fijamos modo de vista para el BERS
        m3u_serie.write(data+'\n')

    else:
        m3u_serie = open(temp + filename_serie, "a")
        m3u_serie.write(data+'\n')        
        
    m3u_cap.close()
    m3u_serie.close()
Example #8
0
def run():
    plugintools.log("IPTV Client")
    # Get params
    openlist = True
    params = plugintools.get_params()
    if params.get("action") is None:
        main_list(params)
    elif params.get("action") == "play":
        plugintools.play_resolved_url( params.get("url") )
    elif params.get("action") == "updatexmltv":
        print "RUNNING updatexmltv"
        guide_sources      = json.loads(base64.b64decode(params.get("guide_sources")))
        basePath           = base64.b64decode(params.get("basePath"))
        refresh_local      = base64.b64decode(params.get("refresh_local"))
        available_channels = json.loads(base64.b64decode(params.get("available_channels")))
        from resources.libs import custom_xmltv
        data, channels, programmes = custom_xmltv.process_files(sources=guide_sources, base=basePath, refresh_local=refresh_local, channel_filter=available_channels)
        custom_xmltv.write_final_xmltv(channels, programmes, file=epg_file)
    elif params.get("action").split(".")[0] == "category":
        print 'params.get("action").split("category.")[1]'
        cat_dict = params.get("action").split("category.")[1].rstrip().strip()
        print cat_dict
        print base64.urlsafe_b64decode(cat_dict)
        details  = json.loads(base64.urlsafe_b64decode(cat_dict))
        url      = urllib.unquote_plus(details["url"])
        category = details["category"]
        populate(url, use_cache=True, category=category)
    else:
        pass
    if openlist:
        plugintools.close_item_list()
Example #9
0
def xhamster_pag(params):
    plugintools.log('[%s %s] Buscando página... %s' %
                    (addonName, addonVersion, repr(params)))

    total = params.get("extra")
    plugintools.log("Número total de páginas: " + total)
    user_pag = ""
    #user_pag = plugintools.keyboard_input(user_pag)
    user_pag = xbmcgui.Dialog().numeric(
        0, 'Introduzca núm. entre 1 y ' +
        total)  # Solicitamos al usuario número de página a mostrar
    plugintools.log("Página solicitada: " + user_pag)
    if user_pag == "":
        errormsg = plugintools.message(
            "Movie Ultra 7K", "Por favor, introduzca la pagina a buscar")
    else:
        try:
            if int(user_pag) <= int(total):
                url = params.get(
                    "url")  # Cogemos la URL del diccionario params
                num_pag = plugintools.find_single_match(
                    url, '\-([0-9]*).html').strip(
                    )  # Extraemos el número de la página actual
                new_pag = url.replace(num_pag, user_pag).strip(
                )  # Reemplazamos página actual por la que el usuario desea
                params = plugintools.get_params()
                params["url"] = new_pag
                xhamster1(params)
            else:
                errormsg = plugintools.message(
                    "Movie Ultra 7K",
                    "Introduzca un valor inferior o igual a %s " % (total))
        except ValueError:
            errormsg = plugintools.message(
                "Movie Ultra 7K", "Por favor, introduzca un valor numérico")
def lstv2():
    params = plugintools.get_params()

    url = params.get("url")
    data = gethttp_referer_headers(url,url)
    
    match_coverage = plugintools.find_single_match(data, 'International Coverage(.*?)<div id="match-lineups" class="match-info hidden">')
    country_match = plugintools.find_multiple_matches(match_coverage, '<div class="row">(.*?)<div class="b_channel col-xs-12 -low b_trim -international">')
    for entry in country_match:
        plugintools.log("entry= "+entry)
        country = plugintools.find_single_match(entry, '<div class="fll b_channel_name -broadcast -country b_trim_inner">(.*?)</div>').replace("&nbsp;", "").strip()
        if country != "":
            channels = ""
            channel = plugintools.find_multiple_matches(entry, '<div class="fll b_channel_name -broadcast b_trim_inner">(.*?)</div>')
            for item in channel:
                if channels == "":
                    channels = item
                else:
                    channels = channels + ', '+item                    

            lstv_file = open(temp + "lstv.tmp", "a")
            lstv_file.write('[COLOR gold][B]'+country+'[/B][/COLOR][COLOR white]: '+channels+'[/COLOR]\n')


    lstv_file.close()
    params["url"] = temp + 'lstv.tmp'
    txt_reader(params)
Example #11
0
def run():
    plugintools.log("docu.run")
    
    # Get params
    params = plugintools.get_params()
    main_list(params)    
    plugintools.close_item_list()
def run():
    # Main menu
    if sys.argv[2] == "":
        plugintools.log("heritagechannel.run")
        li1 = plugintools.xbmcgui.ListItem("[I]Filter by country[/I]", iconImage=countriesicon, thumbnailImage="")
        li1.setProperty('fanart_image', mainfanart)
        plugintools.xbmcplugin.addDirectoryItem(handle=addon_handle, url=base_url+"?browsebycountry", listitem=li1,isFolder=True)
        li2 = plugintools.xbmcgui.ListItem("[I]Filter by city[/I]", iconImage=citiesicon, thumbnailImage="")
        li2.setProperty('fanart_image', mainfanart)
        plugintools.xbmcplugin.addDirectoryItem(handle=addon_handle, url=base_url+"?browsebycity", listitem=li2,isFolder=True)
        # Get params
        params = plugintools.get_params()
        main_list(params)
        plugintools.close_item_list()
    # Browse By Country menu
    elif sys.argv[2] == "?browsebycountry":
        BrowseByCountry()
    # Browse By City menu
    elif sys.argv[2] == "?browsebycity":
        BrowseByCity()
    # Show menu: institutions in selected country
    elif "countrycode" in sys.argv[2]:
        sl=plugintools.splitOnQuestionmarkAndEquality(sys.argv[2])
        ShowOrganisationsFromCountry(sl[2])
    # Show menu: institutions in selected city
    elif "city" in str(sys.argv[2]):
        sl=plugintools.splitOnQuestionmarkAndEquality(sys.argv[2])
        ShowOrganisationsFromCity(plugintools.urllib.unquote(sl[2]))
Example #13
0
def ertete1(params):
    plugintools.log("[%s %s] ertete1 %s " %
                    (addonName, addonVersion, repr(params)))

    url = params.get("url")
    body = plugintools.read(url)

    iframe = plugintools.find_single_match(
        body, '<iframe width="728" height="420"(.*?)</iframe>')
    iframe_link = plugintools.find_single_match(iframe, 'src="([^"]+)')
    iframe_link = 'http://ertete.com' + iframe_link
    ref = iframe_link
    plugintools.log("iframe_link= " + iframe_link)

    bodi = plugintools.read(iframe_link)
    plugintools.log("bodi= " + bodi)
    bloque_rtmp = plugintools.find_single_match(
        bodi, "<script type='text/javascript'(.*?)<div")
    if bloque_rtmp != "":
        plugintools.log("bloque_rtmp= " + bloque_rtmp)
        swf = plugintools.find_single_match(bloque_rtmp, "src='([^']+)")
        plugintools.log("swf= " + swf)
        width = plugintools.find_single_match(bloque_rtmp, "width=([^,]+)")
        plugintools.log("width= " + width)
        height = plugintools.find_single_match(bloque_rtmp, "height=([^,]+)")
        plugintools.log("height= " + height)
        channel = plugintools.find_single_match(bloque_rtmp,
                                                "channel='([^']+)")
        plugintools.log("channel= " + channel)
    else:
        bloque_rtmp = plugintools.find_single_match(
            bodi, '<script type="text/javascript"(.*?)<div')
        plugintools.log("bloque_rtmp= " + bloque_rtmp)
        swf = plugintools.find_single_match(bloque_rtmp, 'src="([^"]+)')
        plugintools.log("swf= " + swf)
        width = plugintools.find_single_match(bloque_rtmp, "width=([^&]+)")
        plugintools.log("width= " + width)
        height = plugintools.find_single_match(bloque_rtmp, "height=([^&]+)")
        plugintools.log("height= " + height)
        channel = plugintools.find_single_match(bloque_rtmp,
                                                "embed/(.*?)&width")
        plugintools.log("channel= " + channel)

    if swf.find("broadcastlive") >= 0:
        pageurl = 'http://1broadcastlive.com/embed/embed.php?channel=' + channel + '&w=' + width + '&h=' + height
        params = plugintools.get_params()
        params[
            "url"] = 'swfUrl=' + swf + ' pageUrl=' + pageurl + ' referer=' + ref
        broadcastlive1(params)
    elif swf.find("iguide") >= 0:  # Crear regex de iguide!!
        # http://www.iguide.to/embedplayer_new.php?width=728&height=420&channel=31086&autoplay=true
        pageurl = 'http://www.iguide.to/embedplayer_new.php?width=' + width + '&height=' + height + '&channel=' + channel + '&autoplay=true'
        body = gethttp_referer_headers(pageurl, ref)
        plugintools.log("body= " + body)
        playpath = plugintools.find_single_match(body, "'file': '(.*?).flv")
        plugintools.log("playpath= " + playpath)
        token = '#ed%h0#w18623jsda6523lDGD'
        url = 'rtmp://safe.iguide.to/iguide playpath=' + playpath + ' swfUrl=http://cdn.iguide.to/player/secure_player_iguide_embed_token.swf pageUrl=' + pageurl + ' token=' + token
        print url
        plugintools.play_resolved_url(url)
Example #14
0
def run():
    plugintools.log("START PLUGIN")
    params = plugintools.get_params()
    action = params.get("action")

    # create the main menu
    if action is None:
        for name, icon in folderlist:
            plugintools.add_item(
                action='main',
                title=name,
                url="",
                thumbnail=icon,
                folder=True,
                fanart=
                'http://rockaxis.com.co/sites/default/files/node/articulos/imagen/120363.jpg'
            )

        #plugintools.close_item_list()
    elif action == 'main':
        title = params.get('title')
        buildChannel(title)

    else:
        exec action + "(params)"
        plugintools.close_item_list()

        #exec action+"(params)"

    plugintools.close_item_list()
Example #15
0
def lstv2():
    params = plugintools.get_params()

    url = params.get("url")
    data = gethttp_referer_headers(url,url)
    
    match_coverage = plugintools.find_single_match(data, 'International Coverage(.*?)<div id="match-lineups" class="match-info hidden">')
    country_match = plugintools.find_multiple_matches(match_coverage, '<div class="row">(.*?)<div class="b_channel col-xs-12 -low b_trim -international">')
    for entry in country_match:
        plugintools.log("entry= "+entry)
        country = plugintools.find_single_match(entry, '<div class="fll b_channel_name -broadcast -country b_trim_inner">(.*?)</div>').replace("&nbsp;", "").strip()
        if country != "":
            channels = ""
            channel = plugintools.find_multiple_matches(entry, '<div class="fll b_channel_name -broadcast b_trim_inner">(.*?)</div>')
            for item in channel:
                if channels == "":
                    channels = item
                else:
                    channels = channels + ', '+item                    

            lstv_file = open(temp + "lstv.tmp", "a")
            lstv_file.write('[COLOR gold][B]'+country+'[/B][/COLOR][COLOR white]: '+channels+'[/COLOR]\n')


    lstv_file.close()
    params["url"] = temp + 'lstv.tmp'
    txt_reader(params)
Example #16
0
def run():
    plugintools.log("tv2go.run")
    
    # Get params
    params = plugintools.get_params()
    plugintools.log("tv2go.run params="+repr(params))
    action = params.get('action')

    if action == None:
        home()
    elif action == 'search':
        searchtext=""
        keyboard = xbmc.Keyboard(searchtext,u"הכנס את שם השיר או הזמר")
        keyboard.doModal()
        if (keyboard.isConfirmed()):
            search(keyboard.getText())
    elif action == 'page':
        show_page(params.get('url'),int(params.get('page')))
    elif action=='stream':
        path = getLink(params.get('url'))
        print path
        title = urllib.unquote_plus(params.get('title'))
        thumbnail = params.get('thumbnail')
        li = xbmcgui.ListItem(label=title, iconImage=thumbnail, thumbnailImage=thumbnail,path=path)
        li.setInfo(type='Video', infoLabels={ "Title": str(title) })
        xbmc.Player().play(path,li)
Example #17
0
def login_pordede():
    plugintools.log('[%s %s] ---> Iniciando login en Pordede.com... <--- ' % (addonName, addonVersion))

    params = plugintools.get_params()    
    url = "http://www.pordede.com/site/login"
    post = "LoginForm[username]="+plugintools.get_setting("pordede_user")+"&LoginForm[password]="+plugintools.get_setting("pordede_pwd")
    headers = DEFAULT_HEADERS[:]
    regex = params.get("extra")
    try:
        if os.path.exists(temp+'pordede.com') is True:
            print "Eliminando carpeta caché..."
            os.remove(temp+'pordede.com')
    except: pass

    data = scrapertools.cache_page(url,headers=headers,post=post);print data    
    if data != "":
        login_info = plugintools.find_single_match(data, '<div class="friendMini shadow"(.*?)</div>')
        user_title = plugintools.find_single_match(login_info, 'title="([^"]+)')
        user_thumb = plugintools.find_single_match(login_info, 'src="([^"]+)')
        if regex == "":
            plugintools.log("regex= "+regex)
            plugintools.add_item(action="menuseries", title='Usuario: [COLOR lightyellow][I]'+user_title+'[/I][/COLOR]', url="", thumbnail=user_thumb, fanart=fanart, folder=True, isPlayable=False)
            plugintools.add_item(action="menuseries", title="Series", url="", thumbnail=thumbnail, fanart=fanart, folder=True, isPlayable=False)
            plugintools.add_item(action="menupeliculas", title="Películas", url="", thumbnail=thumbnail, fanart=fanart, folder=True, isPlayable=False)
            plugintools.add_item(action="listas_sigues", title="Listas que sigues", url="http://www.pordede.com/lists/following", thumbnail=thumbnail, fanart=fanart, folder=True, isPlayable=False)
            plugintools.add_item(action="tus_listas", title="Tus listas", url="http://www.pordede.com/lists/yours", thumbnail=thumbnail, fanart=fanart, folder=True, isPlayable=False)
            plugintools.add_item(action="listas_sigues", title="Top listas", url="http://www.pordede.com/lists", thumbnail=thumbnail, fanart=fanart, folder=True, isPlayable=False)
Example #18
0
def bers_sy1(plot, title_fixed, title, title_serie, title_bers, page_url,
             thumbnail, fanart, source_web):
    plugintools.log('[%s %s] Creando archivos BERS... %s' %
                    (addonName, addonVersion, title))

    params = plugintools.get_params()
    show = params.get(
        "series_id")  # Obtenemos modo de vista del usuario para series TV
    plugintools.modo_vista(show)

    plugintools.log("title_fixed= " + title_fixed)
    plugintools.log("title= " + title)
    plugintools.log("title_serie= " + title_serie)

    title_fixed = title_serie + " " + title_fixed
    filename = parser_title(title_fixed) + ".m3u"
    plugintools.log("page_url= " + page_url)

    # Vamos a crear los archivos si no existen para cada idioma de audio
    if not os.path.isfile(temp + filename):
        plugintools.log("Creando archivo... temp/" + filename)
        backup_serie = open(temp + filename, "a")
        backup_serie.seek(0)
        title = parser_title(title_fixed)
        #backup_serie.write('#EXTM3U,view:tvshows\n\n')  # Fijamos modo de vista para la lista de películas
        backup_serie.write('#EXTINF:-1,' + title + ',tvg-logo="' + thumbnail +
                           '",' + 'plot="' + plot + '"\n')
        backup_serie.write('#multilink\n')
        backup_serie.close()

    bers_sy2(title, title_bers, page_url, thumbnail, fanart, filename)
Example #19
0
def run():
    global pnimi
    global televisioonilink
    global andmelink
    global uuenduslink
    global lehekylg1
    global LOAD_LIVE
    global uuendused
    global vanemalukk
    global version
    version = int("3")
    kasutajanimi=plugintools.get_setting(get_live("a2FzdXRhamFuaW1p"))
    salasona=plugintools.get_setting(vod_channels("c2FsYXNvbmE="))
    lehekylg1=plugintools.get_setting(vod_channels("bGVoZWt5bGcx"))
    pordinumber=plugintools.get_setting(get_live("cG9yZGludW1iZXI="))
    uuendused=plugintools.get_setting(sync_data("dXVlbmR1c2Vk"))
    vanemalukk=plugintools.get_setting(sync_data("dmFuZW1hbHVraw=="))
    pnimi = get_live("RGV4dGVyUHJvIA==")
    LOAD_LIVE = os.path.join( plugintools.get_runtime_path() , get_live("cmVzb3VyY2Vz") , vod_channels("YXJ0") )
    televisioonilink = get_live("JXM6JXMvZW5pZ21hMi5waHA/dXNlcm5hbWU9JXMmcGFzc3dvcmQ9JXMmdHlwZT1nZXRfbGl2ZV9jYXRlZ29yaWVz")%(lehekylg1,pordinumber,kasutajanimi,salasona)
    andmelink = vod_channels("JXM6JXMvcGFuZWxfYXBpLnBocD91c2VybmFtZT0lcyZwYXNzd29yZD0lcw==")%(lehekylg1,pordinumber,kasutajanimi,salasona)
    uuenduslink = ("http://158.69.54.54/plugin.video.dex.zip")
    if get_live("RGV4dGVyUHJv") not in open(addonDir+"/"+sync_data("YWRkb24ueG1s")).read():
       check_user(params)
    params = plugintools.get_params()
    
    if params.get("action") is None:
        peamenyy(params)
    else:
        action = params.get("action")
        exec action+"(params)"

    plugintools.close_item_list()
Example #20
0
def epg_verahora(params):
    plugintools.log('[%s %s].epg_verahora %s' %
                    (addonName, addonVersion, repr(params)))
    url = params.get("url")
    thumbnail = params.get("thumbnail")
    fanart = params.get("extra")

    filename = 'quever.txt'
    quever = open(temp + filename, "wb")

    data = plugintools.read(url)
    #plugintools.log("data= "+data)
    plugintools.add_item(action="",
                         title='[COLOR white][B]Mi Guia TV Ahora[/B][/COLOR]',
                         thumbnail=thumbnail,
                         fanart=fanart,
                         folder=False,
                         isPlayable=False)

    body = plugintools.find_multiple_matches(data,
                                             '<td class="prga-i">(.*?)</tr>')
    for entry in body:
        channel = plugintools.find_single_match(entry, 'alt=\"([^"]+)')
        print 'channel', channel
        ahora = plugintools.find_single_match(entry, '<p>(.*?)</p>')
        print 'ahora', ahora
        hora_luego = plugintools.find_single_match(entry,
                                                   'class="fec1">(.*)</span>')
        hora_luego = hora_luego.split("</span>")
        hora_luego = hora_luego[0]
        print 'hora_luego', hora_luego
        diff_luego = plugintools.find_single_match(
            entry, 'class="fdiff">([^<]+)').strip()
        print 'diff_luego', diff_luego
        evento_luego = plugintools.find_single_match(
            entry, '<span class="tprg1">(.*?)</span>')
        print 'evento_luego', evento_luego
        evento_mastarde = plugintools.find_single_match(
            entry, '<span class="tprg2">(.*?)</span>')
        print 'evento_mastarde', evento_mastarde
        hora_mastarde = plugintools.find_single_match(
            entry, 'class="fec2">(.*)</span>')
        hora_mastarde = hora_mastarde.split("</span>")
        hora_mastarde = hora_mastarde[0]
        #title = '[COLOR orange][B]'+channel+' [/B][COLOR lightyellow]'+ahora+'[/COLOR] [COLOR lightgreen][I]('+diff_luego+') [/I][/COLOR][COLOR white][B]'+hora_luego+' [/COLOR][/B] '+evento_luego
        quever.write('[COLOR blue][B]' + channel + ' [/B][/COLOR]\n')
        quever.write('   [COLOR red][B]Ahora: [COLOR white]' + ahora +
                     '[/B][/COLOR]\n')
        quever.write('   [COLOR red][B]' + hora_luego + ' [COLOR white]' +
                     evento_luego + ' [/COLOR][COLOR green](' + diff_luego +
                     ') [/B][/COLOR]\n')
        quever.write('   [COLOR red][B]' + hora_mastarde + ' [COLOR white]' +
                     evento_mastarde + '[/B][/COLOR]\n\n')
        #plugintools.add_item(action="", title= title, thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = False)

    quever.close()
    params = plugintools.get_params()
    params["url"] = temp + filename
    txt_reader(params)
def run():
    plugintools.log("pt.docs.hd.run")
    params = plugintools.get_params()
    if params.get("action") is None: main_list(params)
    else:
        action = params.get("action")
        exec action + "(params)"
    plugintools.close_item_list()
Example #22
0
def run():  # Entry point
    plugintools.log("freshstart.run")
    params = plugintools.get_params()  # Get params
    if params.get("action") is None: main_list(params)
    else:
        action = params.get("action")
        exec action + "(params)"
    plugintools.close_item_list()
Example #23
0
def run():
    plugintools.log("jami.run")
    params = plugintools.get_params()
    if params.get("action") is None: main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    plugintools.close_item_list()
Example #24
0
def gasdrop():
    plugintools.log("XvBMC.VoOdOo")
    params = plugintools.get_params()
    if params.get("action") is None:
        hoofdlijst(params)
    else:
        action = params.get("action")
    plugintools.close_item_list()
Example #25
0
def run():
    plugintools.log("ytMMA.run")
    params = plugintools.get_params()
    if params.get("action") is None:
        main_list(params)
    else:
        pass

    plugintools.close_item_list()
Example #26
0
def run():
    plugintools.log("empirefiles.run")
    # Get params
    params = plugintools.get_params()
    if params.get("action") is None:
        main_list(params)
    else:
        pass
    plugintools.close_item_list()
Example #27
0
def run():
    plugintools.log("wachtv.run")
    params = plugintools.get_params()
    if params.get("action") is None:
        xtv(params)
    else:
        action = params.get("action")
        exec action + "(params)"
    plugintools.close_item_list()
Example #28
0
def lstv3():
    params=plugintools.get_params()
    title = params.get("title").replace("[COLOR white]", "[COLOR lightgreen]")
    team_a = title.split(" vs ")[0]
    team_b = title.split(" vs ")[1]
    url = 'http://m.livesoccertv.com/match/1709586/olympiakos-piraeus-vs-bayern-m-nchen/'
    data = gethttp_referer_headers(url,url)

    lstv_file = open(temp + "lstv_stats.tmp", "wb")
    lstv_file.write("\n[COLOR red]"+title+"[/COLOR]\n")    
    lstv_file.write("\n[COLOR gold]TITULARES[/COLOR]\n")
            
    stats = plugintools.find_single_match(data, '<span>Stats</span>(.*?)Substitutes</h3>')
    players_a = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -right">(.*?)</div>')
    players_b = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -left">(.*?)</div>')
    i = 0
    while i < len(players_a):
        players_a[i]=players_a[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        players_b[i]=players_b[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        spaces = 80 - len(players_b[i])
        plugintools.log("longitud_texto= "+str(len(players_a[i])))
        plugintools.log("espacios que faltan= "+str(spaces))
        tabulador = ""
        j = spaces
        k = 0 
        while k <= j:
            tabulador = tabulador + "..."
            k = k + 1
        line_player = players_b[i]+tabulador+players_a[i]+'\n'
        lstv_file.write(line_player)
        print line_player
        i = i + 1

    lstv_file.write("\n\n[COLOR gold]SUPLENTES[/COLOR]\n")
    stats = plugintools.find_single_match(data, 'Substitutes</h3>(.*?)<div id="match-stats"')
    players_a = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -right">(.*?)</div>')
    players_b = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -left">(.*?)</div>')
    i = 0
    while i < len(players_a):
        players_a[i]=players_a[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        players_b[i]=players_b[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        spaces = 80 - len(players_b[i])
        tabulador = ""
        j = spaces
        k = 0 
        while k <= j:
            tabulador = tabulador + "..."
            k = k + 1
        line_player = players_b[i]+tabulador+players_a[i]+'\n'
        lstv_file.write(line_player)
        print line_player
        i = i + 1
    
    lstv_file.close()
    params["url"] = temp + 'lstv_stats.tmp'
    txt_reader(params)    
def lstv3():
    params=plugintools.get_params()
    title = params.get("title").replace("[COLOR white]", "[COLOR lightgreen]")
    team_a = title.split(" vs ")[0]
    team_b = title.split(" vs ")[1]
    url = 'http://m.livesoccertv.com/match/1709586/olympiakos-piraeus-vs-bayern-m-nchen/'
    data = gethttp_referer_headers(url,url)

    lstv_file = open(temp + "lstv_stats.tmp", "wb")
    lstv_file.write("\n[COLOR red]"+title+"[/COLOR]\n")    
    lstv_file.write("\n[COLOR gold]TITULARES[/COLOR]\n")
            
    stats = plugintools.find_single_match(data, '<span>Stats</span>(.*?)Substitutes</h3>')
    players_a = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -right">(.*?)</div>')
    players_b = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -left">(.*?)</div>')
    i = 0
    while i < len(players_a):
        players_a[i]=players_a[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        players_b[i]=players_b[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        spaces = 80 - len(players_b[i])
        plugintools.log("longitud_texto= "+str(len(players_a[i])))
        plugintools.log("espacios que faltan= "+str(spaces))
        tabulador = ""
        j = spaces
        k = 0 
        while k <= j:
            tabulador = tabulador + "..."
            k = k + 1
        line_player = players_b[i]+tabulador+players_a[i]+'\n'
        lstv_file.write(line_player)
        print line_player
        i = i + 1

    lstv_file.write("\n\n[COLOR gold]SUPLENTES[/COLOR]\n")
    stats = plugintools.find_single_match(data, 'Substitutes</h3>(.*?)<div id="match-stats"')
    players_a = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -right">(.*?)</div>')
    players_b = plugintools.find_multiple_matches(stats, '<div class="fll b_lineup_players b_trim_inner -left">(.*?)</div>')
    i = 0
    while i < len(players_a):
        players_a[i]=players_a[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        players_b[i]=players_b[i].replace("</span>", "[/COLOR] ").replace('<span class="b_lineup_number">', '[COLOR lightyellow]').rstrip()
        spaces = 80 - len(players_b[i])
        tabulador = ""
        j = spaces
        k = 0 
        while k <= j:
            tabulador = tabulador + "..."
            k = k + 1
        line_player = players_b[i]+tabulador+players_a[i]+'\n'
        lstv_file.write(line_player)
        print line_player
        i = i + 1
    
    lstv_file.close()
    params["url"] = temp + 'lstv_stats.tmp'
    txt_reader(params)    
Example #30
0
def run():
    plugintools.log("davidpakmanshow.run")
    # Get params
    params = plugintools.get_params()

    if params.get("action") is None:
        main_list(params)
    else:
        pass
    plugintools.close_item_list()
def run():
    plugintools.log("heritagechannel.run")
    # Get params
    params = plugintools.get_params()
    # if params.get("action") is None:
    main_list(params)
    # else:
    #    action = params.get("action")
    #    exec action + "(params)"
    plugintools.close_item_list()
Example #32
0
def getlinkmu(params):
    plugintools.log(
        "GetlinkMu " + repr(params)
    )  # pendiente de crear función getotherlinkmu para servidores no conocidos (hay que extraer url)

    loginmu()
    url = params.get("url")

    # Iniciamos petición de URL que contiene enlaces al capítulo...
    data = scrapertools.get_header_from_response(url, header_to_get="location")
    plugintools.log("data= " + data)
    data = data.split(" ")
    url = data[0].strip()
    plugintools.log("url final= " + url)
    plugintools.log("url= " + url)
    from resources.tools.resolvers import *
    if url.find("allmyvideos") >= 0:
        plugintools.get_params()
        url = url.replace("http://allmyvideos.net",
                          "http://www.allmyvideos.net").strip()
        params["url"] = url
        allmyvideos(params)
    elif url.find("streamcloud") >= 0:
        plugintools.get_params()
        params["url"] = url
        streamcloud(params)
    elif url.find("nowvideo.sx") >= 0:
        plugintools.get_params()
        url = url.replace("http://nowvideo.sx",
                          "http://www.nowvideo.sx").strip()
        params["url"] = url
        nowvideo(params)
    elif url.find("vidspot") >= 0:
        plugintools.get_params()
        url = url.replace("http://vidspot.net",
                          "http://www.vidpot.net").strip()
        params["url"] = url
        vidspot(params)
    elif url.find("playedto") >= 0:
        plugintools.get_params()
        params["url"] = url
        playedto(params)
Example #33
0
def run():
# Get params
	params = plugintools.get_params()

	if params.get("action") is None:
		main_list(params)
	else:
		action = params.get("action")
		exec action+"(params)"

	plugintools.close_item_list()
Example #34
0
def run():
    plugintools.log("docu.run")
    # Get params
    params = plugintools.get_params()

    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")

    plugintools.close_item_list()
Example #35
0
def run():
    params = plugintools.get_params()
    action = params.get('action')
    if action == None:
        get_shows()
    elif action == 'showlist':
        get_shows(params.get('page'))
    elif action == 'showepisodes':
        get_episodes(params.get('url'),params.get('page'))
    elif action == 'stream':
        stream(urllib.unquote_plus(params.get('url')),urllib.unquote_plus(params.get('title')),urllib.unquote_plus(params.get('thumbnail')))
Example #36
0
def categorias_flv(data, show):
    plugintools.log("[Arena+ 0.3.4] SeriesFLV Categorias ")

    plugintools.modo_vista(show)
    plugintools.log("show= " + show)

    params = plugintools.get_params()
    thumbnail = params.get("thumbnail")
    if thumbnail == "":
        thumbnail = 'http://m1.paperblog.com/i/249/2490697/seriesflv-mejor-alternativa-series-yonkis-L-2whffw.jpeg'
    fanart = 'http://www.nikopik.com/wp-content/uploads/2011/10/S%C3%A9ries-TV.jpg'

    sinopsis = params.get("plot")
    datamovie = {}
    datamovie["Plot"] = sinopsis

    sections = plugintools.find_single_match(
        data, '<div class="lang over font2 bold">(.*?)</div>')
    plugintools.log("sections= " + sections)
    tipo_selected = plugintools.find_single_match(sections,
                                                  'class="select">(.*?)</a>')
    plugintools.add_item(action="listado_seriesflv",
                         title='[COLOR orange]Listado completo[/COLOR]',
                         url="http://www.seriesflv.net/series/",
                         extra=data,
                         info_labels=datamovie,
                         page=show,
                         thumbnail=thumbnail,
                         fanart=fanart,
                         folder=True,
                         isPlayable=False)
    plugintools.add_item(action="lista_chapters",
                         title='[COLOR orange]' + tipo_selected + '[/COLOR]',
                         url="",
                         extra=data,
                         info_labels=datamovie,
                         page=show,
                         thumbnail=thumbnail,
                         fanart=fanart,
                         folder=True,
                         isPlayable=False)
    tipos = plugintools.find_multiple_matches(sections, ';">(.*?)</a>')
    for entry in tipos:
        plugintools.add_item(action="lista_chapters",
                             title='[COLOR orange]' + entry + '[/COLOR]',
                             url="",
                             thumbnail=thumbnail,
                             extra=data,
                             plot=datamovie["Plot"],
                             info_labels=datamovie,
                             page=show,
                             fanart=fanart,
                             folder=True,
                             isPlayable=False)
Example #37
0
def run():
	plugintools.log("tvculturadigital.run")
	
	params = plugintools.get_params()
	
	if params.get("action") is None: main_list(params)
	else:
			action = params.get("action")
			exec action+"(params)"
			
	plugintools.close_item_list()
def futbolentv0(params):    
    filename = 'futboltv.txt'
    futboltv = open(temp + filename, "wb")
    
    futbolenlatv(params, futboltv)
    futboltv.write('\n\n')
    futbolenlatv_manana(params)
    futbolenlatv(params, futboltv)
    futboltv.close()
    params = plugintools.get_params()
    params["url"]=temp+'futboltv.txt'
    txt_reader(params)    
Example #39
0
def run():
    plugintools.log("momentofclarity.run")

    # Get params
    params = plugintools.get_params()

    if params.get("action") is None:
        main_list(params)
    else:
        pass

    plugintools.close_item_list()
Example #40
0
def run():
    plugintools.log("vldl.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        pass
    
    plugintools.close_item_list()
Example #41
0
def run():
    plugintools.log("thomhartmannprogram.run")

    # Get params
    params = plugintools.get_params()

    if params.get("action") is None:
        main_list(params)
    else:
        pass

    plugintools.close_item_list()
Example #42
0
def run():
    plugintools.log("OFFICIALREADINGFC.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        pass
    
    plugintools.close_item_list()
Example #43
0
def run():
    plugintools.log("UCiVmHW7d57ICmEf9WGIp1CA.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        pass
    
    plugintools.close_item_list()
Example #44
0
def gethttp_referer_headers(url,referer,show):

    params = plugintools.get_params()
    show_default = params.get("series_id")  # Obtenemos modo de vista del usuario para series TV
    #plugintools.modo_vista(show)
    
    request_headers=[]
    request_headers.append(["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"])
    request_headers.append(["Referer", referer])    
    body,response_headers = plugintools.read_body_and_headers(url, headers=request_headers)
    plugintools.modo_vista(show)
    return body
Example #45
0
def run():
    plugintools.log("stormcloudsgathering.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        pass
    
    plugintools.close_item_list()
Example #46
0
def IDX_YOUTUBE1():
    plugintools.log("nratv1.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list1(params)
    else:
        pass
    
    plugintools.close_item_list()
Example #47
0
def run():
    plugintools.log("theatheistexperience.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        pass
    
    plugintools.close_item_list()
Example #48
0
def run():
    plugintools.log("pbsnewshouryoutube.run")

    # Get params
    params = plugintools.get_params()

    if params.get("action") is None:
        main_list(params)
    else:
        pass

    plugintools.close_item_list()
Example #49
0
def run():
    plugintools.log("pegadinhasdosilviosantos.run")
    
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()
Example #50
0
def run():
    plugintools.log("MelodyEntInc.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()
Example #51
0
def run():
    plugintools.log(YOUTUBE_CHANNEL_ID+".run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()
Example #52
0
def run():
    plugintools.log("docu.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec(action+"(params)")
    
    plugintools.close_item_list()
Example #53
0
def run():
    plugintools.log("FilmStreamOnline.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()
def run():
    plugintools.log("AddictiveFishing.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()
def run():
    plugintools.log("UndergroundWellness.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()
Example #56
0
def run():
    plugintools.log("WorldStarHipHopTV.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()
Example #57
0
def run():
    plugintools.log("olhardigital.run")
    
    # Pega Parâmetros
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()
Example #58
0
def run():
    plugintools.log("AlHayatTVChannel.run")
    
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()
Example #59
0
def run():
    plugintools.log("TerryRichardsonTV.run")
        
    # Get params
    params = plugintools.get_params()
    
    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
    
    plugintools.close_item_list()