Ejemplo n.º 1
0
def tumarcador_canales(params):  # 31-10-16
	titulo = params.get("title")
	canal = params.get("url")
	fondo = params.get("fanart")
	logo = params.get("thumbnail")

	## >5 y [COLOR red]5-Acestream[/COLOR]<fin
	canal_normal = plugintools.find_single_match(canal,'>(.*?) y')
	canal_aces = plugintools.find_single_match(canal,'red](.*?)-')
	pagina_aces = "http://tumarcador.xyz/canal" +  canal_aces + "a.php"

	plugintools.add_item(action="",url="",title=titulo,thumbnail=logo,fanart=fondo,folder=False,isPlayable=False)
	plugintools.add_item(action="",url="",title="",thumbnail=logo, fanart=fondo, folder=False, isPlayable=False)

	r=requests.get(pagina_aces)
	data = r.content
	
	#Busco los 2 enlaces aces... el m3u8 y el acestream
	m3u8 = plugintools.find_single_match(data,'file: "(.*?)"')
	aces = "acestream://" + plugintools.find_single_match(data,'acestream://(.*?)"')

	el_canal = "http://tumarcador.xyz/canal" + canal_normal + ".php"
	lanzo_spd = url_montada.replace("MI_CANAL", el_canal)
	
	url_montada2 = 'plugin://plugin.video.SportsDevil/?mode=1&amp;item=catcher%3dstreams%26url='+m3u8+'%26referer=http://tumarcador.xyz/'
	url_montada3 = 'plugin://plugin.video.SportsDevil/?mode=1&amp;item=catcher%3dstreams%26url='+aces+'%26referer=http://tumarcador.xyz/'
	
	plugintools.runAddon(action="runPlugin",url=lanzo_spd,title="[COLOR white]-Ver en Canal "+canal_normal+"[/COLOR]",thumbnail=logo, fanart=fondo, folder=False, isPlayable=True)
	plugintools.add_item(action="runPlugin",url=url_montada3,title="[COLOR red]-Ver en Canal "+canal_aces+"a   Formato Acestream[/COLOR]",thumbnail=logo,fanart=fanart,folder=False,isPlayable=True)
	plugintools.add_item(action="runPlugin",url=url_montada2,title="[COLOR blue]-Ver en Canal "+canal_aces+"a   Formato m3u8[/COLOR]",thumbnail=logo,fanart=fanart,folder=False,isPlayable=True)
Ejemplo n.º 2
0
def tumarcador_canales(params):  # 31-10-16
    titulo = params.get("title")
    canal = params.get("url")
    fondo = params.get("fanart")
    logo = params.get("thumbnail")

    ## >5 y [COLOR red]5-Acestream[/COLOR]<fin
    canal_normal = plugintools.find_single_match(canal, '>(.*?) y')

    plugintools.add_item(action="",
                         url="",
                         title=titulo,
                         thumbnail=logo,
                         fanart=fondo,
                         folder=False,
                         isPlayable=False)
    plugintools.add_item(action="",
                         url="",
                         title="",
                         thumbnail=logo,
                         fanart=fondo,
                         folder=False,
                         isPlayable=False)

    el_canal = "http://tumarcador.xyz/canal" + canal_normal + ".php"
    lanzo_spd = url_montada.replace("MI_CANAL", el_canal)

    plugintools.runAddon(action="runPlugin",
                         url=lanzo_spd,
                         title="[COLOR white]-Ver en Canal " + canal_normal +
                         "[/COLOR]",
                         thumbnail=logo,
                         fanart=fondo,
                         folder=False,
                         isPlayable=True)
Ejemplo n.º 3
0
def lnfstv4(params):
    titulo_pantalla(params.get("title"), logo, fondo)
    data = requests.get(params.get("url")).content
    lista = plugintools.find_multiple_matches(
        data, '<div class="box (.*?)</iframe>')
    for item in lista:
        nombre = plugintools.find_single_match(
            item, '<div class="box-title"(.*?)</div>')
        nombre = nombre.replace("<span>VS</span>", "vs").replace(">",
                                                                 "").strip()
        date = plugintools.find_single_match(
            item, '<div class="box-date"(.*?)/div>')
        fecha = plugintools.find_single_match(date, '>(.*?)<')
        enlace = plugintools.find_single_match(item, 'src="(.*?)"')
        if 'youtube' in enlace:
            enlace = "plugin://plugin.video.youtube/play/?video_id=" + enlace[
                30:41]
            plugintools.runAddon(action="play",
                                 title=h3(nombre + " (" + fecha + ") ") +
                                 h4('[YouTube]'),
                                 url=enlace,
                                 thumbnail=logo,
                                 fanart=fondo,
                                 folder=False,
                                 isPlayable=False)
        else:
            plugintools.add_item(action='',
                                 title=nombre + " (" + fecha + ")",
                                 url=enlace,
                                 fanart=fondo,
                                 thumbnail=logo,
                                 folder=False,
                                 isPlayable=True)
Ejemplo n.º 4
0
def plugin_analyzer(data, title, plot, datamovie, thumbnail, fanart, show):
    plugintools.log("[%s %s] Analizando plugin... %s " % (addonName, addonVersion, data))
    
    if data.startswith("plugin://plugin.video.SportsDevil/") == True:
        url = data.strip()                         
        plugintools.runAddon( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR orange] [SportsDevil][/COLOR]', plot = plot , url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , show = show, fanart = fanart, folder = False, isPlayable = False)

    elif data.startswith("plugin://plugin.video.f4mTester") == True:
        plugintools.add_item( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR orange] [F4M][/COLOR]', plot = plot , url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , show = show, fanart = fanart , folder = False , isPlayable = True )
                    
    elif data.startswith("plugin://plugin.video.youtube") == True:
        if data.startswith("plugin://plugin.video.youtube/channel/") == True:
            plugintools.add_item( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR white] [You[COLOR red]Tube[/COLOR][COLOR white] Channel][/COLOR]', url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = True , isPlayable = False )
        elif data.startswith("plugin://plugin.video.youtube/play/?playlist_id") == True:
            plugintools.add_item( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR white] [You[COLOR red]Tube[/COLOR][COLOR white] Playlist][/COLOR]', url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = True , isPlayable = False )
        else:
            plugintools.runAddon( action = "play" , title = '[COLOR white]' + title + '[COLOR white] [You[COLOR red]Tube[/COLOR][COLOR white] Video][/COLOR]', url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = False , isPlayable = True )
       
    elif data.find("plugin.video.p2p-streams") == True:                        
        if data.find("mode=1") >= 0 :  # Acestream
            plugintools.add_item( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR lightblue] [Acestream][/COLOR]' , plot = plot , url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = False , isPlayable = True )
                        
        elif data.find("mode=2") >= 0 :  # Sopcast
            plugintools.add_item( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR darkorange] [Sopcast][/COLOR]' , plot = plot , url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = False , isPlayable = True )

        elif data.find("mode=401") >= 0 :  # P2P-Streams Parser
            plugintools.add_item( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR darkorange] [p2p-streams][/COLOR]' , plot = plot , url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = True , isPlayable = False )            

    elif data.startswith("plugin://plugin.video.p2psport") == True:
        plugintools.runAddon( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR gold] [P2P Sport][/COLOR]', url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = False , isPlayable = False )

    elif data.startswith("plugin://plugin.video.live.streamspro") == True:
        if data.strip().endswith("xml") == True:
            plugintools.add_item( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR gold] [LiveStreams][/COLOR]', url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = True , isPlayable = False )
        else:
            plugintools.runAddon( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR gold] [LiveStreams][/COLOR]', url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = False , isPlayable = False )

    elif data.startswith("plugin://plugin.video.stalker") == True:
        plugintools.add_item( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR gold] [Stalker][/COLOR]', url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = False , isPlayable = False )

    elif data.startswith("plugin://plugin.video.dailymotion_com") == True:  # Dailymotion (2.1.5)
        plugintools.runAddon( action = "play" , title = '[COLOR white]' + title + '[COLOR lightblue] [Dailymotion Video][/COLOR]', url = data , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = False , isPlayable = False )          
        
    else:
        plugintools.add_item( action = "runPlugin" , title = '[COLOR white]' + title + '[COLOR darkorange] [Addon][/COLOR]' , plot = datamovie["Plot"] , url = data.strip() , info_labels = datamovie, thumbnail = thumbnail , fanart = fanart , show = show, folder = False , isPlayable = True )
