Exemplo n.º 1
0
def playstream(name, iconimage, url):
    if url.startswith("sop://"):
        sop.sopstreams(name, iconimage, url)
    elif url.startswith("acestream://"):
        ace.acestreams(name, iconimage, url)
    elif (url.startswith("http://")) or (url.startswith("https://")) or (
            url.startswith("rtmp://")) or (url.startswith("rtsp://")) or (
                url.startswith("mmsh://")):
        if settings.getSetting('addon_history') == "true":
            try:
                add_to_history(name, str(url), 15, iconimage)
            except:
                pass
        playlist = xbmc.PlayList(1)
        playlist.clear()
        listitem = xbmcgui.ListItem(name,
                                    iconImage=iconimage,
                                    thumbnailImage=iconimage)
        listitem.setLabel(name)
        listitem.setInfo("Video", {"Title": name})
        listitem.setProperty('mimetype', 'video/x-msvideo')
        listitem.setProperty('IsPlayable', 'true')
        listitem.setPath(url)
        playlist.add(url, listitem)
        xbmc.Player().play(playlist)
    else:
        messageok(translate(30000), translate(30182))
Exemplo n.º 2
0
def test_channel():
    keyb = xbmc.Keyboard('', translate(30166))
    keyb.doModal()
    if (keyb.isConfirmed()):
        search = keyb.getText()
        if search == '': sys.exit(0)
        else:
            if search.startswith("acestream://"):
                url_addr = search
                ace.acestreams(
                    translate(30020) + ' ( ' + str(url_addr) + ')', '',
                    str(url_addr))
            elif search.startswith("sop://"):
                url_addr = search
                sop.sopstreams(
                    translate(30021) + ' ( ' + str(url_addr) + ')', '',
                    str(url_addr))
            elif (search.startswith("http://")) or (search.startswith(
                    "https://")) or (search.startswith("rtmp://")) or (
                        search.startswith("rtsp://")) or (
                            search.startswith("mmsh://")):
                url_addr = search
                playstream(
                    translate(30021) + ' ( ' + str(url_addr) + ')', '',
                    str(url_addr))
            elif search.startswith("sopid:"):
                url_addr = str(search).replace("sopid:", "")
                sop.sopstreams(
                    translate(30020) + ' ( ' + str(url_addr) + ')', '',
                    str(url_addr))
            else:
                messageok(translate(30000), translate(30011))
Exemplo n.º 3
0
def rojadirecta_resolver(name, url):
    print name, url
    if "sop://" not in url and "acestream://" not in url:
        if "http://" not in url:
            url = "http://" + url
        try:
            source = abrir_url(url)
        except:
            source = ""
            mensagemok(traducao(40000), traducao(40128))
        matchredirect = re.compile('<frame src="(.+?)"').findall(source)
        matchsop = re.compile('sop://(.+?)"').findall(source)
        if matchsop:
            sop.sopstreams(name, os.path.join(current_dir, 'icon.png'),
                           "sop://" + matchsop[0])
        else:
            match = re.compile('this.loadPlayer\("(.+?)"').findall(source)
            if match:
                ace.acestreams(name, os.path.join(current_dir, 'icon.png'),
                               match[0])
            else:
                if matchredirect:
                    rojadirecta_resolver(name, matchredirect[0])
                else:
                    mensagemok(traducao(40000), traducao(40022))
    elif "sop://" in url:
        so.sopstreams(name, os.path.join(current_dir, 'icon.png'), url)
    elif "acestream://" in url:
        ace.acestreams(name, os.path.join(current_dir, 'icon.png'), url)
    else:
        mensagemok(traducao(40000), traducao(40022))
Exemplo n.º 4
0
def rojadirecta_resolver(name,url):
	if "sop://" not in url and "acestream://" not in url:
		if "http://" not in url: 
			url="http://"+url
			
		if 'arenavision' in url:
			headers = {
				"Cookie" : "beget=begetok; has_js=1;"
			}
			try:
				source = requests.get(url,headers=headers).text
			except: source="";xbmcgui.Dialog().ok(translate(40000),translate(40128))
		else:
			try:
				source = get_page_source(url)
			except: source = "";xbmcgui.Dialog().ok(translate(40000),translate(40128))
		matchredirect = re.compile('<(?:frame|FRAME|iframe) (?:SRC|src)="(.+?)"').findall(source)
		matchsop = re.compile('sop://(.+?)"').findall(source)
		if matchsop: sop.sopstreams(name,os.path.join(current_dir,'icon.png'),"sop://" + matchsop[0])
		else:
			match = re.compile('this.loadPlayer\("(.+?)"').findall(source)
			if match: ace.acestreams(name,os.path.join(current_dir,'icon.png'),match[0])
			else: 
				if matchredirect:
					if '/' not in matchredirect[0]: redirect_url = url + '/' + matchredirect[0]
					else: redirect_url = matchredirect[0]
					rojadirecta_resolver(name,redirect_url)
				else:
					xbmcgui.Dialog().ok(translate(40000),translate(40022))
	elif "sop://" in url: sop.sopstreams(name,os.path.join(current_dir,'icon.png'),url)
	elif "acestream://" in url: ace.acestreams(name,os.path.join(current_dir,'icon.png'),url)
	else: xbmcgui.Dialog().ok(translate(40000),translate(40022))		
Exemplo n.º 5
0
def tron_play(name, url):
    conteudo = clean(get_page_source('http://m.tvron.net' + url))
    blogpost = re.findall(
        '<div id="servere"><div class="smb">(.+?)<div id="programinfo">',
        conteudo, re.DOTALL)
    if blogpost:
        ender = []
        titulo = []
        match = re.compile(
            '<a class="server" href="(.+?)" target="_blank"><img src=".+?">(.+?)</a>'
        ).findall(blogpost[0])
        for address, nume in match:
            if "sop://" in address:
                titulo.append('' + nume + ' - ' + name + ' sopcast link')
                ender.append(address)
            elif "acestream://" in address:
                titulo.append('' + nume + ' - ' + name + ' acestream link')
                ender.append(address)
            else:
                pass
        if ender and titulo:
            index = xbmcgui.Dialog().select(translate(40023), titulo)
            if index > -1:
                nomeescolha = titulo[index]
                linkescolha = ender[index]
                if re.search('acestream', nomeescolha,
                             re.IGNORECASE) or re.search(
                                 'TorrentStream', nomeescolha, re.IGNORECASE):
                    ace.acestreams(nomeescolha, '', linkescolha)
                elif re.search('sopcast', nomeescolha, re.IGNORECASE):
                    sop.sopstreams(nomeescolha, '', linkescolha)
                else:
                    xbmcgui.Dialog().ok(translate(40000), translate(40024))
    else:
        xbmcgui.Dialog().ok(translate(40000), translate(40008))
Exemplo n.º 6
0
def arenavision_streams(name, url):
    headers = {
        'Connection': 'keep-alive',
        'Pragma': 'no-cache',
        'Cache-Control': 'no-cache',
        'Upgrade-Insecure-Requests': '1',
        'User-Agent':
        'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36',
        'Accept':
        'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
        'Accept-Encoding': 'gzip, deflate',
        'Accept-Language': 'es-ES,es;q=0.9,ca;q=0.8,en;q=0.7',
        'Cookie': 'beget=begetok; has_js=1;'
    }
    try:
        source = requests.get(url, headers=headers).text
    except:
        source = ""
        xbmcgui.Dialog().ok(translate(40000), translate(40128))
    if source:
        match = re.compile('sop://(.+?)"').findall(source)
        if match:
            sop.sopstreams(name, os.path.join(current_dir, "icon.png"),
                           "sop://" + match[0])
        else:
            match = re.compile('href="(acestream://.+?)"').findall(source)
            if match:
                ace.acestreams(name, os.path.join(current_dir, "icon.png"),
                               match[0])
            else:
                xbmcgui.Dialog().ok(translate(40000), translate(40022))