Ejemplo n.º 5
0
def zap_marcador(params):
	fondo = params.get("fanart")
	logo = params.get("thumbnail")
	r=requests.get(url)
	data = r.content

	plugintools.add_item(action="",url="",title="               [COLOR skyblue][B]Zapping de "+parser+autor,thumbnail=logo,fanart=fondo,folder=False,isPlayable=False)
	plugintools.add_item(action="",url="",title="",thumbnail=logo, fanart=fondo, folder=False, isPlayable=False)
	

	canales = plugintools.find_single_match(data,'dropdown-menu">(.*?)</ul>')  # Cojo el bloque de canales
	cada_canal = plugintools.find_multiple_matches(canales,'href=(.*?)/a>')  # Separo todos los canales y los monto en su url
				
	#Los saco a pantalla
	for item in cada_canal:
		canal_url = plugintools.find_single_match(item,'"(.*?)"')
		nombre_canal = plugintools.find_single_match(item,'">(.*?)<')
		titulo = "[COLOR aqua]- Ver el " + nombre_canal + "[/COLOR]"

		el_canal = "http://tumarcador.xyz/" + canal_url
		lanzo_spd = url_montada.replace("MI_CANAL", el_canal)
		
		#Montamos la línea.
		plugintools.runAddon(action="runPlugin",url=lanzo_spd,title=titulo,thumbnail=logo,fanart=fondo,folder=False,isPlayable=True)

	canales = plugintools.find_single_match(data,'Canales AceStream(.*?)</ul>')  # Cojo el bloque de canales Acestream
	cada_canal = plugintools.find_multiple_matches(canales,'href=(.*?)/a>')  # Separo todos los canales y los monto en su url
				
	#Los saco a pantalla
	for item in cada_canal:
		canal_url = plugintools.find_single_match(item,'"(.*?)"')
		nombre_canal = plugintools.find_single_match(item,'">(.*?)<')
		titulo = "[COLOR aqua]- Ver el " + nombre_canal + "a  [COLOR red][I](Acestream)[/I][/COLOR]"

		el_canal = "http://tumarcador.xyz/" + canal_url
		#lanzo_spd = url_montada.replace("MI_CANAL", el_canal)
		
		#Montamos la línea.
		#plugintools.runAddon(action="runPlugin",url=lanzo_spd,title=titulo,thumbnail=logo,fanart=fondo,folder=False,isPlayable=True)
		plugintools.add_item(action="saca_acestream",url=el_canal,title=titulo,thumbnail=logo, fanart=fondo, folder=True, isPlayable=False)
Ejemplo n.º 6
0
def lanza_marca(params):
    canal = params.get("url")
    fanart = params.get("fanart")
    thumbnail = params.get("thumbnail")
    partido = params.get("extra")

    if upper(canal) == "X":
        canal = "1"
    if upper(canal) == "Y":
        canal = "2"

    if len(canal) > 1:
        canales = canal.split(", ")
        titu = partido + "  en canal "
        for i in range(len(canales)):
            linea = "- ver " + titu + canales[i - 1]
            lanzo_spd = url_montada.replace("MI_CANAL", canales[i - 1])
            plugintools.log("*************Canal: " + canales[i - 1] +
                            "**************")
            plugintools.runAddon(action="runPlugin",
                                 url=lanzo_spd,
                                 title=partido,
                                 thumbnail=logo,
                                 fanart=fondo,
                                 folder=False,
                                 isPlayable=True)
    else:
        linea = "- ver " + titu + canal
        lanzo_spd = url_montada.replace("MI_CANAL", canal)
        plugintools.log("*************Canal: " + canal + "**************")
        plugintools.runAddon(action="runPlugin",
                             url=lanzo_spd,
                             title=partido,
                             thumbnail=logo,
                             fanart=fondo,
                             folder=False,
                             isPlayable=True)
Ejemplo n.º 7
0
def lanza_marca(params):
	canal = params.get("url")
	fanart = params.get("fanart")
	thumbnail = params.get("thumbnail")
	partido = params.get("extra")
	
	if upper(canal) == "X":
		canal = "1"
	if upper(canal) == "Y":
		canal = "2"
		
	if len(canal) > 1:
		canales = canal.split(", ")
		titu = partido + "  en canal "
		for i in range(len(canales)):
			linea = "- ver " + titu + canales[i-1]
			lanzo_spd = url_montada.replace("MI_CANAL", canales[i-1])
			plugintools.log("*************Canal: "+canales[i-1]+"**************")
			plugintools.runAddon(action="runPlugin",url=lanzo_spd,title=partido,thumbnail=logo, fanart=fondo, folder=False, isPlayable=True)
	else:
		linea = "- ver " + titu + canal
		lanzo_spd = url_montada.replace("MI_CANAL", canal)
		plugintools.log("*************Canal: "+canal+"**************")
		plugintools.runAddon(action="runPlugin",url=lanzo_spd,title=partido,thumbnail=logo, fanart=fondo, folder=False, isPlayable=True)
Ejemplo n.º 8
0
def plugin_analyzer(data, title, plot, datamovie, thumbnail, fanart, show):
    plugintools.log("[%s %s] Analizando plugin... %s " %
                    (addonName, addonVersion, data))

    if data.startswith("plugin://plugin.video.SportsDevil/") == True:
        url = data.strip()
        plugintools.runAddon(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR orange] [SportsDevil][/COLOR]',
                             plot=plot,
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             show=show,
                             fanart=fanart,
                             folder=False,
                             isPlayable=False)

    elif data.startswith("plugin://plugin.video.f4mTester") == True:
        plugintools.add_item(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR blue] [B][/B][/COLOR]',
                             plot=plot,
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             show=show,
                             fanart=fanart,
                             folder=False,
                             isPlayable=True)

    elif data.startswith("plugin://plugin.video.youtube") == True:
        if data.startswith("plugin://plugin.video.youtube/channel/") == True:
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white] ' + title +
                '[COLOR white] [You[COLOR red]Tube[/COLOR][COLOR white] Channel][/COLOR]',
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                show=show,
                folder=True,
                isPlayable=False)
        elif data.startswith(
                "plugin://plugin.video.youtube/play/?playlist_id") == True:
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white] ' + title +
                '[COLOR white] [You[COLOR red]Tube[/COLOR][COLOR white] Playlist][/COLOR]',
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                show=show,
                folder=True,
                isPlayable=False)
        else:
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white] ' + title +
                '[COLOR white] [You[COLOR red]Tube[/COLOR][COLOR white] Video][/COLOR]',
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                show=show,
                folder=False,
                isPlayable=True)

    elif data.find("plugin.video.p2p-streams") == True:
        if data.find("mode=1") >= 0:  # Acestream
            plugintools.add_item(action="runPlugin",
                                 title='[COLOR white]' + title +
                                 '[COLOR lightblue] [Acestream][/COLOR]',
                                 plot=plot,
                                 url=data.strip(),
                                 info_labels=datamovie,
                                 thumbnail=thumbnail,
                                 fanart=fanart,
                                 show=show,
                                 folder=False,
                                 isPlayable=True)

        elif data.find("mode=2") >= 0:  # Sopcast
            plugintools.add_item(action="runPlugin",
                                 title='[COLOR white]' + title +
                                 '[COLOR darkorange] [Sopcast][/COLOR]',
                                 plot=plot,
                                 url=data.strip(),
                                 info_labels=datamovie,
                                 thumbnail=thumbnail,
                                 fanart=fanart,
                                 show=show,
                                 folder=False,
                                 isPlayable=True)

        elif data.find("mode=401") >= 0:  # P2P-Streams Parser
            plugintools.add_item(action="runPlugin",
                                 title='[COLOR white]' + title +
                                 '[COLOR darkorange] [p2p-streams][/COLOR]',
                                 plot=plot,
                                 url=data.strip(),
                                 info_labels=datamovie,
                                 thumbnail=thumbnail,
                                 fanart=fanart,
                                 show=show,
                                 folder=True,
                                 isPlayable=False)

    elif data.startswith("plugin://plugin.video.p2psport") == True:
        plugintools.add_item(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR gold] [P2P Sport][/COLOR]',
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             show=show,
                             folder=True,
                             isPlayable=False)

    elif data.startswith("plugin://plugin.video.live.streamspro") == True:
        plugintools.add_item(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR blue][B] [LiveStreams][/B][/COLOR]',
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             show=show,
                             folder=False,
                             isPlayable=False)

    elif data.startswith("plugin://plugin.video.stalker") == True:
        plugintools.add_item(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR gold] [Stalker][/COLOR]',
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             show=show,
                             folder=False,
                             isPlayable=False)

    else:
        plugintools.add_item(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR darkorange] [Addon][/COLOR]',
                             plot=datamovie["Plot"],
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             show=show,
                             folder=True,
                             isPlayable=False)