Exemplo n.º 7
0
def go_to_id(p2p_type):
    if p2p_type == 'ace':
        keyb = xbmc.Keyboard('', translate(40033))
        keyb.doModal()
        if (keyb.isConfirmed()):
            search = keyb.getText()
            if search == '': sys.exit(0)
            else:
                channel_id = search
                ace.acestreams(
                    translate(40035) + ' ( ' + str(channel_id) + ')', '',
                    str(channel_id))
    elif p2p_type == 'sop_id':
        channel_id = xbmcgui.Dialog().numeric(0, translate(40033))
        sop.sopstreams(
            translate(40035) + ' ( ' + str(channel_id) + ')', '',
            str(channel_id))
    elif p2p_type == 'sop_url':
        keyb = xbmc.Keyboard('sop://', translate(40034) + ' sop://')
        keyb.doModal()
        if (keyb.isConfirmed()):
            search = keyb.getText()
            if search == '': sys.exit(0)
            else:
                channel_id = search
                sop.sopstreams(
                    translate(40036) + ' ( ' + str(channel_id) + ')', '',
                    str(channel_id))
Exemplo n.º 8
0
def sopcast_ucoz_play(name, url):
    conteudo = clean(get_page_source(url))
    blogpost = re.findall('<tr><td class="eMessage">(.*?)<tr><td colspan',
                          conteudo, re.DOTALL)
    if blogpost:
        ender = []
        titulo = []
        match = re.compile('br.+?>(.+?)<').findall(blogpost[0])
        for address in match:
            if "sop://" in address:
                titulo.append('Sopcast [' + address + ']')
                ender.append(address)
            elif "(ace stream)" in address:
                titulo.append('Acestream [' +
                              address.replace(' (ace stream)', '') + ']')
                ender.append(address.replace(' (ace stream)', ''))
            else:
                pass
        if ender and titulo:
            index = xbmcgui.Dialog().select(translate(40023), titulo)
            if index > -1:
                nomeescolha = titulo[index]
                linkescolha = ender[index]
                if re.search('acestream', nomeescolha,
                             re.IGNORECASE) or re.search(
                                 'TorrentStream', nomeescolha, re.IGNORECASE):
                    ace.acestreams(nomeescolha, '', linkescolha)
                elif re.search('sopcast', nomeescolha, re.IGNORECASE):
                    sop.sopstreams(nomeescolha, '', linkescolha)
                else:
                    xbmcgui.Dialog().ok(translate(40000), translate(40024))
    else:
        xbmcgui.Dialog().ok(translate(40000), translate(40008))
Exemplo n.º 9
0
def tron_play(name, url):
    conteudo = clean(get_page_source(url))
    blogpost = re.findall(
        '<div class="player player-ch">(.+?)<div class="play-info">', conteudo,
        re.DOTALL)
    if blogpost:
        ender = []
        titulo = []
        match = re.compile('href="(acestream://|sop://.+?)"').findall(
            blogpost[0])
        for address in match:
            if "sop://" in address:
                titulo.append('sopcast link')
                ender.append(address)
            elif "acestream://" in address:
                titulo.append('acestream link')
                ender.append(address)
            else:
                pass
        if ender and titulo:
            index = xbmcgui.Dialog().select(translate(40023), titulo)
            if index > -1:
                nomeescolha = titulo[index]
                linkescolha = ender[index]
                if re.search('acestream', nomeescolha,
                             re.IGNORECASE) or re.search(
                                 'TorrentStream', nomeescolha, re.IGNORECASE):
                    ace.acestreams(nomeescolha, '', linkescolha)
                elif re.search('sopcast', nomeescolha, re.IGNORECASE):
                    sop.sopstreams(nomeescolha, '', linkescolha)
                else:
                    xbmcgui.Dialog().ok(translate(40000), translate(40024))
    else:
        xbmcgui.Dialog().ok(translate(40000), translate(40008))
Exemplo n.º 10
0
def onetorrent_resolver(name,url):
	try:
		conteudo=abrir_url(url)
	except: conteudo = ''
	if conteudo:
		try:torrent=re.compile('this.loadTorrent.+?"(.+?)",').findall(conteudo)[0]
		except:torrent=re.compile('this.loadPlayer.+?"(.+?)",').findall(conteudo)[0]
		logo=re.compile('<img id="cur_logo" src="(.+?)">').findall(conteudo)[0]
		ace.acestreams(name,base_url + logo,torrent)
Exemplo n.º 11
0
def deporteshd1_streams(name, url):
	try:
		source = get_page_source(url)
	except: source="";xbmcgui.Dialog().ok(translate(40000),translate(40128))

	if source:
		aceHash = re.search('<a href="acestream://(.+?)">', source.replace('\n', ''))
		if aceHash:
			ace.acestreams(name, os.path.join(current_dir,'icon.png'), aceHash.group(1))
Exemplo n.º 12
0
def onetorrent_resolver(name,url):
	try:
		conteudo=get_page_source(url)
	except: conteudo = ''
	if conteudo:
		try:torrent=re.compile('this.loadTorrent.+?"(.+?)",').findall(conteudo)[0]
		except:torrent=re.compile('this.loadPlayer.+?"(.+?)",').findall(conteudo)[0]
		logo=re.compile('<img id="cur_logo" src="(.+?)">').findall(conteudo)[0]
		ace.acestreams(name,base_url + logo,torrent)
Exemplo n.º 13
0
def onetorrent_resolver(name,url):
	try:
		conteudo=get_page_source(url)
	except: conteudo = ''
	if conteudo:
		try:torrent=re.findall('this.loadTorrent.+?"(.+?)",', conteudo)[0]
		except:torrent=re.findall('this.loadPlayer.+?"(.+?)",', conteudo)[0]
		logo=re.findall('<img id="cur_logo" src="(.+?)">', conteudo)[0]
		ace.acestreams(name,base_url + logo,torrent)
Exemplo n.º 14
0
def arenavision_streams(name,url):
	try:
		source = abrir_url(url)
	except: source="";mensagemok(traducao(40000),traducao(40128))
	if source:
		match = re.compile('sop://(.+?)"').findall(source)
		if match: sop.sopstreams(name,os.path.join(current_dir,"icon.png"),"sop://" + match[0])
		else:
			match = re.compile('this.loadPlayer\("(.+?)"').findall(source)
			if match: ace.acestreams(name,os.path.join(current_dir,"icon.png"),match[0])
			else: mensagemok(traducao(40000),traducao(40022))
Exemplo n.º 15
0
def onetorrent_resolver(name, url):
    try:
        conteudo = get_page_source(url)
    except:
        conteudo = ''
    if conteudo:
        try:
            torrent = re.findall('\"stream_url\":\"(.+?)\"', conteudo)[0]
        except:
            torrent = re.findall('\"stream_url\":\"(.+?)\"', conteudo)[0]
        logo = re.findall('\"logo\":\"(.+?)\"', conteudo)[0]
        ace.acestreams(name, base_url + logo, torrent)
Exemplo n.º 16
0
def lfol_play_stream(name,url,iconimage):
	try:
		source = requests.get(url).text
	except: source="";xbmcgui.Dialog().ok(translate(40000),translate(40128))
	if source:
		match = re.compile('href="(acestream\:.+?)">').findall(source)
		match2 = re.compile('href="(sop\:.+?)">').findall(source)
		if match:
			ace.acestreams(name, iconimage, match[0])
		elif match2:
			sop.sopstreams(name, iconimage, match2[0])
		else:
			xbmcgui.Dialog().ok(translate(40000),translate(40022))
Exemplo n.º 17
0
def deporteshd1_streams(name, url):
    try:
        source = get_page_source(url)
    except:
        source = ""
        xbmcgui.Dialog().ok(translate(40000), translate(40128))

    if source:
        aceHash = re.search('<a href="acestream://(.+?)">',
                            source.replace('\n', ''))
        if aceHash:
            ace.acestreams(name, os.path.join(current_dir, 'icon.png'),
                           aceHash.group(1))