Ejemplo n.º 9
0
def plugin_analyzer(data, title, plot, datamovie, thumbnail, fanart):
    plugintools.log("[%s %s] Analizando plugin... %s " %
                    (addonName, addonVersion, fanart))

    if data.startswith("plugin://plugin.video.SportsDevil/") == True:
        url = data.strip()
        plugintools.add_item(
            action="play",
            title='[COLOR white]' + title +
            '[COLOR lightyellow][I] [SportsDevil][/I][/COLOR]',
            url=url,
            info_labels=datamovie,
            thumbnail=thumbnail,
            fanart=fanart,
            folder=True,
            isPlayable=False)

    elif data.startswith("plugin://plugin.video.f4mTester") == True:
        plugintools.add_item(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR blue][B][/B][/COLOR]',
                             plot=plot,
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             folder=False,
                             isPlayable=True)

    elif data.startswith("plugin://plugin.video.youtube") == True:
        if data.startswith("plugin://plugin.video.youtube/channel/") == True:
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white]' + title +
                '[COLOR lightyellow][I] [You[B]Tube[/B] Channel][/I][/COLOR]',
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                folder=True,
                isPlayable=False)
        elif data.startswith("plugin://plugin.video.youtube/user/") == True:
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white]' + title +
                '[COLOR lightyellow][I] [You[B]Tube[/B] User][/I][/COLOR]',
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                folder=True,
                isPlayable=False)
        elif data.startswith(
                "plugin://plugin.video.youtube/playlist/") == True:
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white]' + title +
                '[COLOR lightyellow][I] [You[B]Tube[/B] Playlist][/I][/COLOR]',
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                folder=True,
                isPlayable=False)
        elif data.startswith(
                "plugin://plugin.video.youtube/play/?playlist_id") == True:
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white]' + title +
                '[COLOR lightyellow][I] [You[B]Tube[/B] Playlist][/I][/COLOR]',
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                folder=True,
                isPlayable=False)
        else:
            plugintools.runAddon(
                action="play",
                title='[COLOR white]' + title +
                '[COLOR lightyellow][I] [You[B]Tube[/B] Video][/I][/COLOR]',
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                folder=False,
                isPlayable=True)

    elif data.find("plugin.video.p2p-streams") == True:
        if data.find("mode=1") >= 0:  # Acestream
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white]' + title +
                '[COLOR lightyellow][I] [Acestream][/I][/COLOR]',
                plot=plot,
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                folder=False,
                isPlayable=True)

        elif data.find("mode=2") >= 0:  # Sopcast
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white]' + title +
                '[COLOR lightyellow][I] [Sopcast][/I][/COLOR]',
                plot=plot,
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                folder=False,
                isPlayable=True)

        elif data.find("mode=401") >= 0:  # P2P-Streams Parser
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white]' + title +
                '[COLOR lightyellow][I] [p2p-streams][/I][/COLOR]',
                plot=plot,
                url=data.strip(),
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                folder=True,
                isPlayable=False)

    elif data.startswith("plugin://plugin.video.p2psport") == True:
        plugintools.add_item(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR lightyellow][I] [P2P Sport][/I][/COLOR]',
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             folder=True,
                             isPlayable=False)

    elif data.startswith("plugin://plugin.video.live.streamspro") == True:
        if data.strip().endswith("xml") == True:
            plugintools.add_item(action="runPlugin",
                                 title='[COLOR white]' + title +
                                 '[COLOR blue][B] [LiveStreams][/B][/COLOR]',
                                 url=data.strip(),
                                 info_labels=datamovie,
                                 thumbnail=thumbnail,
                                 fanart=fanart,
                                 folder=True,
                                 isPlayable=False)
        else:
            plugintools.runAddon(action="runPlugin",
                                 title='[COLOR white]' + title +
                                 '[COLOR blue][B] [LiveStreams][/B][/COLOR]',
                                 url=data.strip(),
                                 info_labels=datamovie,
                                 thumbnail=thumbnail,
                                 fanart=fanart,
                                 folder=False,
                                 isPlayable=False)

    elif data.startswith("plugin://plugin.video.stalker") == True:
        mac = plugintools.read(
            'https://copy.com/gzmKeGWFHx08hsOK')  # Mac TV Ultra 7K
        data = data.replace("MAC_STALKER", mac).strip()
        plugintools.add_item(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR lightyellow][I] [Stalker][/I][/COLOR]',
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             folder=False,
                             isPlayable=False)

    elif data.startswith("plugin://plugin.video.dailymotion_com"
                         ) == True:  # Dailymotion (2.1.5)
        if data.find("mode=showPlaylist") >= 0:
            plugintools.add_item(
                action="runPlugin",
                title='[COLOR white]' + title +
                '[COLOR lightyellow][I] [Dailymotion Playlist][/I][/COLOR]',
                url=data,
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                folder=True,
                isPlayable=False)
        else:
            plugintools.runAddon(
                action="play",
                title='[COLOR white]' + title +
                '[COLOR lightyellow][I] [Dailymotion Video][/I][/COLOR]',
                url=data,
                info_labels=datamovie,
                thumbnail=thumbnail,
                fanart=fanart,
                folder=False,
                isPlayable=False)

    elif data.startswith(
            "plugin://plugin.video.ArenaDevil") == True:  # ArenaDevil modules
        plugintools.add_item(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR lightyellow][I] [ArenaDevil][/I][/COLOR]',
                             url=data,
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             folder=True,
                             isPlayable=False)

    elif data.startswith(
            "plugin://plugin.video.videodevil") == True:  # VideoDevil modules
        plugintools.add_item(action="play",
                             title='[COLOR white]' + title +
                             '[COLOR lightyellow][I] [VideoDevil][/I][/COLOR]',
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             folder=True,
                             isPlayable=False)

    elif data.startswith(
            "plugin://plugin.video.pelisalacarta") == True:  # Pelisalacarta
        plugintools.add_item(
            action="runPlugin",
            title='[COLOR white]' + title +
            '[COLOR lightyellow][I] [Pelisalacarta][/I][/COLOR]',
            url=data.strip(),
            info_labels=datamovie,
            thumbnail=thumbnail,
            fanart=fanart,
            folder=True,
            isPlayable=False)

    else:
        plugintools.add_item(action="runPlugin",
                             title='[COLOR white]' + title +
                             '[COLOR lightyellow][I] [Addon][/I][/COLOR]',
                             url=data.strip(),
                             info_labels=datamovie,
                             thumbnail=thumbnail,
                             fanart=fanart,
                             folder=True,
                             isPlayable=False)