Exemplo n.º 18
0
def parser_resolver(name,url,icon,depth=0):
    if "sop://" not in url and "acestream://" not in url:
        if "http://" not in url:
            url="http://"+url

        if 'arenavision' in url:
            headers = {
                "Cookie" : "beget=begetok; has_js=1;"
            }
            try:
                source = requests.get(url,headers=headers).text
            except: source="";xbmcgui.Dialog().ok(translate(40000),translate(40128))
        else:
            try:
                source = get_page_source(url)
            except: source = "";xbmcgui.Dialog().ok(translate(40000),translate(40128))

        patternList = ['(sop://[^ "\']+)',                   # Sopcast
                       '(?:acestream://|this.loadPlayer\(["\'])([^"\']+)["\']', # AceStream
                       '<i?frame[^>]+src=["\']([^>]+?)["\']' # iframes
                      ]

        allPatterns = "|".join(patternList)

        matchs = re.findall(allPatterns, source, re.IGNORECASE)
        iframes = []
        for match in matchs:
            if match[0]:
                sop.sopstreams(name,icon,match[0])
                return match[0]
            elif match[1]:
                ace.acestreams(name,icon,match[1])
                return match[1]
            else:
                iframes.append(match[2])

        for iframe in iframes:
            redirect_url = iframe if '/' in iframe else url + '/' + iframe
            if depth < 2:
                found = parser_resolver(name,redirect_url,icon,depth+1)
                if found: return found

        if depth == 0:
            xbmcgui.Dialog().ok(translate(40000),translate(40022))

        return None

    elif "sop://" in url: sop.sopstreams(name,icon,url)
    else: ace.acestreams(name,icon,url)

    return url
Exemplo n.º 19
0
def arenavision_streams(name,url):
	headers = {
		"Cookie" : "beget=begetok; has_js=1;"
	}
	try:
		source = requests.get(url,headers=headers).text
	except: source="";xbmcgui.Dialog().ok(translate(40000),translate(40128))
	if source:
		match = re.compile('sop://(.+?)"').findall(source)
		if match: sop.sopstreams(name,os.path.join(current_dir,"icon.png"),"sop://" + match[0])
		else:
			match = re.compile('this.loadPlayer\("(.+?)"').findall(source)
			if match: ace.acestreams(name,os.path.join(current_dir,"icon.png"),match[0])
			else: xbmcgui.Dialog().ok(translate(40000),translate(40022))
Exemplo n.º 20
0
def arenavision_streams(name,url):
	headers = {
		"Cookie" : "beget=begetok; has_js=1;"
	}
	try:
		source = requests.get(url,headers=headers).text
	except: source="";xbmcgui.Dialog().ok(translate(40000),translate(40128))
	if source:
		match = re.compile('sop://(.+?)"').findall(source)
		if match: sop.sopstreams(name,os.path.join(current_dir,"icon.png"),"sop://" + match[0])
		else:
			match = re.compile('this.loadPlayer\("(.+?)"').findall(source)
			if match: ace.acestreams(name,os.path.join(current_dir,"icon.png"),match[0])
			else: xbmcgui.Dialog().ok(translate(40000),translate(40022))
Exemplo n.º 21
0
def lfol_play_stream(name, url, iconimage):
    try:
        source = requests.get(url).text
    except:
        source = ""
        xbmcgui.Dialog().ok(translate(40000), translate(40128))
    if source:
        match = re.compile('href="(acestream\:.+?)">').findall(source)
        match2 = re.compile('href="(sop\:.+?)">').findall(source)
        if match:
            ace.acestreams(name, iconimage, match[0])
        elif match2:
            sop.sopstreams(name, iconimage, match2[0])
        else:
            xbmcgui.Dialog().ok(translate(40000), translate(40022))
Exemplo n.º 22
0
def arenavision_streams(name, url):
    try:
        source = abrir_url(url)
    except:
        source = ""
        mensagemok(traducao(40000), traducao(40128))
    if source:
        match = re.compile('sop://(.+?)"').findall(source)
        if match:
            sop.sopstreams(name, os.path.join(current_dir, "icon.png"),
                           "sop://" + match[0])
        else:
            match = re.compile('this.loadPlayer\("(.+?)"').findall(source)
            if match:
                ace.acestreams(name, os.path.join(current_dir, "icon.png"),
                               match[0])
            else:
                mensagemok(traducao(40000), traducao(40022))