Ejemplo n.º 10
0
def multi_analyzer(params):
    plugintools.log('[%s %s] multi_analyzer %s' % (addonName, addonVersion, repr(params)))
    url = params.get("url");title='[COLOR white]'+params.get("title").replace("[I][Multi][/I]","").strip()+'[/COLOR]';title = multiparse_title(title,url)
    thumbnail = params.get("thumbnail");fanart=params.get("fanart");datamovie={};datamovie["plot"] = params.get("plot")

    if url.startswith("plugin") == True:
        plot = params.get("plot")
        title=params.get("title").replace("[I][Multi][/I]", "").strip()
        plugin_analyzer(url, title, plot, datamovie, thumbnail, fanart)    
 
    elif url.startswith("llamada") == True:
        plot = params.get("plot")
        title=params.get("title")  # .replace("[Multi]", "").strip()
        url = url.replace("llamada:", "")
        comandos = url.split("; ")
        fich_llamada = ruta_llamadas + comandos[0] + ".txt"  # El 1º es el nombre del fichero

        archivo_llamada = open(fich_llamada, "r")
        url_llamada = archivo_llamada.read()
        num_comandos = len(comandos)

        for comando in range(1, num_comandos):  # Empiezo en 1 para saltarme el 1º, q es el nombre del fichero, no un "comando" a reemplazar
            sustituye = plugintools.find_single_match(comandos[comando],'(.*?)=')
            por_este = plugintools.find_single_match(comandos[comando],'=(.*)')
            url_llamada = url_llamada.replace(sustituye, por_este)

        thumbnail=params.get("thumbnail")
        fanart=params.get("fanart")
        plugin_analyzer(url_llamada, title, plot, datamovie, thumbnail, fanart)

    elif url.startswith("bum") == True:
        #title_fixed = multiparse_title(title, url)
        try: min_seeds=url.split("_")[1];
        except: min_seeds=""
        plugintools.addDir(action = "bum_linker" , title = title, url = url.replace("bum:", "").strip(), thumbnail = thumbnail, extra=url.replace("bum:", ""), page=min_seeds, fanart = fanart , folder = True , isPlayable = False )         
        
    elif url.startswith("devil:") == True:
        url = url.replace("devil:", "").replace(" referer=","%26referer=")
        url = 'plugin://plugin.video.SportsDevil/?mode=1&amp;item=catcher%3dstreams%26url='+url  # +'%26referer='+referer
        plugintools.add_item(action="runPlugin", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder = False, isPlayable=True)        
        
    # Linkers de películas y series
    elif url.startswith("peli") == True or url.startswith("serie") == True:
        linker,lbl_linker = linker_analyzer(url);url = url.replace("peli:", "");url = url.replace("serie:", "")
        plugintools.add_item(action=linker, title=title, url=url, extra="linker", page=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=True, isPlayable=False)
        
    # Youtube add-on endpoints

    elif url.startswith("yt_playlist") == True:  # Youtube add-on Playlist
        pid = url.replace("yt_playlist(", "").replace(")", "").replace(" ", "").strip()
        url = 'plugin://plugin.video.youtube/playlist/'+pid+'/'
        plugintools.add_item(action="runPlugin", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=True, isPlayable=False)

    elif url.startswith("yt_channel") == True:  # Youtube add-on Channel
        cid = url.replace("yt_channel(", "").replace(")", "").replace(" ", "").strip()
        url = 'plugin://plugin.video.youtube/channel/'+cid+'/'
        plugintools.add_item(action="runPlugin", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=True, isPlayable=False)        
        
    elif url.startswith("yt_user") == True:  # Youtube add-on User
        uid = url.replace("yt_user(", "").replace(")", "").replace(" ", "").strip()
        url = 'plugin://plugin.video.youtube/user/'+uid+'/'
        plugintools.add_item(action="runPlugin", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=True, isPlayable=False)

    elif url.startswith("yt_video") == True:  # Youtube add-on Video
        vid = url.replace("yt_video(", "").replace(")", "").replace(" ", "")
        url = 'plugin://plugin.video.youtube/play/?video_id='+vid
        plugintools.runAddon(action="play", title=title, url=url.strip(), thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=True)
          
    elif url.startswith("rtmp") == True or url.startswith("rtsp") == True:
        plugintools.add_item(action="rtmp_analyzer", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=True)

    elif url.startswith("pvr://") == True:
        plugintools.add_item( action="runPlugin" , title=title , url=url , thumbnail=thumbnail , fanart=fanart , folder = False , isPlayable = False )     
        
    elif url.startswith("http") == True:
        server = video_analyzer(url)       
           
        if server != "unknown":
            plugintools.add_item(action=server, title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=True)
            
        elif url.find("dailymotion.com/video") >= 0:
            video_id = dailym_getvideo(url)
            if video_id != "":
                thumbnail = "https://api.dailymotion.com/thumbnail/video/"+video_id+""
                url = "plugin://plugin.video.dailymotion_com/?url="+video_id+"&mode=playVideo"
                plugintools.add_item(action="dailym_getvideo", title=title, url=url, thumbnail=thumbnail, fanart=params.get("fanart"), info_labels=datamovie, folder=False, isPlayable=True)
                
        elif url.find("dailymotion.com/playlist") >= 0:
            id_playlist = dailym_getplaylist(url)
            if id_playlist != "":
                url = "https://api.dailymotion.com/playlist/"+id_playlist+"/videos"
                thumbnail = "https://api.dailymotion.com/thumbnail/video/"+id_playlist
                if thumbnail == "":
                    thumbnail = 'http://press.dailymotion.com/wp-old/wp-content/uploads/logo-Dailymotion.png'
                url = "https://api.dailymotion.com/playlist/"+id_playlist+"/videos"
                plugintools.add_item(action="dailym_pl", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=True, isPlayable=False)

        elif url.find("vimeo.com") >= 0:  # Vimeo
            if url.find("vimeo.com/channels") >= 0:
                plugintools.addDir( action = "vimeo_pl" , title = title, url = url ,  thumbnail = thumbnail , fanart = fanart , folder = True , isPlayable = False )
            else:
                plugintools.addShow( action = "vimeo" , title = title, url = url ,  thumbnail = thumbnail , fanart = fanart , folder = False , isPlayable = True )
                
        elif url.find("https://www.youtube.com/watch?") >= 0:
            plot = params.get("plot")
            title=params.get("title").replace("[I][Multi][/I]", "").strip()
            videoid = url.replace("https://www.youtube.com/watch?v=", "")
            url = 'plugin://plugin.video.youtube/play/?video_id='+videoid
            plugin_analyzer(url, title, plot, datamovie, thumbnail, fanart)                
                
        elif url.find(".m3u8") >= 0:
            plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=True)

        else:
            plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=True)
            
    elif url.startswith("udp") == True:
        plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=True)
    
    elif url.startswith("rtp") == True:
        plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=True)
        
    elif url.startswith("mms") == True:
        plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=True)
            
    elif url.startswith("sop") == True:
        # plugin://plugin.video.p2p-streams/?url=sop://124.232.150.188:3912/11265&mode=2&name=Titulo+canal+Sopcast
        url = 'plugin://plugin.video.p2p-streams/?url=' + url + '&mode=2&name='
        plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=False)
        
    elif url.startswith("ace") == True:
        url = url.replace("ace:", "")
        url = 'plugin://plugin.video.p2p-streams/?url=' + url + '&mode=1&name='
        plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=False)
    
    elif url.startswith("short") == True:
        url = url.replace("short:", "").strip()                
        plugintools.add_item(action="longurl", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=True, isPlayable=False)                

    elif url.startswith("devil") == True:
        url_devil = url.replace("devil:", "").replace(" referer=","%26referer=")
        url = 'plugin://plugin.video.SportsDevil/?mode=1&amp;item=catcher%3dstreams%26url='+url_devil  # +'%26referer='+referer
        #xbmc.executebuiltin('XBMC.RunPlugin(' + url +')')
        plugintools.add_item(action="runPlugin", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=False)
        
    elif url.startswith("bum") == True:
        plugintools.add_item(action="bum_multiparser", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=True, isPlayable=False)

    elif url.startswith("txt") == True:
        from resources.tools.txt_reader import *
        url=url.replace("txt:", "")
        plugintools.add_item(action="txt_reader", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=False)

    elif url.startswith("epg-txt") == True:
        from resources.tools.epg_txt import *
        url=url.replace("epg-txt:", "")
        url = epg_txt_dict(parser_title(url))
        plugintools.add_item(action="epg_txt0", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=False)                

    elif url.startswith("agendatv") == True:
        url = url.replace("agendatv:", "").strip()
        if url.startswith("futbolenlatv") == True:
            if url.endswith("futbol") == True: url='http://www.futbolenlatv.com/deporte/futbol'
            elif url.endswith("futsal") == True: url='http://www.futbolenlatv.com/deporte/futbol-sala'
            elif url.endswith("baloncesto") == True: url='http://www.futbolenlatv.com/deporte/baloncesto'
            elif url.endswith("balonmano") == True: url='http://www.futbolenlatv.com/deporte/balonmano'
            elif url.endswith("motociclismo") == True: url='http://www.futbolenlatv.com/deporte/motociclismo'
            elif url.endswith("automovilismo") == True: url='http://www.futbolenlatv.com/deporte/automovilismo'
            elif url.endswith("amfutbol") == True: url='http://www.futbolenlatv.com/deporte/futbol-americano'
            elif url.endswith("tenis") == True: url='http://www.futbolenlatv.com/deporte/tenis'
            elif url.endswith("rugby") == True: url='http://www.futbolenlatv.com/deporte/rugby'
            elif url.endswith("ciclismo") == True: url='http://www.futbolenlatv.com/deporte/ciclismo'
            elif url.endswith("todos") == True: url='http://www.futbolenlatv.com/deporte'
            plugintools.add_item(action="feltv0", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=False)                    
        elif url == "footballonuktv":
            url = 'http://www.footballonuktv.com/'
            plugintools.add_item(action="agendatv", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=False)                                        
        elif url == "calciointv":
            url = 'http://www.calciointv.com/'
            plugintools.add_item(action="agendatv", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=False)                                        
        elif url == "futbolenlatele":
            url = 'http://www.futbolenlatele.com'
            plugintools.add_item(action="agendatv", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=False)                                        
        elif url == "queverahora":
            url = 'http://www.formulatv.com/programacion/'
            plugintools.add_item(action="epg_verahora", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=False)                    
        else:
            plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=True, isPlayable=False)                    

    elif url.startswith("torrent") == True:
        url = p2p_builder_url(url, title, p2p="torrent")
        plugintools.add_item(action="launch_torrent", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=True)

    elif url.startswith("magnet") == True:
        url = p2p_builder_url(url, title, p2p="magnet")
        plugintools.add_item(action="launch_magnet", title=title, url=url, thumbnail=thumbnail, fanart=fanart, info_labels=datamovie, folder=False, isPlayable=True)
    
    elif url == "mundoplus":
        plugintools.add_item(action="mundoplus_guide", title=title, url=url, thumbnail=thumbnail, fanart=fanart, page=params.get("page"), info_labels=datamovie, folder=True, isPlayable=False)
    
    elif url.startswith("goear") == True:
        id_goear = url.replace("goear:", "").replace('"', "").strip()
        url = 'http://www.goear.com/action/sound/get/'+id_goear
        plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, extra="regex", info_labels=datamovie, folder=True, isPlayable=False)

    else:
        plugintools.add_item(action="play", title=title, url=url, thumbnail=thumbnail, fanart=fanart, extra="regex", info_labels=datamovie, folder=True, isPlayable=False)
Ejemplo n.º 11
0
def tumarcador0(params):
    ###################################################################### DMO ######################################################################
    mi_version = [
        "2016", "10", "31"
    ]  # OJO!! Cambiar la Version, por supuesto... AQUI Y EN EL FICHERO DE LA NUBE

    r = requests.get("http://pastebin.com/raw/2baqp6N8")

    data = r.content

    fecha = plugintools.find_single_match(data, 'tumarcador>(.*?)<')
    ult_version = fecha.split(".")

    hay_nueva = False
    if mi_version[0] <> ult_version[0]:
        hay_nueva = True
    else:
        if mi_version[1] < ult_version[1]:
            hay_nueva = True
        else:
            if mi_version[2] < ult_version[2]:
                hay_nueva = True

    if hay_nueva == True:
        titu = "¡¡¡ATENCION!!!!"
        lin1 = "      Versión [COLOR red]OBSOLETA de TuMarcador[/COLOR] updated by DarioMO"
        lin2 = " Ya tienes disponible la Ultima Versión para poder actualizarlo"
        lin3 = "         [COLOR yellow]Descarga:[/COLOR] [COLOR red][B]http://adf.ly/7448402/nuevo-tumarcador[/COLOR][/B]"
        xbmcgui.Dialog().ok(titu, lin1, lin2, lin3)
    ###################################################################### DMO ######################################################################

    ruta_pro = xbmc.translatePath(
        os.path.join(
            'special://home/userdata/addon_data/plugin.video.live.streamspro',
            ''))
    #headers = {"User-Agent": 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0', "Referer": url}
    r = requests.get(guia)
    data = r.content

    if not os.path.exists(ruta_pro):
        os.makedirs(
            ruta_pro
        )  # Si no existe el directorio, LSP nos va a dar error... así q lo creo

    logo = "https://pbs.twimg.com/profile_images/1851363673/logo.jpg"
    fondo = "http://www.sportyou.es/blog/wp-content/uploads/2016/09/Neymar-Benzema-Cristiano.jpg"

    plugintools.add_item(action="",
                         url="",
                         title="               " + parser + autor,
                         thumbnail="http://imgur.com/l8fKJMB.png",
                         fanart=fondo,
                         folder=False,
                         isPlayable=False)
    plugintools.add_item(action="",
                         url="",
                         title="",
                         thumbnail=logo,
                         fanart=fondo,
                         folder=False,
                         isPlayable=False)

    plugintools.add_item(
        action="zap_marcador",
        url="",
        title="[COLOR white][B]- Zapping de Canales -[/COLOR][/B]",
        thumbnail="http://lafava.com/wp-content/uploads/2015/06/zapping1.jpg",
        fanart=fondo,
        folder=True,
        isPlayable=False)
    plugintools.add_item(
        action="muestra_guia",
        url="",
        title="[COLOR red][B]- Mostrar Guía en Imagenes -[/COLOR][/B]",
        thumbnail="http://i.imgur.com/BNQwcS6.png",
        fanart=fondo,
        folder=True,
        isPlayable=False)
    plugintools.add_item(
        action="cambia_hora_marcador",
        url="",
        title="[COLOR skyblue][B]- Cambiar Diferencia Horaria -[/COLOR][/B]",
        thumbnail=
        "http://image.slidesharecdn.com/1esopresentaciontema1-110109052848-phpapp02/95/tema-1-la-tierra-1-eso-28-728.jpg?cb=1294550960",
        fanart=fondo,
        folder=True,
        isPlayable=False)
    plugintools.add_item(action="",
                         url="",
                         title="",
                         thumbnail=logo,
                         fanart=fondo,
                         folder=False,
                         isPlayable=False)

    #***********  Control de Diferencias Horarias DarioMO 15-10-16  *******************
    if not os.path.exists(fich_hora):
        diferencia = "00:00"
        file_hora = open(fich_hora, "w+")
        file_hora.write("00:00")
        file_hora.close()
    else:
        file_hora = open(fich_hora, "r")
        diferencia = file_hora.read()
        file_hora.close()
    #***********  Control de Diferencias Horarias DarioMO 15-10-16  *******************

    diferencia = diferencia + ":00"
    dias = plugintools.find_multiple_matches(data, '<dia>(.*?)<fin dia>')

    from datetime import datetime, timedelta

    for item in dias:
        dia = "             [COLOR white]Día: " + plugintools.find_single_match(
            item, '(.*?)<')
        plugintools.add_item(action="",
                             url="",
                             title=dia,
                             thumbnail=logo,
                             fanart=fondo,
                             folder=False,
                             isPlayable=False)

        lineas = plugintools.find_multiple_matches(item, '<linea>(.*?)<fin')

        for item2 in lineas:
            linea = item2 + "<"
            hora = plugintools.find_single_match(linea, '<hora>(.*?)<')
            competicion = plugintools.find_single_match(
                linea, '<competi>(.*?)<')
            partido = plugintools.find_single_match(linea, '<partido>(.*?)<')
            canal = ">" + plugintools.find_single_match(
                linea, '<canal>(.*?)<') + "<"

            logo_ext = plugintools.find_single_match(linea, '<logo>(.*?)<')

            if len(hora) > 0:
                #***********  Control de Diferencias Horarias DarioMO 15-10-16  *******************
                hora_esp = hora.replace("[COLOR lightblue]",
                                        "").replace("h[/COLOR]", "").strip()
                hora_esp = hora_esp + ":00"  # Añado los segundos
                hora_dif = diferencia + ":00"  # Añado los segundos
                lista_esp = hora_esp.split(":")
                lista_dif = diferencia.replace("-", "").split(":")

                esp_hora = int(lista_esp[0])
                esp_minuto = int(lista_esp[1])
                esp_segundo = int(lista_esp[2])

                dif_hora = int(lista_dif[0])
                dif_minuto = int(lista_dif[1])
                dif_segundo = int(lista_dif[2])

                h1 = datetime(2012, 12, 12, esp_hora, esp_minuto, 0)

                dh = timedelta(hours=dif_hora)
                dm = timedelta(minutes=dif_minuto)
                ds = timedelta(seconds=dif_segundo)

                if "-" in diferencia:  # Hay que restar horas
                    resultado1 = h1 - ds
                    resultado2 = resultado1 - dm
                    resultado = resultado2 - dh
                else:  # Hay que sumar Horas
                    resultado1 = h1 + ds
                    resultado2 = resultado1 + dm
                    resultado = resultado2 + dh

                hora = "[COLOR lightblue]" + resultado.strftime(
                    "%H:%M:%S") + "h[/COLOR]"
                hora = hora.replace(":00h", "h")
                #***********  Control de Diferencias Horarias DarioMO 15-10-16  *******************

            #if len(canal) > 1:
            canal2 = canal.replace(">", "").replace("<", "").replace(
                "-Acestream", "a-Acestream")
            if len(
                    canal
            ) > 3:  # Hay mas de 1 canal y seguramente acestream 31-10-16
                letrero = "Canales: "
                completa = hora + "   [COLOR white](" + competicion + ") - [/COLOR]" + partido + "    [COLOR white][I][ " + letrero + canal2 + " ] [/COLOR][/I]"
                if len(logo_ext) > 0:
                    logo = logo_ext

                plugintools.add_item(action="tumarcador_canales",
                                     url=canal,
                                     title=completa,
                                     thumbnail=logo,
                                     fanart=fondo,
                                     folder=True,
                                     isPlayable=False)

            else:
                letrero = "Canal: "

                canal_regex = canal2

                el_canal = "http://tumarcador.xyz/canal" + canal_regex + ".php"

                completa = hora + "   [COLOR white](" + competicion + ") - [/COLOR]" + partido + "    [COLOR white][I][ " + letrero + canal2 + " ] [/COLOR][/I]"
                lanzo_spd = url_montada.replace("MI_CANAL", el_canal)
                if len(logo_ext) > 0:
                    logo = logo_ext

                plugintools.runAddon(action="runPlugin",
                                     url=lanzo_spd,
                                     title=completa,
                                     thumbnail=logo,
                                     fanart=fondo,
                                     folder=False,
                                     isPlayable=True)

    return