Exemplo n.º 23
0
def rojadirecta_resolver(name, url):
    if "sop://" not in url and "acestream://" not in url:
        if "http://" not in url:
            url = "http://" + url

        if 'arenavision' in url:
            headers = {"Cookie": "beget=begetok; has_js=1;"}
            try:
                source = requests.get(url, headers=headers).text
            except:
                source = ""
                xbmcgui.Dialog().ok(translate(40000), translate(40128))
        else:
            try:
                source = get_page_source(url)
            except:
                source = ""
                xbmcgui.Dialog().ok(translate(40000), translate(40128))
        matchredirect = re.compile(
            '<(?:frame|FRAME|iframe) (?:SRC|src)="(.+?)"').findall(source)
        matchsop = re.compile('sop://(.+?)"').findall(source)
        if matchsop:
            sop.sopstreams(name, os.path.join(current_dir, 'icon.png'),
                           "sop://" + matchsop[0])
        else:
            match = re.compile('this.loadPlayer\("(.+?)"').findall(source)
            if match:
                ace.acestreams(name, os.path.join(current_dir, 'icon.png'),
                               match[0])
            else:
                if matchredirect:
                    if '/' not in matchredirect[0]:
                        redirect_url = url + '/' + matchredirect[0]
                    else:
                        redirect_url = matchredirect[0]
                    rojadirecta_resolver(name, redirect_url)
                else:
                    xbmcgui.Dialog().ok(translate(40000), translate(40022))
    elif "sop://" in url:
        sop.sopstreams(name, os.path.join(current_dir, 'icon.png'), url)
    elif "acestream://" in url:
        ace.acestreams(name, os.path.join(current_dir, 'icon.png'), url)
    else:
        xbmcgui.Dialog().ok(translate(40000), translate(40022))
Exemplo n.º 24
0
def rojadirecta_resolver(name,url):
	print name,url
	if "sop://" not in url and "acestream://" not in url:
		if "http://" not in url: 
			url="http://"+url
		try:
			source = abrir_url(url)
		except: source = "";mensagemok(traducao(40000),traducao(40128))
		matchredirect = re.compile('<frame src="(.+?)"').findall(source)
		matchsop = re.compile('sop://(.+?)"').findall(source)
		if matchsop: sop.sopstreams(name,os.path.join(current_dir,'icon.png'),"sop://" + matchsop[0])
		else:
			match = re.compile('this.loadPlayer\("(.+?)"').findall(source)
			if match: ace.acestreams(name,os.path.join(current_dir,'icon.png'),match[0])
			else: 
				if matchredirect:
					rojadirecta_resolver(name,matchredirect[0])
				else:
					mensagemok(traducao(40000),traducao(40022))
	elif "sop://" in url: so.sopstreams(name,os.path.join(current_dir,'icon.png'),url)
	elif "acestream://" in url: ace.acestreams(name,os.path.join(current_dir,'icon.png'),url)
	else: mensagemok(traducao(40000),traducao(40022))		
Exemplo n.º 25
0
def go_to_id(p2p_type):
	if p2p_type=='ace':
		keyb = xbmc.Keyboard('', translate(40033))
		keyb.doModal()
		if (keyb.isConfirmed()):
			search = keyb.getText()
			if search=='': sys.exit(0)
			else:
				channel_id = search
				ace.acestreams(translate(40035) + ' ( ' + str(channel_id) + ')','',str(channel_id))
	elif p2p_type=='sop_id':
		channel_id = xbmcgui.Dialog().numeric(0, translate(40033))
		sop.sopstreams(translate(40035) + ' ( ' + str(channel_id) + ')','',str(channel_id))
	elif p2p_type=='sop_url':
		keyb = xbmc.Keyboard('sop://', translate(40034) + ' sop://')
		keyb.doModal()
		if (keyb.isConfirmed()):
			search = keyb.getText()
			if search=='': sys.exit(0)
			else:
				channel_id = search
				sop.sopstreams(translate(40036) + ' ( ' + str(channel_id) + ')','',str(channel_id))