Ejemplo n.º 12
0
def zap_marcador(params):
    fondo = params.get("fanart")
    logo = params.get("thumbnail")
    r = requests.get(url)
    data = r.content

    plugintools.add_item(action="",
                         url="",
                         title="               [COLOR skyblue][B]Zapping de " +
                         parser + autor,
                         thumbnail=logo,
                         fanart=fondo,
                         folder=False,
                         isPlayable=False)
    plugintools.add_item(action="",
                         url="",
                         title="",
                         thumbnail=logo,
                         fanart=fondo,
                         folder=False,
                         isPlayable=False)

    canales = plugintools.find_single_match(
        data, 'dropdown-menu">(.*?)</ul>')  # Cojo el bloque de canales
    cada_canal = plugintools.find_multiple_matches(
        canales,
        'href=(.*?)/a>')  # Separo todos los canales y los monto en su url

    #Los saco a pantalla
    for item in cada_canal:
        canal_url = plugintools.find_single_match(item, '"(.*?)"')
        nombre_canal = plugintools.find_single_match(item, '">(.*?)<')
        titulo = "[COLOR aqua]- Ver el " + nombre_canal + "[/COLOR]"

        el_canal = "http://tumarcador.xyz/" + canal_url
        lanzo_spd = url_montada.replace("MI_CANAL", el_canal)

        #Montamos la línea.
        plugintools.runAddon(action="runPlugin",
                             url=lanzo_spd,
                             title=titulo,
                             thumbnail=logo,
                             fanart=fondo,
                             folder=False,
                             isPlayable=True)

    canales = plugintools.find_single_match(
        data,
        'Canales AceStream(.*?)</ul>')  # Cojo el bloque de canales Acestream
    cada_canal = plugintools.find_multiple_matches(
        canales,
        'href=(.*?)/a>')  # Separo todos los canales y los monto en su url

    #Los saco a pantalla
    for item in cada_canal:
        canal_url = plugintools.find_single_match(item, '"(.*?)"')
        nombre_canal = plugintools.find_single_match(item, '">(.*?)<')
        titulo = "[COLOR aqua]- Ver el " + nombre_canal + "a  [COLOR red][I](Acestream)[/I][/COLOR]"

        el_canal = "http://tumarcador.xyz/" + canal_url
        #lanzo_spd = url_montada.replace("MI_CANAL", el_canal)

        #Montamos la línea.
        #plugintools.runAddon(action="runPlugin",url=lanzo_spd,title=titulo,thumbnail=logo,fanart=fondo,folder=False,isPlayable=True)
        plugintools.add_item(action="saca_acestream",
                             url=el_canal,
                             title=titulo,
                             thumbnail=logo,
                             fanart=fondo,
                             folder=True,
                             isPlayable=False)
Ejemplo n.º 13
0
def tumarcador_canales(params):  # 31-10-16
    titulo = params.get("title")
    canal = params.get("url")
    fondo = params.get("fanart")
    logo = params.get("thumbnail")

    ## >5 y [COLOR red]5-Acestream[/COLOR]<fin
    canal_normal = plugintools.find_single_match(canal, '>(.*?) y')
    canal_aces = plugintools.find_single_match(canal, 'red](.*?)-')
    pagina_aces = "http://tumarcador.xyz/canal" + canal_aces + "a.php"

    plugintools.add_item(action="",
                         url="",
                         title=titulo,
                         thumbnail=logo,
                         fanart=fondo,
                         folder=False,
                         isPlayable=False)
    plugintools.add_item(action="",
                         url="",
                         title="",
                         thumbnail=logo,
                         fanart=fondo,
                         folder=False,
                         isPlayable=False)

    r = requests.get(pagina_aces)
    data = r.content

    #Busco los 2 enlaces aces... el m3u8 y el acestream
    m3u8 = plugintools.find_single_match(data, 'file: "(.*?)"')
    aces = "acestream://" + plugintools.find_single_match(
        data, 'acestream://(.*?)"')

    el_canal = "http://tumarcador.xyz/canal" + canal_normal + ".php"
    lanzo_spd = url_montada.replace("MI_CANAL", el_canal)

    url_montada2 = 'plugin://plugin.video.SportsDevil/?mode=1&amp;item=catcher%3dstreams%26url=' + m3u8 + '%26referer=http://tumarcador.xyz/'
    url_montada3 = 'plugin://plugin.video.SportsDevil/?mode=1&amp;item=catcher%3dstreams%26url=' + aces + '%26referer=http://tumarcador.xyz/'

    plugintools.runAddon(action="runPlugin",
                         url=lanzo_spd,
                         title="[COLOR white]-Ver en Canal " + canal_normal +
                         "[/COLOR]",
                         thumbnail=logo,
                         fanart=fondo,
                         folder=False,
                         isPlayable=True)
    plugintools.add_item(action="runPlugin",
                         url=url_montada3,
                         title="[COLOR red]-Ver en Canal " + canal_aces +
                         "a   Formato Acestream[/COLOR]",
                         thumbnail=logo,
                         fanart=fanart,
                         folder=False,
                         isPlayable=True)
    plugintools.add_item(action="runPlugin",
                         url=url_montada2,
                         title="[COLOR blue]-Ver en Canal " + canal_aces +
                         "a   Formato m3u8[/COLOR]",
                         thumbnail=logo,
                         fanart=fanart,
                         folder=False,
                         isPlayable=True)
Ejemplo n.º 14
0
def tumarcador0(params):
	###################################################################### DMO ######################################################################
	mi_version = ["2016","10","31"]  # OJO!! Cambiar la Version, por supuesto... AQUI Y EN EL FICHERO DE LA NUBE

	r = requests.get("http://pastebin.com/raw/2baqp6N8")

	data = r.content

	fecha = plugintools.find_single_match(data,'tumarcador>(.*?)<')
	ult_version = fecha.split(".")

	hay_nueva = False
	if mi_version[0] <> ult_version[0]:
		hay_nueva = True
	else:
		if mi_version[1] < ult_version[1]:
			hay_nueva = True
		else:
			if mi_version[2] < ult_version[2]:
				hay_nueva = True
				
	if hay_nueva == True:
		titu = "¡¡¡ATENCION!!!!"
		lin1 = "      Versión [COLOR red]OBSOLETA de TuMarcador[/COLOR] updated by DarioMO"
		lin2 = " Ya tienes disponible la Ultima Versión para poder actualizarlo"
		lin3 = "         [COLOR yellow]Descarga:[/COLOR] [COLOR red][B]http://adf.ly/7448402/nuevo-tumarcador[/COLOR][/B]"
		xbmcgui.Dialog().ok(titu, lin1, lin2, lin3)
	###################################################################### DMO ######################################################################

	ruta_pro = xbmc.translatePath(os.path.join('special://home/userdata/addon_data/plugin.video.live.streamspro', ''))
	#headers = {"User-Agent": 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0', "Referer": url}
	r=requests.get(guia)
	data = r.content

	if not os.path.exists(ruta_pro):
		os.makedirs(ruta_pro)  # Si no existe el directorio, LSP nos va a dar error... así q lo creo
	
	logo = "https://pbs.twimg.com/profile_images/1851363673/logo.jpg"
	fondo = "http://www.sportyou.es/blog/wp-content/uploads/2016/09/Neymar-Benzema-Cristiano.jpg"
	
	plugintools.add_item(action="",url="",title="               "+parser+autor,thumbnail="http://imgur.com/l8fKJMB.png",fanart=fondo,folder=False,isPlayable=False)
	plugintools.add_item(action="",url="",title="",thumbnail=logo, fanart=fondo, folder=False, isPlayable=False)
	
	plugintools.add_item(action="zap_marcador",url="",title="[COLOR white][B]- Zapping de Canales -[/COLOR][/B]",thumbnail="http://lafava.com/wp-content/uploads/2015/06/zapping1.jpg",fanart=fondo,folder=True,isPlayable=False)
	plugintools.add_item(action="muestra_guia",url="",title="[COLOR red][B]- Mostrar Guía en Imagenes -[/COLOR][/B]",thumbnail="http://i.imgur.com/BNQwcS6.png",fanart=fondo,folder=True,isPlayable=False)
	plugintools.add_item(action="cambia_hora_marcador",url="",title="[COLOR skyblue][B]- Cambiar Diferencia Horaria -[/COLOR][/B]",thumbnail="http://image.slidesharecdn.com/1esopresentaciontema1-110109052848-phpapp02/95/tema-1-la-tierra-1-eso-28-728.jpg?cb=1294550960",fanart=fondo,folder=True,isPlayable=False)
	plugintools.add_item(action="",url="",title="",thumbnail=logo, fanart=fondo, folder=False, isPlayable=False)

	#***********  Control de Diferencias Horarias DarioMO 15-10-16  *******************
	if not os.path.exists(fich_hora):
		diferencia = "00:00"
		file_hora=open(fich_hora, "w+")
		file_hora.write("00:00")
		file_hora.close()
	else:
		file_hora=open(fich_hora, "r")
		diferencia = file_hora.read()
		file_hora.close()
	#***********  Control de Diferencias Horarias DarioMO 15-10-16  *******************

	diferencia = diferencia + ":00"
	dias = plugintools.find_multiple_matches(data,'<dia>(.*?)<fin dia>')

	from datetime import datetime, timedelta

	for item in dias:
		dia = "             [COLOR white]Día: " + plugintools.find_single_match(item,'(.*?)<')
		plugintools.add_item(action="",url="",title=dia,thumbnail=logo, fanart=fondo, folder=False, isPlayable=False)
		
		lineas = plugintools.find_multiple_matches(item,'<linea>(.*?)<fin')
		
		for item2 in lineas:
			linea = item2 + "<"
			hora = plugintools.find_single_match(linea,'<hora>(.*?)<')
			competicion = plugintools.find_single_match(linea,'<competi>(.*?)<')
			partido = plugintools.find_single_match(linea,'<partido>(.*?)<')
			canal = ">" +  plugintools.find_single_match(linea,'<canal>(.*?)<') + "<"
			
			logo_ext = plugintools.find_single_match(linea,'<logo>(.*?)<')

			if len(hora) > 0:
				#***********  Control de Diferencias Horarias DarioMO 15-10-16  *******************
				hora_esp = hora.replace("[COLOR lightblue]","").replace("h[/COLOR]","").strip()
				hora_esp = hora_esp + ":00"  # Añado los segundos
				hora_dif = diferencia + ":00"  # Añado los segundos
				lista_esp = hora_esp.split(":")
				lista_dif = diferencia.replace("-","").split(":")

				esp_hora=int(lista_esp[0])
				esp_minuto=int(lista_esp[1])
				esp_segundo=int(lista_esp[2])

				dif_hora=int(lista_dif[0])
				dif_minuto=int(lista_dif[1])
				dif_segundo=int(lista_dif[2])

				h1 = datetime(2012, 12, 12, esp_hora, esp_minuto, 0)
				
					
				dh = timedelta(hours=dif_hora) 
				dm = timedelta(minutes=dif_minuto)          
				ds = timedelta(seconds=dif_segundo)
				
				
				if "-" in diferencia:  # Hay que restar horas
					resultado1 =h1 - ds
					resultado2 = resultado1 - dm
					resultado = resultado2 - dh
				else:  # Hay que sumar Horas
					resultado1 =h1 + ds
					resultado2 = resultado1 + dm
					resultado = resultado2 + dh

				
				hora="[COLOR lightblue]" + resultado.strftime("%H:%M:%S") + "h[/COLOR]"
				hora = hora.replace(":00h","h")
				#***********  Control de Diferencias Horarias DarioMO 15-10-16  *******************
			
			#if len(canal) > 1:
			canal2 = canal.replace(">" , "").replace("<" , "").replace("-Acestream" , "a-Acestream")
			if len(canal) > 3:  # Hay mas de 1 canal y seguramente acestream 31-10-16
				letrero = "Canales: "
				completa = hora + "   [COLOR white](" + competicion + ") - [/COLOR]" + partido + "    [COLOR white][I][ "+letrero+canal2+" ] [/COLOR][/I]"
				if len(logo_ext) > 0:
					logo = logo_ext

				plugintools.add_item(action="tumarcador_canales",url=canal,title=completa,thumbnail=logo, fanart=fondo, folder=True, isPlayable=False)
				
			else:
				letrero = "Canal: "
			
				canal_regex = canal2

				el_canal = "http://tumarcador.xyz/canal" + canal_regex + ".php"
					
				completa = hora + "   [COLOR white](" + competicion + ") - [/COLOR]" + partido + "    [COLOR white][I][ "+letrero+canal2+" ] [/COLOR][/I]"
				lanzo_spd = url_montada.replace("MI_CANAL", el_canal)
				if len(logo_ext) > 0:
					logo = logo_ext

				plugintools.runAddon(action="runPlugin",url=lanzo_spd,title=completa,thumbnail=logo, fanart=fondo, folder=False, isPlayable=True)
		
				
	return