Exemplo n.º 26
0
def sopcast_ucoz_play(name, url):
    conteudo = clean(abrir_url(url))
    blogpost = re.findall('<tr><td class="eMessage">(.*?)<tr><td colspan',
                          conteudo, re.DOTALL)
    if blogpost:
        ender = []
        titulo = []
        match = re.compile('br.+?>(.+?)<').findall(blogpost[0])
        print match
        for address in match:
            if "sop://" in address:
                titulo.append('Sopcast [' + address + ']')
                ender.append(address)
            elif "(ace stream)" in address:
                titulo.append('Acestream [' +
                              address.replace(' (ace stream)', '') + ']')
                ender.append(address.replace(' (ace stream)', ''))
            else:
                pass
        if ender and titulo:
            index = xbmcgui.Dialog().select(traducao(40023), titulo)
            if index > -1:
                nomeescolha = titulo[index]
                linkescolha = ender[index]
                if re.search('acestream', nomeescolha,
                             re.IGNORECASE) or re.search(
                                 'TorrentStream', nomeescolha, re.IGNORECASE):
                    ace.acestreams(nomeescolha, '', linkescolha)
                elif re.search('sopcast', nomeescolha, re.IGNORECASE):
                    if xbmc.getCondVisibility('system.platform.windows'):
                        sopserver()
                    else:
                        sop.sopstreams(nomeescolha, '', linkescolha)
                else:
                    mensagemok(traducao(40000), traducao(40024))
    else:
        mensagemok(traducao(40000), traducao(40008))
Exemplo n.º 27
0
def play_stream_url(name, icon, url):
    if "sop://" in url: sop.sopstreams(name,icon,url)
    else: ace.acestreams(name,icon,url)
Exemplo n.º 28
0
def sopcast_ucoz_play(name,url):
    conteudo=clean(abrir_url(url))
    blogpost = re.findall('<tr><td class="eMessage">(.*?)<tr><td colspan', conteudo, re.DOTALL)
    if blogpost:
    	ender=[]
    	titulo=[]
    	match = re.compile('br.+?>(.+?)<').findall(blogpost[0])
	print match
    	for address in match:
    		if "sop://" in address:
    			titulo.append('Sopcast [' + address +']')
    			ender.append(address)
    		elif "(ace stream)" in address:
    			titulo.append('Acestream [' + address.replace(' (ace stream)','') +']')
    			ender.append(address.replace(' (ace stream)',''))
    		else: pass
    	if ender and titulo:
    		index = xbmcgui.Dialog().select(traducao(40023), titulo)
    		if index > -1:
    			nomeescolha=titulo[index]
    			linkescolha=ender[index]
    			if re.search('acestream',nomeescolha,re.IGNORECASE) or re.search('TorrentStream',nomeescolha,re.IGNORECASE): ace.acestreams(nomeescolha,'',linkescolha)
    			elif re.search('sopcast',nomeescolha,re.IGNORECASE):
                		if xbmc.getCondVisibility('system.platform.windows'):sopserver()
				else:sop.sopstreams(nomeescolha,'',linkescolha)
		        else: mensagemok(traducao(40000),traducao(40024))  
    else:
    	mensagemok(traducao(40000),traducao(40008))
Exemplo n.º 29
0
def sopcast_ucoz_play(name,url):
    conteudo=clean(get_page_source(url))
    blogpost = re.findall('<tr><td class="eMessage">(.*?)<tr><td colspan', conteudo, re.DOTALL)
    if blogpost:
    	ender=[]
    	titulo=[]
    	match = re.compile('br.+?>(.+?)<').findall(blogpost[0])
    	for address in match:
    		if "sop://" in address:
    			titulo.append('Sopcast [' + address +']')
    			ender.append(address)
    		elif "(ace stream)" in address:
    			titulo.append('Acestream [' + address.replace(' (ace stream)','') +']')
    			ender.append(address.replace(' (ace stream)',''))
    		else: pass
    	if ender and titulo:
    		index = xbmcgui.Dialog().select(translate(40023), titulo)
    		if index > -1:
    			nomeescolha=titulo[index]
    			linkescolha=ender[index]
    			if re.search('acestream',nomeescolha,re.IGNORECASE) or re.search('TorrentStream',nomeescolha,re.IGNORECASE): ace.acestreams(nomeescolha,'',linkescolha)
    			elif re.search('sopcast',nomeescolha,re.IGNORECASE): sop.sopstreams(nomeescolha,'',linkescolha)
		        else: xbmcgui.Dialog().ok(translate(40000),translate(40024))  
    else:
    	xbmcgui.Dialog().ok(translate(40000),translate(40008))