Ejemplo n.º 15
0
def abrekosmipop_lista(params):
    busqueda = params.get("url")
    fanart = params.get("fanart")
    titulo = params.get("title")
    thumbnail = params.get("thumbnail")

    mi_ref = "http://" + plugintools.find_single_match(busqueda,
                                                       "http://(.*?)/")

    if busqueda.find("gallery") < 0:
        if busqueda.find("/list,") >= 0:
            lista = busqueda.replace("/list,", "/gallery,")
        else:
            lista = busqueda.strip() + "/gallery,1,1"
    else:
        lista = busqueda.strip()
    #Me aseguro empezar x la 1ª
    lista = "http" + plugintools.find_single_match(
        lista, 'http(.*?)gallery,') + "gallery,1,1"

    num_pag = 1

    headers = {
        "User-Agent":
        'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0',
        "Referer": lista
    }
    r = requests.get(lista, headers=headers)
    data = r.content

    logo = thumbnail

    videos = plugintools.find_multiple_matches(data, '<li data-file-id(.*?)>')
    num_vid1 = len(videos)
    pag_sig = "http://" + plugintools.find_single_match(
        lista, 'http://(.*?)gallery,') + "gallery,1," + str(num_pag + 1)

    plugintools.add_item(
        action="",
        url="",
        title="[COLOR yellow][I]              ····[COLOR skyblue]" + titulo +
        "[COLOR yellow]····[/COLOR]",
        thumbnail=thumbnail,
        fanart=fanart,
        folder=False,
        isPlayable=False)
    plugintools.add_item(action="",
                         url="",
                         title="",
                         thumbnail=thumbnail,
                         fanart=fanart,
                         folder=False,
                         isPlayable=False)

    titulo_list = titulo

    salir = False
    #Voy a comprobar el nº de pag. q tiene, pues cada 1 tiene mas que la anterior, exepto la q ya "no existe", que tiene el mismo nº q la última
    while salir == False:

        headers = {
            "User-Agent":
            'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0',
            "Referer": pag_sig
        }
        r = requests.get(pag_sig, headers=headers)
        data = r.content

        videos = plugintools.find_multiple_matches(data,
                                                   '<li data-file-id(.*?)>')
        num_vid2 = len(videos)

        if num_vid2 > num_vid1:  #Es una pag. siguiente real
            num_pag = num_pag + 1
            pag_sig = "http://" + plugintools.find_single_match(
                lista,
                'http://(.*?)gallery,') + "gallery,1," + str(num_pag + 1)
            salir = False
            num_vid1 = num_vid2
        else:
            salir = True

    headers = {
        "User-Agent":
        'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0',
        "Referer": pag_sig
    }
    r = requests.get(pag_sig, headers=headers)
    data = r.content

    videos = plugintools.find_multiple_matches(
        data, '<li data-file-id=(.*?)/a></h2>')

    videos_ord = []
    for item in videos:
        video = mi_ref + plugintools.find_single_match(item, 'href="(.*?)"')
        titu_vid = plugintools.find_single_match(item, 'preview">(.*?)<')
        url_montada = link_kosmipop.replace("MI_URL",
                                            video).replace("MI_REF", mi_ref)

        linea_ord = titu_vid.title() + ">>>>" + url_montada
        videos_ord.append(linea_ord)

        ##Así no me funciona
        ##plugintools.add_item(action="runPlugin",url=link_kosmipop.replace("MI_URL", video).replace("MI_REF", mi_ref),title="[COLOR white]"+titu_vid+"[/COLOR]",thumbnail=logo,fanart=fanart,folder=False,isPlayable=True)
        #plugintools.add_item(action="lanza_cosmipop",url=url_montada, title="[COLOR white]"+titu_vid+"[/COLOR]",thumbnail=logo,fanart=fanart,folder=False,isPlayable=True)

    videos_ord.sort()

    letra = ""
    for item in videos_ord:
        titu = plugintools.find_single_match(item, '(.*?)>>>>').strip()
        url_montada = plugintools.find_single_match(item, '>>>>(.*)').strip()

        if titu[:1] <> letra:
            letra = titu[:1]

            plugintools.add_item(action="",
                                 url="",
                                 title="[COLOR blue][I]**" + letra +
                                 "**[/I][/COLOR]",
                                 thumbnail=logo,
                                 fanart=fanart,
                                 folder=False,
                                 isPlayable=False)

        datamovie = {}
        plugintools.runAddon(action="runPlugin",
                             title='[COLOR white]' + titu + '[/COLOR]',
                             url=url_montada,
                             info_labels=datamovie,
                             thumbnail=logo,
                             fanart=fanart,
                             folder=False,
                             isPlayable=False)
Ejemplo n.º 16
0
def abredaily_lista(params):
    busqueda = params.get("url")
    fanart = params.get("fanart")
    titulo = params.get("title")
    thumbnail = params.get("thumbnail")

    mi_ref = "http://" + plugintools.find_single_match(busqueda,
                                                       "http://(.*?)/")

    busqueda0 = busqueda
    busqueda = busqueda + "/1"
    pagina = 1
    headers = {
        "User-Agent":
        'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0',
        "Referer": busqueda
    }
    r = requests.get(busqueda, headers=headers)
    data = r.content

    videos = plugintools.find_multiple_matches(data,
                                               'class="preview(.*?)/div><img')

    if len(videos) == 0:
        salir = True
        pagina = 1
    else:
        salir = False

    videos_ord = []
    while salir == False:  # Usa múltiples páginas
        for item in videos:
            video = mi_ref + plugintools.find_single_match(
                item, 'href="(.*?)"')
            titu_vid = plugintools.find_single_match(item, 'title="(.*?)"')
            logo_vid = plugintools.find_single_match(
                item, 'data-src="(.*?)"').strip()
            duracion = plugintools.find_single_match(
                item, 'duration">(.*?)<').strip()
            url_montada = link_daily.replace("MI_URL",
                                             video).replace("MI_REF", mi_ref)

            linea_ord = titu_vid.title(
            ) + ">>>>1" + url_montada + "2>>>>2" + logo_vid + "3>>>>3" + duracion
            videos_ord.append(linea_ord)

        pagina = pagina + 1
        busqueda = busqueda0 + "/" + str(pagina)
        headers = {
            "User-Agent":
            'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0',
            "Referer": busqueda
        }
        r = requests.get(busqueda, headers=headers)
        data = r.content

        videos = plugintools.find_multiple_matches(
            data, 'class="preview(.*?)/div><img')

        if len(videos) == 0:
            salir = True
            pagina = 1
        else:
            salir = False

    videos_ord.sort()

    logo = thumbnail

    letra = ""
    for item in videos_ord:
        titu = plugintools.find_single_match(item, '(.*?)>>>>1').strip()
        url_montada = plugintools.find_single_match(item,
                                                    '>>>>1(.*)2>>>>2').strip()
        logo = plugintools.find_single_match(item, '>>>>2(.*)3>>>>3').strip()
        duracion = plugintools.find_single_match(item, '>>>>3(.*)').strip()

        titu = titu + "     [I][COLOR red](" + duracion + ")[/I]"

        if titu[:1] <> letra:
            letra = titu[:1]

            plugintools.add_item(action="",
                                 url="",
                                 title="[COLOR blue][I]**" + letra +
                                 "**[/I][/COLOR]",
                                 thumbnail=logo,
                                 fanart=fanart,
                                 folder=False,
                                 isPlayable=False)

        datamovie = {}
        plugintools.runAddon(action="runPlugin",
                             title='[COLOR white]' + titu + '[/COLOR]',
                             url=url_montada,
                             info_labels=datamovie,
                             thumbnail=logo,
                             fanart=fanart,
                             folder=False,
                             isPlayable=False)