def ertete1(params): plugintools.log("[%s %s] ertete1 %s " % (addonName, addonVersion, repr(params))) url = params.get("url") body = plugintools.read(url) iframe = plugintools.find_single_match( body, '<iframe width="728" height="420"(.*?)</iframe>') iframe_link = plugintools.find_single_match(iframe, 'src="([^"]+)') iframe_link = 'http://ertete.com' + iframe_link ref = iframe_link plugintools.log("iframe_link= " + iframe_link) bodi = plugintools.read(iframe_link) plugintools.log("bodi= " + bodi) bloque_rtmp = plugintools.find_single_match( bodi, "<script type='text/javascript'(.*?)<div") if bloque_rtmp != "": plugintools.log("bloque_rtmp= " + bloque_rtmp) swf = plugintools.find_single_match(bloque_rtmp, "src='([^']+)") plugintools.log("swf= " + swf) width = plugintools.find_single_match(bloque_rtmp, "width=([^,]+)") plugintools.log("width= " + width) height = plugintools.find_single_match(bloque_rtmp, "height=([^,]+)") plugintools.log("height= " + height) channel = plugintools.find_single_match(bloque_rtmp, "channel='([^']+)") plugintools.log("channel= " + channel) else: bloque_rtmp = plugintools.find_single_match( bodi, '<script type="text/javascript"(.*?)<div') plugintools.log("bloque_rtmp= " + bloque_rtmp) swf = plugintools.find_single_match(bloque_rtmp, 'src="([^"]+)') plugintools.log("swf= " + swf) width = plugintools.find_single_match(bloque_rtmp, "width=([^&]+)") plugintools.log("width= " + width) height = plugintools.find_single_match(bloque_rtmp, "height=([^&]+)") plugintools.log("height= " + height) channel = plugintools.find_single_match(bloque_rtmp, "embed/(.*?)&width") plugintools.log("channel= " + channel) if swf.find("broadcastlive") >= 0: pageurl = 'http://1broadcastlive.com/embed/embed.php?channel=' + channel + '&w=' + width + '&h=' + height params = plugintools.get_params() params[ "url"] = 'swfUrl=' + swf + ' pageUrl=' + pageurl + ' referer=' + ref broadcastlive1(params) elif swf.find("iguide") >= 0: # Crear regex de iguide!! # http://www.iguide.to/embedplayer_new.php?width=728&height=420&channel=31086&autoplay=true pageurl = 'http://www.iguide.to/embedplayer_new.php?width=' + width + '&height=' + height + '&channel=' + channel + '&autoplay=true' body = gethttp_referer_headers(pageurl, ref) plugintools.log("body= " + body) playpath = plugintools.find_single_match(body, "'file': '(.*?).flv") plugintools.log("playpath= " + playpath) token = '#ed%h0#w18623jsda6523lDGD' url = 'rtmp://safe.iguide.to/iguide playpath=' + playpath + ' swfUrl=http://cdn.iguide.to/player/secure_player_iguide_embed_token.swf pageUrl=' + pageurl + ' token=' + token print url plugintools.play_resolved_url(url)
def Lidl_playlists(params): plugintools.log("Lidl_playlists") data = plugintools.read(params.get("url")) pattern = '<article class="teaser(.*?)class="lazyload"' #plugintools.log("pattern="+pattern) matches = plugintools.find_multiple_matches(data, pattern) for i in matches: #plugintools.log("matches = "+i) title = plugintools.find_single_match(i, '<img alt="(.*?)"') title = replace_html(title) #plugintools.log("title = " + title) thumbnail = "https://www.lidl.es" + plugintools.find_single_match( i, 'src="(.*?)"') url = "https://www.lidl.es" + plugintools.find_single_match( i, 'href="(.*?)"') tplot = plugintools.read(url) plot = plugintools.find_single_match( tplot, 'textbody--links-brand-primary">(.*?)</div>').strip() plot = replace_html(plot) plugintools.add_item(action="Lidl_recetas_playlists", title=title, thumbnail=thumbnail, url=url, plot=plot, isPlayable=False, folder=True)
def ezcast(url, ref, res): #print "NEDEFINIT";sys.exit() p = re.compile(ur'(width|height|channel)=\'?"?([^\,\'"]+)') par = re.findall(p, str(res)) #print par; w = par[0][1] h = par[1][1] c = par[2][1] ref = url url = 'http://www.ezcast.tv/embedded/' + c + '/1/' + w + '/' + h body = '' bodi = curl_frame(url, ref, body) p = 'SWFObject\(\'?"?([^\'"]+)' swf = 'http://www.ezcast.tv' + plugintools.find_single_match(bodi, p) p = 'FlashVars\'?"?,?\s?\'?"?([^\'"]+)' flashvars = plugintools.find_single_match(bodi, p) p = re.compile(ur'\&?=([^\&]+)') flvs = re.findall(p, flashvars) id = flvs[0] c = flvs[1] lb = 'http://ezcast.tv:1935/loadbalancer' lb = plugintools.read(lb) lb = plugintools.find_single_match(lb, 'redirect=(.*)') media_url = 'rtmp://' + lb + '/live/ playpath=' + c + '?id=' + id + ' swfUrl=' + swf + ' swfVfy=1 conn=S:OK live=true pageUrl=' + url plugintools.play_resolved_url(media_url)
def lsstv2(params): msg = "Resolviendo enlace ... " ref = params.get("url") data = plugintools.read( params.get("url") ) data = data.replace('&','&') data = data.replace('"',"'") #plugintools.log("LSS URL= "+data) thumbnail=params.get("thumbnail") title = params.get("meci") plot=params.get("plot") pattern = '\?(e=[^\'"]+)' match = plugintools.find_multiple_matches_multi_multi(data,pattern) match = sorted(list(set(match))) i=1 for id in match: url = "http://www.livesportstreams.tv/es/player.php?" + id + "@" + ref url=url.strip() plugintools.log("LSS URL= "+url) title = "Link " + str(i) i+=1 #xbmc.executebuiltin('XBMC.RunPlugin('+url+')') #params['action'] = 'runPlugin' #plugintools.play_resolved_url(url) #xbmc.executebuiltin('XBMC.RunPlugin(' + url +')') #xbmc.Player(xbmc.PLAYER_CORE_MPLAYER).play(item=url) plugintools.add_item( action="lsstv3" , title=title , plot=plot , url=url ,thumbnail=thumbnail , isPlayable=True, folder=False )
def lsstv1(params): data=plugintools.read(params.get("url")); pattern1 = 'onClick=\'showLinks\("event_", (.*?<img alt=".*?style="width: 40px;">.*?letter-spacing: 0px;">.*?<td rowspan=2 style="font-size:11px; font-style: italic; text-align: right;" title=\'[^\']+.)' pattern2 = '"([^"]+).*<img alt="([^"]+).*style="width: 40px;">([^<]+).*?letter-spacing: 0px;">([^<]+).*<td rowspan=2 style="font-size:11px; font-style: italic; text-align: right;" title=\'([^\']+)' pattern3 = "" match = plugintools.find_multiple_matches_multi_multi(data,pattern1) #for (i,id) in enumerate(match): match = sorted(list(set(match)))#array_unique !!! for ids in match: ''' thumbnail = "http://cdn-a.streamshell.net/images/icons/48x48px.png" #plugintools.log("TITLE"+ids)#print list of channels url = "http://www.livesportstreams.tv/es/player.php?e=" + ids + "&s=13&c=4" url = url.strip() plot = "" title = ids.capitalize() ''' matches = plugintools.find_multiple_matches_multi(ids,pattern2) for id, champ, ora, meci, lang in matches: thumbnail = "http://cdn-a.streamshell.net/images/icons/48x48px.png" url = "http://www.livesportstreams.tv/es/links.php?links=1&id=" + id url = url.strip() plugintools.log("URL:"+url)#print list of url #champ = champ.replace('futbol','') mec = "[COLOR=green]"+ ora + "[COLOR=yellow] : " + meci.upper() + " ([COLOR=red]" + lang.lower() + "[/COLOR][/COLOR][/COLOR]) :" + champ title = mec plot = "" #plugintools.log("cipq.webpage_play "+title)#print list of channels #uri = plugintools.find_single_match(data,rep) # Appends a new item to the xbmc item list plugintools.add_item( action="lsstv2" , title=title , plot=plot , url=url ,thumbnail=thumbnail , isPlayable=True, folder=True )
def epg_verluego(params): plugintools.log('[%s %s].epg_verluego %s' % (addonName, addonVersion, repr(params))) url = params.get("url") thumbnail = params.get("thumbnail") fanart = params.get("extra") filename = 'quever.txt' quever = open(temp + filename, "wb") data = plugintools.read(url) #plugintools.log("data= "+data) plugintools.add_item(action="", title= '[COLOR lightyellow][B]¿Qué ver después?[/B][/COLOR]', thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = False) body = plugintools.find_multiple_matches(data, '<td class="prga-i">(.*?)</tr>') for entry in body: channel = plugintools.find_single_match(entry, 'alt=\"([^"]+)') hora_luego = plugintools.find_single_match(entry, 'class="fec1">(.*)</span>') hora_luego = hora_luego.split("</span>") hora_luego = hora_luego[0] print 'hora_luego',hora_luego diff_luego = plugintools.find_single_match(entry, 'class="fdiff">([^<]+)').strip() evento_luego = plugintools.find_single_match(entry, '<span class="tprg1">(.*?)</span>') evento_mastarde = plugintools.find_single_match(entry, '<span class="tprg2">(.*?)</span>') hora_mastarde = plugintools.find_single_match(entry, 'class="fec2">(.*)</span>') hora_mastarde = hora_mastarde.split("</span>") hora_mastarde = hora_mastarde[0] title = '[COLOR orange][B]'+channel+' [/B][COLOR lightyellow][B]'+hora_luego+'[/B] '+evento_luego+'[/COLOR][COLOR lightgreen][I] ('+diff_luego+') [/I][/COLOR][COLOR white][B]'+hora_mastarde+' [/COLOR][/B]'+evento_mastarde quever.write(title+'\n') #plugintools.add_item(action="", title= title, thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = False) quever.close() params = plugintools.get_params() params["url"]=temp+filename txt_reader(params)
def main_list(params): plugintools.log(YT_ID+" "+repr(params)) # On first page, pagination parameters are fixed if params.get("url") is None: params["url"] = "http://gdata.youtube.com/feeds/api/users/"+YT_ID+"/playlists?start-index=1&max-results=25" # Fetch video list from YouTube feed data = plugintools.read( params.get("url") ) # Extract items from feed pattern = "" matches = plugintools.find_multiple_matches(data,"<entry>(.*?)</entry>") for entry in matches: # Not the better way to parse XML, but clean and easy title = plugintools.find_single_match(entry,"<titl[^>]+>([^<]+)</title>") plot = plugintools.find_single_match(entry,"<media\:descriptio[^>]+>([^<]+)</media\:description>") thumbnail = plugintools.find_single_match(entry,"<media\:thumbnail url='([^']+)' height='360' width='480' yt:name='hqdefault'/>") video_id = plugintools.find_single_match(entry,"<yt\:playlistI[^>]+>([^<]+)</yt\:playlistId>") feed="?v=2&alt=rss" url = "http://gdata.youtube.com/feeds/api/playlists/"+video_id+feed print "FEED_URL::" + url # Appends a new item to the xbmc item list plugintools.add_item( action="vid_list" , title=title , plot=plot , url=url ,thumbnail=thumbnail , folder=True ) # Calculates next page URL from actual URL start_index = int( plugintools.find_single_match( params.get("url") ,"start-index=(\d+)") ) max_results = int( plugintools.find_single_match( params.get("url") ,"max-results=(\d+)") ) next_page_url = "http://gdata.youtube.com/feeds/api/users/"+YT_ID+"/playlists?start-index=%d&max-results=%d" % ( start_index+max_results , max_results) plugintools.add_item( action="main_list" , title=">> Next page" , url=next_page_url,thumbnail=nextpage , folder=True ) setView('movies', 'default')
def seriesnovelas_cap(params): plugintools.log("SERIESNOVELAS_CAP") data = plugintools.read(params.get("url")) pattern = '<ul class="listpage">(.*?)<div align="center">' data = plugintools.find_single_match(data, pattern) plugintools.log("data=" + data) matches = plugintools.find_multiple_matches(data, '<li>(.*?)</li>') for entry in matches: plugintools.log("entry=" + entry) #<div style='position:absolute;margin-top:35px;margin-left:15px;'></div> #<h2 class="posttitle"> #<a href="http://www.verseriesynovelas.com/2014/10/agents-of-shield-temporada-2.html">Agents of SHIELD Segunda Temporada (2014) online</a></h2> #<a href="http://www.verseriesynovelas.com/2014/10/agents-of-shield-temporada-2.html"><img class="portadas_img" title="Agents of S.H.I.E.L.D. Temporada 2 " alt="Agents of S.H.I.E.L.D. Temporada 2 " src="http://4.bp.blogspot.com/-81iWTXquqhA/VV0x0IEKtUI/AAAAAAAABII/_S41N87fn7w/s320/Agents-of-Shield_season_2.jpg"> #</a> title = plugintools.find_single_match(entry, 'blank">(.*?)</a>') if entry.find("SUB.") != -1: title = title + " [COLOR white](SUB)[/COLOR]" if entry.find("EN.") != -1: title = title + " [COLOR white](EN)[/COLOR]" if entry.find("ES.") != -1: title = title + " [COLOR white](ES)[/COLOR]" url = plugintools.find_single_match(entry, 'href="(.*?)"') plugintools.add_item(action="seriesnovelas_geturl", title=title, url=url, isPlayable=True, folder=False)
def seriesnovelas_temp(params): data = plugintools.read(params.get("url")) pattern = '<div class="widget HTML" id="HTML1">(.*?)' pattern = pattern + "<div class='widget HTML' id='HTML2'>" data = plugintools.find_single_match(data, pattern) plugintools.log("data=" + data) matches = plugintools.find_multiple_matches( data, '<div class="col_portadas">(.*?)<div class="clear">') for entry in matches: plugintools.log("entry=" + entry) #<div style='position:absolute;margin-top:35px;margin-left:15px;'></div> #<h2 class="posttitle"> #<a href="http://www.verseriesynovelas.com/2014/10/agents-of-shield-temporada-2.html">Agents of SHIELD Segunda Temporada (2014) online</a></h2> #<a href="http://www.verseriesynovelas.com/2014/10/agents-of-shield-temporada-2.html"><img class="portadas_img" title="Agents of S.H.I.E.L.D. Temporada 2 " alt="Agents of S.H.I.E.L.D. Temporada 2 " src="http://4.bp.blogspot.com/-81iWTXquqhA/VV0x0IEKtUI/AAAAAAAABII/_S41N87fn7w/s320/Agents-of-Shield_season_2.jpg"> #</a> title = plugintools.find_single_match(entry, 'html">(.*?)</a>') url = plugintools.find_single_match(entry, 'href="(.*?)">') fanart = plugintools.find_single_match(entry, 'src="(.*?)">') plugintools.add_item(action="seriesnovelas_cap", title=title, thumbnail=fanart, fanart=fanart, url=url, folder=True)
def ciberdocus3(params): plugintools.setview("tvshows") fanart = params.get("fanart") thumbnail = params.get("thumbnail") title = params.get("title") recursividad = params.get("extra") if recursividad == "1": buscar="" buscar = plugintools.keyboard_input().replace(" ", "+") url_busca="http://www.ciberdocumentales.com/index.php?keysrc="+buscar+"&categoria=0" else: url_busca = params.get("url") #headers = {"User-Agent": 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0', "Referer": url} #r=requests.get(url, headers=headers) data = plugintools.read(url_busca) group_channel = plugintools.find_single_match(data,'var xajaxRequestUri="(.*?)<div id="paginador">') plugintools.log("group_channel= "+group_channel) cada_canal = plugintools.find_multiple_matches(group_channel,'<div class="fotonoticia">(.*?)>Ha sido visto') for item in cada_canal: plugintools.log("item= "+item) url_canal=plugintools.find_single_match(item,'<div class="opcionesbot"><a target="_blank" href="(.*?)"') titulo_canal=plugintools.find_single_match(item,'alt="(.*?)"') caratula_canal='http://www.ciberdocumentales.com'+plugintools.find_single_match(item,'src="(.*?)"') ##Capturo la Sinopsis en un Diccionario para usarla en "plugintools.add_item(" mediante la variable "info_labels" sinopsis = plugintools.find_single_match(item,'h3></a><br /><br />(.*?)</div>') plugintools.log("Sinopsis= "+sinopsis) datamovie = {} datamovie["Plot"]=sinopsis url_montada = 'plugin://plugin.video.SportsDevil/?mode=1&item=catcher%3dstreams%26url='+url_canal+'%26referer='+url_ref plugintools.add_item(action="runPlugin", title=titulo_canal, url=url_montada, thumbnail=caratula_canal, info_labels=datamovie , fanart=fanart, folder = False, isPlayable=True) if recursividad == "1": #Resuelvo la posibilidad de mas de 1 Página en la Busqueda mas_pag = plugintools.find_single_match(data,'<div class="pagination">(.*?)</div>') ##Si no está vacio... es decir, q hay mas de 1 página if len(mas_pag) > 1: cadena_busqueda='/index.php?keysrc='+buscar+'&categoria=0&page=' total_pag=plugintools.find_multiple_matches(mas_pag, 'a href="([^"]+)') #Con esto te devuelve una lista: ['/index.php?keysrc=cine&categoria=0&page=2', '/index.php?keysrc=cine&categoria=0&page=3', '/index.php?keysrc=cine&categoria=0&page=2'] ult_pag=int(total_pag[-2].replace(cadena_busqueda, "")) for num_pag in range(2, ult_pag+1): recursividad="0" url_pag=url_ref+'index.php?keysrc='+buscar+'&categoria=0&page='+str(num_pag) ## Obtengo las páginas así: http://www.ciberdocumentales.com/index.php?keysrc=cine&categoria=0&page=2 print url_pag plugintools.add_item(action="ciberdocus3",title="[COLORred][B]Página Numero: " + str(num_pag) + " [/B][/COLOR]", url=url_pag, extra=recursividad, thumbnail=thumbnail, fanart=fanart, folder=True, isPlayable=False)
def ciberdocus2(params): plugintools.setview("tvshows") url = params.get("url") fanart = params.get("fanart") thumbnail = params.get("thumbnail") title = params.get("title") #headers = {"User-Agent": 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0', "Referer": url} #r=requests.get(url, headers=headers) data = plugintools.read(url) group_channel = plugintools.find_single_match(data,'var xajaxRequestUri="(.*?)<div id="paginador">') plugintools.log("group_channel= "+group_channel) cada_canal = plugintools.find_multiple_matches(group_channel,'<div class="fotonoticia">(.*?)data-layout="standard"') for item in cada_canal: plugintools.log("item= "+item) url_canal=plugintools.find_single_match(item,'" data-href="(.*?)"') titulo_canal=plugintools.find_single_match(item,'alt="(.*?)"') caratula_canal='http://www.ciberdocumentales.com'+plugintools.find_single_match(item,'src="(.*?)"') ##Capturo la Sinopsis en un Diccionario para usarla en "plugintools.add_item(" mediante la variable "info_labels" sinopsis = plugintools.find_single_match(item,'h3></a><br /><br />(.*?)</div>') plugintools.log("Sinopsis= "+sinopsis) datamovie = {} datamovie["Plot"]=sinopsis url_montada = 'plugin://plugin.video.SportsDevil/?mode=1&item=catcher%3dstreams%26url='+url_canal+'%26referer='+url_ref plugintools.add_item(action="runPlugin", title=titulo_canal, url=url_montada, thumbnail=caratula_canal, info_labels=datamovie , fanart=fanart, folder = False, isPlayable=True)
def ertete0(params): plugintools.log("[%s %s] ertete.com parser %s " % (addonName, addonVersion, repr(params))) plugintools.add_item(action="", title='[COLOR yellow]erTETE.com[/COLOR]', url="", thumbnail=thumbnail, fanart=fanart, folder=False, isPlayable=False) url = params.get("url") body = plugintools.read(url) channels = plugintools.find_single_match(body, '<ul class="nav">(.*?)</ul>') kanal = plugintools.find_multiple_matches(channels, '<li(.*?)</li>') for entry in kanal: plugintools.log("entry= " + entry) url_canal = plugintools.find_single_match(entry, '<a href="([^"]+)') url_canal = 'http://www.ertete.com/' + url_canal plugintools.log("url_canal= " + url_canal) title_canal = plugintools.find_single_match(entry, '<a href[^>]+([^<]+)') title_canal = title_canal.replace(">", "").strip() plugintools.log("title_canal= " + title_canal) plugintools.add_item(action="ertete1", title='[COLOR white]' + title_canal + '[/COLOR]', url=url_canal, thumbnail=thumbnail, fanart=fanart, folder=False, isPlayable=True)
def vid_list(params): data = plugintools.read(params.get("url")) # Extract items from feed feed = str(data) + "?v=2&alt=rss" pattern = "" matches = plugintools.find_multiple_matches(feed, "<item>(.*?)</item>") for entry in matches: # Not the better way to parse XML, but clean and easy title = plugintools.find_single_match(entry, "<titl[^>]+>([^<]+)</title>") plot = plugintools.find_single_match( entry, "<media\:descriptio[^>]+>([^<]+)</media\:description>") thumbnail = plugintools.find_single_match( entry, "<media\:thumbnail url='([^']+)' height='360' width='480' yt:name='hqdefault'/>" ) video_id = plugintools.find_single_match( entry, "<link>http\://www.youtube.com/watch\?v\=([^\&]+)\&").replace( "&", "&") url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + video_id # Appends a new item to the xbmc item list plugintools.add_item(action="vid_list", title=title, plot=plot, url=url, thumbnail=thumbnail, folder=True)
def parse_av_channel(title, url, params): plugintools.log("[PalcoTV-0.3.0].parse_av_channel " + repr(params)) data = plugintools.read(url) fanart = params.get("fanart") plugintools.log("fanart= " + fanart) thumbnail = params.get("thumbnail") url = plugintools.find_single_match(data, 'sop://(.*?)>') url = url.replace('"', "").strip() if url == "": plugintools.add_item( action="play", title=title + ' [COLOR red]OFF[/COLOR]', url=url, thumbnail=thumbnail, fanart= 'http://wallpaper-download.net/wallpapers/football-wallpapers-football-stadium-wallpaper-wallpaper-36537.jpg', folder=False, isPlayable=True) else: url = 'sop://' + url url = 'plugin://plugin.video.p2p-streams/?url=' + url + '&mode=2&name=' + title plugintools.add_item( action="play", title=title, url=url, thumbnail=thumbnail, fanart= 'http://wallpaper-download.net/wallpapers/football-wallpapers-football-stadium-wallpaper-wallpaper-36537.jpg', folder=False, isPlayable=True)
def video(params): plugintools.log("miratuserie_tv.video "+repr(params)) url=params.get("url") plugintools.add_item(title=url) #"verVid('kv2a6a98x113','played',0,1,0,1,'es'); sub="112" urlorg="americanhorrorstory/ir"" #url ="verVid('kv2a6a98x113','played',0,1,0,1,'es'); sub='112' urlorg='americanhorrorstory/ir'" id=plugintools.find_single_match(url,"verVid\((.*?)\);") split1= plugintools.find_multiple_matches(id,"'(.*?)'") split2= plugintools.find_multiple_matches(id,",(\d)") #spliit1 [0] key ,[1]host,[2]idiomas #split2 [0]plugin,[1]subs,[2]hd,[3]gk sub= plugintools.find_single_match(url,'sub="(.*?)"') urlorig= plugintools.find_single_match(url,'urlorg="(.*?)"') #print sub #print urlorig key=split1[0] host=split1[1] plugin=split2[0] subs=split2[1] sub=sub hd=split2[2] gk=split2[3] idiomas=split1[2] urlserie=urlorig urlvideo=get_url_video(key,host,plugin,subs,sub,hd,gk,idiomas,urlserie) #print "--------split------",split1,"--------split2------",split2 #print key,host,plugin,subs,sub,hd,gk,idiomas,urlserie,urlvideo pagvideo=plugintools.read(urlvideo) print "-----------------------pagvideo----------------------------------",pagvideo,"-----------------------------------------------"
def torrentvru(params): plugintools.log("[tvspot 4.0].Torrent-TV.ru Playlist Sport Channels( "+repr(params)) plugintools.add_item(action="", title = '[B][I][COLOR lightyellow]Torrent-tv.ru Acestream Sports Playlist[/B][/I][/COLOR]', url = "", thumbnail = 'http://1ttv.org/images/logo.png' , fanart = 'http://hdwallpappers.com/images/wallpapers/Allianz-Arena-Stadium-wallpaper.jpg' , folder = True, isPlayable = False) url = params.get("url") thumbnail = params.get("thumbnail") fanart = params.get("fanart") title = params.get("title") plugintools.log("title= "+title) data = plugintools.read(url) #plugintools.log("data= "+data) match = plugintools.find_single_match(data, 'cat=4(.*?)</ul></li>') plugintools.log("match sports= "+match) matches = plugintools.find_multiple_matches(match, '<a href="(.*?)</li>') for entry in matches: entry = entry.split('"') url = 'http://www.torrent-tv.ru' + entry[0] url = url.strip() url = torrentvru_channels(url) title = entry[1] title= title.replace("</a>", "") title= title.replace(">", "") title = title.strip() title_fixed = title.replace(" ", "+") url = 'plugin://plugin.video.p2p-streams/?url=' + url + '&mode=1&name=' + title_fixed plugintools.log("url= "+url) plugintools.add_item(action="torrentvru_channels", title = title, url = url, thumbnail = 'http://1ttv.org/images/logo.png' , fanart = 'http://hdwallpappers.com/images/wallpapers/Allianz-Arena-Stadium-wallpaper.jpg' , folder = False, isPlayable = True)
def ucaster(url, ref, res): p1 = re.compile(ur'channel=?\'?"?([^\'"\&,;]+)') f1 = re.findall(p1, str(res)) p2 = re.compile(ur'width=?\'?"?([^\'"\&,;]+)') f2 = re.findall(p2, str(res)) p3 = re.compile(ur'height=?\'?"?([^\'"\&,;]+)') f3 = re.findall(p3, str(res)) c = f1[0] w = f2[0] h = f3[0] url = 'http://www.ucaster.eu/embedded/' + c + '/1/' + w + '/' + h body = '' #print "UCASTER body="+bodi;sys.exit(); bodi = curl_frame(url, ref, body) p = 'SWFObject\(\'?"?([^\'"]+)' swf = 'http://www.ucaster.eu' + plugintools.find_single_match(bodi, p) p = 'FlashVars\'?"?,?\s?\'?"?([^\'"]+)' flashvars = plugintools.find_single_match(bodi, p) print flashvars p = re.compile(ur'\&?.*?=([^\&]+)') flashvars = re.findall(p, flashvars) print flashvars id = flashvars[0] c = flashvars[1] lb = 'http://www.ucaster.eu:1935/loadbalancer' lb = plugintools.read(lb) lb = plugintools.find_single_match(lb, 'redirect=(.*)') #print lb;sys.exit() #rtmp://109.123.126.66/live/ playpath=canal89?id=76120 swfUrl=http://www.ucaster.eu/static/scripts/fplayer.swf swfVfy=1 conn=S:OK live=true pageUrl= media_url = 'rtmp://' + lb + '/live/ playpath=' + c + '?id=' + id + ' swfUrl=' + swf + ' swfVfy=1 conn=S:OK live=true pageUrl=' + url plugintools.play_resolved_url(media_url) print "MEDIA URL=" + media_url
def program_capis(params): plugintools.log("[Goku-0.0.0].LaTuerka Videos"+repr(params)) fanart = params.get("extra") data = plugintools.read(params.get("url")) #plugintools.log("data= "+data) #<a href="/publico-tv/program/59/video/216146/otra-vuelta-de-tuerka-jesus-cintora" class="play"><span>Reproducir</span></a> items_programa = plugintools.find_multiple_matches(data, '<div class="thumb">(.*?)</li>') for entry in items_programa: plugintools.log("items_programa= "+entry) url_programa = plugintools.find_single_match(entry, '<a href=\"(.*?)\"') img_programa = plugintools.find_single_match(entry, '<img src=\"(.*?)\"') title_programa = plugintools.find_single_match(entry, 'title="">(.*?)</a></p>') title_programa = title_programa.split('title="">') title_programa = title_programa[1] title_programa = title_programa.replace("ñ", "ñ") #url_programa = plugintools.find_multiple_matches(entry, '<a href=(.*?)class=\"foto') url_programa = 'http://www.publico.es' + url_programa plugintools.log("url_programa= "+url_programa) url = tuerka_link(url_programa) plugintools.log("img_programa= "+img_programa) plugintools.log("title_programa= "+title_programa) plugintools.add_item(action="play", title = title_programa, url = url , thumbnail = img_programa, fanart = 'http://www.latuerka.net/img/bg.jpg' , folder = False , isPlayable = True)
def sportseven(params): plugintools.log("[PalcoTV-0.3.0].sport7.ru "+repr(params)) plugintools.add_item(action="", title='[COLOR white]s p o r t[COLOR red][B] 7[/B][/COLOR] . r u[/COLOR]' , url="", thumbnail = "http://sport7.ru/images/sport_logo.png" , fanart = "http://2.cdn.nhle.com/lightning/v2/ext/wallpaper/arena_fans_wallpaper_1680x1050.jpg" , folder=False, isPlayable=False) data = plugintools.read(params.get("url")) plugintools.log("data= "+data) matches = plugintools.find_single_match(data, 'class=\"head-match\"(.*?)class=\"mar-top5 jus\"') plugintools.log("matches= "+matches) title = plugintools.find_multiple_matches(matches, '<h2>(.*?)</h2>') for entry in title: canal = plugintools.find_single_match(matches, '<h2>'+entry+'(.*?)class=\"com_bl utext\"') plugintools.log("canal= "+canal) title = convertrus(entry) bitrate = plugintools.find_single_match(canal, '<div class=\"rc\">(.*?)</div>') url_p2p = plugintools.find_single_match(canal, 'sop://(.*?)\',') if url_p2p == "": url_p2p = plugintools.find_single_match(canal, 'acestream://(.*?)\'') url = 'plugin://plugin.video.p2p-streams/?url=acestream://' + url_p2p + '&mode=1&name=' url = url.strip() plugintools.log("URL_Acestream= "+url) title = '[COLOR lightyellow]' + title + ' [/COLOR][COLOR lightblue] [Acestream] [/COLOR][COLOR green]['+bitrate+'][/COLOR]' plugintools.add_item(action="play", title=title, url=url, thumbnail = "http://sport7.ru/images/sport_logo.png", fanart = "http://2.cdn.nhle.com/lightning/v2/ext/wallpaper/arena_fans_wallpaper_1680x1050.jpg" , folder = False, isPlayable = False) else: url = 'plugin://plugin.video.p2p-streams/?url=sop://' + url_p2p + '&mode=2&name=' url = url.strip() plugintools.log("URL_Sopcast= "+url) title = '[COLOR lightyellow]' + title + ' [/COLOR][COLOR darkorange] [Sopcast] [/COLOR][COLOR green]['+bitrate+'][/COLOR]' plugintools.add_item(action="play", title=title, url=url, folder = False, thumbnail = "http://sport7.ru/images/sport_logo.png", fanart = "http://2.cdn.nhle.com/lightning/v2/ext/wallpaper/arena_fans_wallpaper_1680x1050.jpg", isPlayable = False)
def pelicatcher(params): plugintools.log("[tv.ultra.7k-0.3.5].pelicatcher " + repr(params)) url = params.get("url") data = plugintools.read(url) plugintools.log("data= " + data) items = plugintools.find_multiple_matches( data, '<li class="col-xs-6 col-sm-2(.*?)</li>') for entry in items: plugintools.log("entry= " + entry) thumbnail = plugintools.find_single_match(entry, 'src="([^"]+)') thumbnail = 'http://www.pelisadicto.com' + thumbnail plugintools.log("thumbnail= " + thumbnail) title = plugintools.find_single_match(entry, 'title="([^"]+)') title = title.replace("Ver", "").replace("Online", "").strip() plugintools.log("title= " + title) movie_url = 'http://www.pelisadicto.com' + plugintools.find_single_match( entry, 'href="([^"]+)') plugintools.log("movie_url= " + movie_url) plugintools.add_item(action="", title=title, url=movie_url, thumbnail=thumbnail, fanart=fanart, folder=True, isPlayable=False)
def lsstv(params): thumbnail = params.get("thumbnail") fanart = params.get("fanart") data = plugintools.read( "http://www.livesportstreams.tv/sidebar.php?top=1&type=1&l=es") grups = '<span\sid="span_link_sidebar.*?(\(.*?\)).*?<\/span>' grups = plugintools.find_multiple_matches(data, grups) grups = list(set(grups)) grup = [] for i in range(1, len(grups)): a = grups[i].replace("1, ", "").split("'") grup += ([a[1], a[7], a[9]]) j = 0 for j in range(len(grup)): if j % 3 == 0: sport = grup[j] elif j % 3 == 1: link = "http://www.livesportstreams.tv/events.php?top=1&type=1&l=es&" + grup[ j] plugintools.add_item(action="lsstv1", title=sport, url=link, thumbnail=thumbnail, isPlayable=False, folder=True) #print "sport="+grup[j];j+=1;print "link="+grup[j];j+=1;print "nrevnt="+grup[j];j+=1; else: sport = sport + ' (' + grup[j] + 'partidos)'
def dailym_getvideo(url): plugintools.log("palcoTV.dailymotion_videos "+url) # Fetch video list from Dailymotion feed data = plugintools.read(url) #plugintools.log("data= "+data) # Extract items from feed pattern = "" matches = plugintools.find_multiple_matches(data,'{"(.*?)}') pattern = '{"(.*?)},{' for entry in matches: plugintools.log("entry= "+entry) # Not the better way to parse XML, but clean and easy title = plugintools.find_single_match(entry,'title":"(.*?)"') title = title.replace("\u00e9" , "é") title = title.replace("\u00e8" , "è") title = title.replace("\u00ea" , "ê") title = title.replace("\u00e0" , "à") video_id = plugintools.find_single_match(entry,'id":"(.*?)",') if video_id: plugintools.log("video_id= "+video_id) return video_id
def torrentone(params): plugintools.log("[tv.ultra.7k-0.3.0].Playlist Sport Channels Torrent1( "+repr(params)) plugintools.add_item(action="", title = '[B][COLOR blue]Acestream Sports[/B][/COLOR]', url = "", thumbnail = 'https://dl.dropbox.com/s/au5yyg825zaoo1k/Acestream%20sport.jpg' , fanart = 'https://dl.dropbox.com/sh/i4ccoqhgk7k1t2v/AAChTJOeg7LsgPDxxos5NSyva/fondo tv.jpg' , folder = True, isPlayable = False) url = params.get("url") thumbnail = params.get("thumbnail") fanart = params.get("fanart") title = params.get("title") plugintools.log("title= "+title) data = plugintools.read(url) plugintools.log("data= "+data) match = plugintools.find_single_match(data, 'tcon_6(.*?)</a></div></div></div></div>') plugintools.log("match sports= "+match) matches = plugintools.find_multiple_matches(match, '<a href="(.*?)</a>(.*?)</a>') for winy, xiny in matches: plugintools.log("winy= "+winy) plugintools.log("xiny= "+xiny) winy = winy.split("><") url = 'http://1torrent.tv' + winy[0] url = url.replace('"', "") thumbnail = 'http://1torrent.tv/images/header_logo.png' title = xiny.split(">") title = title[3] plugintools.log("title= "+title) plugintools.log("url= "+url) plugintools.log("thumbnail= "+thumbnail) plugintools.add_item(action="gethash_torrentone" , title = title, url = url , thumbnail = thumbnail , fanart = 'https://dl.dropbox.com/sh/i4ccoqhgk7k1t2v/AAChTJOeg7LsgPDxxos5NSyva/fondo tv.jpg' , isPlayable = True, folder = False)
def lsstv2(params): msg = "Resolviendo enlace ... " ref = params.get("url") data = plugintools.read(params.get("url")) data = data.replace('&', '&') data = data.replace('"', "'") #plugintools.log("LSS URL= "+data) thumbnail = params.get("thumbnail") title = params.get("meci") plot = params.get("plot") pattern = '\?(e=[^\'"]+)' match = plugintools.find_multiple_matches_multi_multi(data, pattern) match = sorted(list(set(match))) i = 1 for id in match: url = "http://www.livesportstreams.tv/es/player.php?" + id + "@" + ref url = url.strip() plugintools.log("LSS URL= " + url) title = "Link " + str(i) i += 1 #xbmc.executebuiltin('XBMC.RunPlugin('+url+')') #params['action'] = 'runPlugin' #plugintools.play_resolved_url(url) #xbmc.executebuiltin('XBMC.RunPlugin(' + url +')') #xbmc.Player(xbmc.PLAYER_CORE_MPLAYER).play(item=url) plugintools.add_item(action="lsstv3", title=title, plot=plot, url=url, thumbnail=thumbnail, isPlayable=True, folder=False)
def epg_vermastarde(params): plugintools.log("Arena+ " + repr(params)) url = params.get("url") thumbnail = params.get("thumbnail") fanart = params.get("extra") data = plugintools.read(url) #plugintools.log("data= "+data) plugintools.add_item( action="", title='[COLOR lightyellow][B]¿Qué ver más tarde?[/B][/COLOR]', thumbnail=thumbnail, fanart=fanart, folder=False, isPlayable=False) body = plugintools.find_multiple_matches(data, '<td class="prga-i">(.*?)</tr>') for entry in body: channel = plugintools.find_single_match(entry, 'alt=\"([^"]+)') evento_mastarde = plugintools.find_single_match( entry, '<span class="tprg2">(.*?)</span>') hora_mastarde = plugintools.find_single_match( entry, 'class="fec2">(.*)</span>') hora_mastarde = hora_mastarde.split("</span>") hora_mastarde = hora_mastarde[0] plugintools.add_item(action="", title='[COLOR orange][B]' + channel + ' [/B][COLOR lightyellow][B]' + hora_mastarde + '[/B] ' + evento_mastarde + '[/COLOR]', thumbnail=thumbnail, fanart=fanart, folder=False, isPlayable=False)
def dailym_pl(params): plugintools.log("dailym_pl " + repr(params)) pl = params.get("url") data = plugintools.read(pl) plugintools.log("playlist= " + data) dailym_vid = plugintools.find_multiple_matches(data, "{(.*?)}") for entry in dailym_vid: plugintools.log("entry= " + entry) title = plugintools.find_single_match(entry, '"title":"(.*?)",') title = title.replace('"', "") title = title.replace("\*", "") video_id = plugintools.find_single_match(entry, '"id":"(.*?)",') thumbnail = "https://api.dailymotion.com/thumbnail/video/" + video_id + "" if thumbnail == "": thumbnail = "http://image-parcours.copainsdavant.com/image/750/1925508253/4094834.jpg" url = "plugin://plugin.video.dailymotion_com/?url=" + video_id + "&mode=playVideo" print "url", url plugintools.add_item( action="play", title=title, url=url, folder=False, fanart="http://image-parcours.copainsdavant.com/image/750/1925508253/4094834.jpg", thumbnail=thumbnail, isPlayable=True, )
def main_list(params): plugintools.log("MelodyEntInc.main_list "+repr(params)) # On first page, pagination parameters are fixed if params.get("url") is None: params["url"] = "http://gdata.youtube.com/feeds/api/users/"+YOUTUBE_CHANNEL_ID+"/uploads?start-index=1&max-results=50" # Fetch video list from YouTube feed data = plugintools.read( params.get("url") ) # Extract items from feed pattern = "" matches = plugintools.find_multiple_matches(data,"<entry>(.*?)</entry>") for entry in matches: plugintools.log("entry="+entry) # Not the better way to parse XML, but clean and easy title = plugintools.find_single_match(entry,"<titl[^>]+>([^<]+)</title>") plot = plugintools.find_single_match(entry,"<media\:descriptio[^>]+>([^<]+)</media\:description>") thumbnail = plugintools.find_single_match(entry,"<media\:thumbnail url='([^']+)'") video_id = plugintools.find_single_match(entry,"http\://www.youtube.com/watch\?v\=([0-9A-Za-z_-]{11})") url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid="+video_id # Appends a new item to the xbmc item list plugintools.add_item( action="play" , title=title , plot=plot , url=url ,thumbnail=thumbnail , isPlayable=True, folder=False ) # Calculates next page URL from actual URL start_index = int( plugintools.find_single_match( params.get("url") ,"start-index=(\d+)") ) max_results = int( plugintools.find_single_match( params.get("url") ,"max-results=(\d+)") ) next_page_url = "http://gdata.youtube.com/feeds/api/users/"+YOUTUBE_CHANNEL_ID+"/uploads?start-index=%d&max-results=%d" % ( start_index+max_results , max_results) plugintools.add_item( action="main_list" , title=">> Next page" , url=next_page_url , folder=True )
def dailym_pl(params): plugintools.log("dailym_pl " + repr(params)) pl = params.get("url") data = plugintools.read(pl) plugintools.log("playlist= " + data) dailym_vid = plugintools.find_multiple_matches(data, '{(.*?)}') for entry in dailym_vid: plugintools.log("entry= " + entry) title = plugintools.find_single_match(entry, '"title":"(.*?)",') title = title.replace('"', "") title = title.replace('\*', "") video_id = plugintools.find_single_match(entry, '"id":"(.*?)",') thumbnail = "https://api.dailymotion.com/thumbnail/video/" + video_id + "" if thumbnail == "": thumbnail = 'http://image-parcours.copainsdavant.com/image/750/1925508253/4094834.jpg' url = "plugin://plugin.video.dailymotion_com/?url=" + video_id + "&mode=playVideo" print 'url', url plugintools.add_item( action="play", title=title, url=url, folder=False, fanart= 'http://image-parcours.copainsdavant.com/image/750/1925508253/4094834.jpg', thumbnail=thumbnail, isPlayable=True)
def GetSerieChapters(params): #plugintools.log("[%s %s] Seriesadicto: getseriechapters() %s" % (addonName, addonVersion, repr(params))) season = params.get("season") datamovie = {} datamovie["Plot"] = params.get("plot") data = plugintools.read(params.get("url")) season = plugintools.find_multiple_matches(data, season + '(.*?)</table>') season = season[0] for entry in season: url_cap = plugintools.find_multiple_matches( season, '<a href=\"/capitulo(.*?)\" class=\"color4\"') title = plugintools.find_multiple_matches( season, 'class=\"color4\">(.*?)</a>') num_items = len(url_cap) i = 1 while i <= num_items: url_cap_fixed = 'http://seriesadicto.com/capitulo/' + url_cap[i - 1] title_fixed = title[i - 1] fanart = "http://socialgeek.co/wp-content/uploads/2013/06/series-TV-Collage-television-10056729-2560-1600.jpg" plugintools.add_item(action="seriesadicto4", title=title_fixed, url=url_cap_fixed, thumbnail=params.get("thumbnail"), extra=str(i), info_labels=datamovie, plot=datamovie["Plot"], fanart=fanart, folder=True, isPlayable=False) i = i + 1
def arenavision_parser(params): plugintools.log("[PalcoTV-0.3.0].arenavision_parser " + repr(params)) url = params.get("url") thumbnail = params.get("thumbnail") title = params.get("title") plugintools.log("title= " + title) data = plugintools.read(url) plugintools.add_item( action="", title=title, url=url, thumbnail=thumbnail, fanart= 'http://wallpaper-download.net/wallpapers/football-wallpapers-football-stadium-wallpaper-wallpaper-36537.jpg', folder=False, isPlayable=False) params["fanart"] = fanart plugintools.log("fanart= " + fanart) matches = plugintools.find_multiple_matches( data, '<li><a href=(.*?)>(.*?)</a></li>') for url, title in matches: url = url.replace("'", "") if title.startswith("AV") == True: parse_av_channel(title, url, params)
def epg_verahora(params): plugintools.log('[%s %s].epg_verahora %s' % (addonName, addonVersion, repr(params))) url = params.get("url") thumbnail = params.get("thumbnail") fanart = params.get("extra") data = plugintools.read(url) #plugintools.log("data= "+data) plugintools.add_item(action="", title= '[COLOR lightyellow][B]¿Qué ver ahora?[/B][/COLOR]', thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = False) body = plugintools.find_multiple_matches(data, '<td class="prga-i">(.*?)</tr>') for entry in body: channel = plugintools.find_single_match(entry, 'alt=\"([^"]+)') print 'channel',channel ahora = plugintools.find_single_match(entry, '<p>(.*?)</p>') print 'ahora',ahora hora_luego = plugintools.find_single_match(entry, 'class="fec1">(.*)</span>') hora_luego = hora_luego.split("</span>") hora_luego = hora_luego[0] print 'hora_luego',hora_luego diff_luego = plugintools.find_single_match(entry, 'class="fdiff">([^<]+)').strip() print 'diff_luego',diff_luego evento_luego = plugintools.find_single_match(entry, '<span class="tprg1">(.*?)</span>') print 'evento_luego',evento_luego evento_mastarde = plugintools.find_single_match(entry, '<span class="tprg2">(.*?)</span>') print 'evento_mastarde',evento_mastarde plugintools.add_item(action="", title= '[COLOR orange][B]'+channel+' [/B][COLOR lightyellow]'+ahora+'[/COLOR] [COLOR lightgreen][I]('+diff_luego+') [/I][/COLOR][COLOR white][B]'+hora_luego+' [/COLOR][/B] '+evento_luego, thumbnail = thumbnail , fanart = fanart , folder = False, isPlayable = False)
def peppapig_playlists(params): plugintools.log("soritvch.peppapig_playlists " + repr(params)) data = plugintools.read(params.get("url")) plugintools.log("data=" + data) pattern = '<h3 class="yt-lockup-title "><a href="(.*?)</h3>' plugintools.log("_________matches_________") matches = plugintools.find_multiple_matches(data, pattern) for entry in matches: plugintools.log("=====================================") plugintools.log("entry=" + entry) video_id = plugintools.find_single_match(entry, 'v=(.*?)" class') plugintools.log("video_id=" + video_id) title = plugintools.find_single_match(entry, 'dir="ltr">(.*?)</a>') title2 = plugintools.find_single_match(entry, '"> -(.*?).</span>') title = title + "[COLOR yellow]-" + title2 + "[/COLOR]" title = title.replace('"', '"') title = title.strip() #plot = plugintools.find_single_match(entry,"<summa[^>]+>([^<]+)</summa") plot = "" #thumbnail = plugintools.find_single_match(entry,"<media\:thumbnail url='([^']+)'") thumbnail = "http://img.youtube.com/vi/" + video_id + "/0.jpg" url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + video_id #plugintools.play_resolved_url( url ) #if title.find("Pig") != -1: plugintools.add_item(action="play", title=title, plot=plot, url=url, thumbnail=thumbnail, isPlayable=False, folder=False)
def latuerka_menu(params): plugintools.log("[PalcoTV] La Tuerka Parser( " + repr(params)) plugintools.add_item( action="", title='[B][I][COLOR lightyellow]LaTuerka Videos[/B][/I][/COLOR]', url="", folder=True, isPlayable=False) url = params.get("url") data = plugintools.read(url) #plugintools.log("data= "+data) menu = plugintools.find_single_match(data, '<ul class="menu-tuerka">(.*?)</ul>') #plugintools.log("menu_latuerka= "+menu) items_menu = plugintools.find_multiple_matches(menu, '<a href=([^<]+)</a>') for entry in items_menu: #plugintools.log("item= "+entry) entry = entry.split(">") url_program = entry[0] title_program = entry[1] url_program = url_program.replace('"', "") url_program = 'http://www.publico.es' + url_program plugintools.log("title_program= " + title_program) plugintools.log("url_program= " + url_program) plugintools.add_item(action="program_capis", title=title_program, url=url_program, thumbnail='http://www.latuerka.net/img/logo.png', fanart='http://www.latuerka.net/img/bg.jpg', folder=True, isPlayable=False)
def torrentone(params): plugintools.log("[PalcoTV-0.3.0].Playlist Sport Channels Torrent1( "+repr(params)) plugintools.add_item(action="", title = '[B][I][COLOR lightyellow]1torrent.tv Acestream Sports Playlist[/B][/I][/COLOR]', url = "", thumbnail = 'http://1torrent.tv/images/header_logo.png' , fanart = 'http://hdwallpappers.com/images/wallpapers/Allianz-Arena-Stadium-wallpaper.jpg' , folder = True, isPlayable = False) url = params.get("url") thumbnail = params.get("thumbnail") fanart = params.get("fanart") title = params.get("title") plugintools.log("title= "+title) data = plugintools.read(url) plugintools.log("data= "+data) match = plugintools.find_single_match(data, 'tcon_6(.*?)</a></div></div></div></div>') plugintools.log("match sports= "+match) matches = plugintools.find_multiple_matches(match, '<a href="(.*?)</a>(.*?)</a>') for winy, xiny in matches: plugintools.log("winy= "+winy) plugintools.log("xiny= "+xiny) winy = winy.split("><") url = 'http://1torrent.tv' + winy[0] url = url.replace('"', "") thumbnail = 'http://1torrent.tv/images/header_logo.png' title = xiny.split(">") title = title[3] plugintools.log("title= "+title) plugintools.log("url= "+url) plugintools.log("thumbnail= "+thumbnail) plugintools.add_item(action="gethash_torrentone" , title = title, url = url , thumbnail = thumbnail , fanart = 'http://hdwallpappers.com/images/wallpapers/Allianz-Arena-Stadium-wallpaper.jpg' , isPlayable = True, folder = False)
def main_list(params): plugintools.log("SAT7ARABIC.main_list "+repr(params)) # On first page, pagination parameters are fixed if params.get("url") is None: params["url"] = "http://gdata.youtube.com/feeds/api/users/"+YOUTUBE_CHANNEL_ID+"/uploads?start-index=1&max-results=50" # Fetch video list from YouTube feed data = plugintools.read( params.get("url") ) # Extract items from feed pattern = "" matches = plugintools.find_multiple_matches(data,"<entry>(.*?)</entry>") for entry in matches: plugintools.log("entry="+entry) # Not the better way to parse XML, but clean and easy title = plugintools.find_single_match(entry,"<titl[^>]+>([^<]+)</title>") plot = plugintools.find_single_match(entry,"<media\:descriptio[^>]+>([^<]+)</media\:description>") thumbnail = plugintools.find_single_match(entry,"<media\:thumbnail url='([^']+)'") video_id = plugintools.find_single_match(entry,"http\://www.youtube.com/watch\?v\=([0-9A-Za-z_-]{11})") url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid="+video_id # Appends a new item to the xbmc item list plugintools.add_item( action="play" , title=title , plot=plot , url=url ,thumbnail=thumbnail , isPlayable=True, folder=False ) # Calculates next page URL from actual URL start_index = int( plugintools.find_single_match( params.get("url") ,"start-index=(\d+)") ) max_results = int( plugintools.find_single_match( params.get("url") ,"max-results=(\d+)") ) next_page_url = "http://gdata.youtube.com/feeds/api/users/"+YOUTUBE_CHANNEL_ID+"/uploads?start-index=%d&max-results=%d" % ( start_index+max_results , max_results) plugintools.add_item( action="main_list" , title=">> Next page" , url=next_page_url , folder=True )
def dailym_getvideo(url): plugintools.log("tv.ultra.7k.dailymotion_videos " + url) # Fetch video list from Dailymotion feed data = plugintools.read(url) #plugintools.log("data= "+data) # Extract items from feed pattern = "" matches = plugintools.find_multiple_matches(data, '{"(.*?)}') pattern = '{"(.*?)},{' for entry in matches: plugintools.log("entry= " + entry) # Not the better way to parse XML, but clean and easy title = plugintools.find_single_match(entry, 'title":"(.*?)"') title = title.replace("\u00e9", "é") title = title.replace("\u00e8", "è") title = title.replace("\u00ea", "ê") title = title.replace("\u00e0", "à") video_id = plugintools.find_single_match(entry, 'id":"(.*?)",') if video_id: plugintools.log("video_id= " + video_id) return video_id
def americanos(params): plugintools.set_view(TV_SHOWS) url = params.get("url") data = plugintools.read(url) SongLists = plugintools.find_multiple_matches(data, '<channel>(.*?)</channel>') for entry in SongLists: ima = plugintools.find_single_match( entry, '<desc_image>([^"]+)</desc_image>') ima = ima.replace("<![CDATA[", "") ima = ima.replace("]]>", "") titulo = plugintools.find_single_match(entry, '<title>([^"]+)</title>') titulo = base64.b64decode(titulo) titulo = titulo.upper() titulo = titulo.replace("PARENT-CODE=\"6666\"", "") description = plugintools.find_single_match( entry, '<description>([^"]+)</description>') description = base64.b64decode(description) playstation = plugintools.find_single_match( entry, '<stream_url>([^"]+)</stream_url>') playstation = playstation.replace("<![CDATA[", "") playstation = playstation.replace("]]>", "") plugintools.add_item(action="wachexpant", title=titulo, plot=description, url=playstation, thumbnail=ima, fanart=ima, info_labels=None, folder=False, isPlayable=True)
def youtube_playlists(params): plugintools.log("soritvch.youtube_playlists " + repr(params)) # Fetch video list from YouTube feed data = plugintools.read(params.get("url")) plugintools.log("data=" + data) # Extract items from feed pattern = "" matches = plugintools.find_multiple_matches(data, "<entry(.*?)</entry>") for entry in matches: plugintools.log("entry=" + entry) # Not the better way to parse XML, but clean and easy title = plugintools.find_single_match(entry, "<titl[^>]+>([^<]+)</title>") plot = plugintools.find_single_match( entry, "<media\:descriptio[^>]+>([^<]+)</media\:description>") thumbnail = plugintools.find_single_match( entry, "<media\:thumbnail url='([^']+)'") url = plugintools.find_single_match( entry, "<content type\='application/atom\+xml\;type\=feed' src='([^']+)'/>" ) # Appends a new item to the xbmc item list plugintools.add_item(action="youtube_videos", title=title, plot=plot, url=url, thumbnail=thumbnail, folder=True)
def youtube_videos(params): plugintools.log("soritvch.youtube_videos " + repr(params)) # Fetch video list from YouTube feed data = plugintools.read(params.get("url")) plugintools.log("data=" + data) # Extract items from feed pattern = "" matches = plugintools.find_multiple_matches(data, "<entry(.*?)</entry>") for entry in matches: plugintools.log("entry=" + entry) # Not the better way to parse XML, but clean and easy title = plugintools.find_single_match(entry, "<titl[^>]+>([^<]+)</title>") title = title.replace("Disney Junior España | ", "") plot = plugintools.find_single_match(entry, "<summa[^>]+>([^<]+)</summa") thumbnail = plugintools.find_single_match( entry, "<media\:thumbnail url='([^']+)'") video_id = plugintools.find_single_match( entry, "http\://www.youtube.com/watch\?v\=([0-9A-Za-z_-]{11})") url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + video_id # Appends a new item to the xbmc item list plugintools.add_item(action="play", title=title, plot=plot, url=url, thumbnail=thumbnail, isPlayable=True, folder=False)
def youtube_playlists(url): plugintools.log('[%s %s].youtube_playlists %s' % (addonName, addonVersion, repr(params))) data = plugintools.read(url) pattern = "" matches = plugintools.find_multiple_matches(data, "<entry(.*?)</entry>") for entry in matches: plugintools.log("entry=" + entry) title = plugintools.find_single_match(entry, "<titl[^>]+>([^<]+)</title>") plot = plugintools.find_single_match( entry, "<media\:descriptio[^>]+>([^<]+)</media\:description>") thumbnail = plugintools.find_single_match( entry, "<media\:thumbnail url='([^']+)'") url = plugintools.find_single_match( entry, "<content type\='application/atom\+xml\;type\=feed' src='([^']+)'/>" ) fanart = art + 'youtube.png' plugintools.add_item(action="youtube_videos", title=title, plot=plot, url=url, thumbnail=thumbnail, fanart=fanart, folder=True) plugintools.log("fanart= " + fanart)
def youtube_videos(url): plugintools.log('[%s %s].youtube_videos %s' % (addonName, addonVersion, url)) # Fetch video list from YouTube feed data = plugintools.read(url) plugintools.log("data= "+data) # Extract items from feed pattern = "" matches = plugintools.find_multiple_matches(data,"<entry(.*?)</entry>") for entry in matches: plugintools.log("entry="+entry) # Not the better way to parse XML, but clean and easy title = plugintools.find_single_match(entry,"<titl[^>]+>([^<]+)</title>") title = title.replace("I Love Handball | ","") plot = plugintools.find_single_match(entry,"<summa[^>]+>([^<]+)</summa") thumbnail = plugintools.find_single_match(entry,"<media\:thumbnail url='([^']+)'") fanart = art+'youtube.png' video_id = plugintools.find_single_match(entry,"http\://www.youtube.com/watch\?v\=([0-9A-Za-z_-]{11})") url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid="+video_id # Appends a new item to the xbmc item list plugintools.add_item( action="play" , title=title , plot=plot , url=url , thumbnail=thumbnail , fanart=fanart , isPlayable=True, folder=False )
def tumi(params): plugintools.log("[Movies-Online[0.0.1].Tumi "+repr(params)) data = plugintools.read(params.get("url")) if "Video is processing now" in data: xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "El archivo está en proceso", 3 , art+'icon.png')) else: # Vamos a buscar el ID de la página embebida matches = plugintools.find_multiple_matches(data, 'add_my_acc=(.*?)\"') for entry in matches: print 'match',entry # http://tumi.tv/embed-i9l4mr7jph1a.html url = 'http://tumi.tv/embed-' + entry + '.html' # Petición HTTP de esa URL request_headers=[] request_headers.append(["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"]) request_headers.append(["Referer",params.get("url")]) body,response_headers = plugintools.read_body_and_headers(url, headers=request_headers) plugintools.log("body= "+body) video_url= plugintools.find_single_match(body, 'file\: \"(.*?)\"') plugintools.log("video_url= "+video_url) plugintools.add_item(action="play", title= "hola" , url = video_url , folder = False , isPlayable = True) plugintools.play_resolved_url(video_url)
def program_capis(params): plugintools.log("[PalcoTV-0.3.0].LaTuerka Videos"+repr(params)) fanart = params.get("extra") data = plugintools.read(params.get("url")) #plugintools.log("data= "+data) #<a href="/publico-tv/program/59/video/216146/otra-vuelta-de-tuerka-jesus-cintora" class="play"><span>Reproducir</span></a> items_programa = plugintools.find_multiple_matches(data, '<div class="thumb">(.*?)</li>') for entry in items_programa: plugintools.log("items_programa= "+entry) url_programa = plugintools.find_single_match(entry, '<a href=\"(.*?)\"') img_programa = plugintools.find_single_match(entry, '<img src=\"(.*?)\"') title_programa = plugintools.find_single_match(entry, 'title="">(.*?)</a></p>') title_programa = title_programa.split('title="">') title_programa = title_programa[1] title_programa = title_programa.replace("ñ", "ñ") #url_programa = plugintools.find_multiple_matches(entry, '<a href=(.*?)class=\"foto') url_programa = 'http://www.publico.es' + url_programa plugintools.log("url_programa= "+url_programa) url = tuerka_link(url_programa) plugintools.log("img_programa= "+img_programa) plugintools.log("title_programa= "+title_programa) plugintools.add_item(action="play", title = title_programa, url = url , thumbnail = img_programa, fanart = 'http://www.latuerka.net/img/bg.jpg' , folder = False , isPlayable = True)
def GetSerieChapters(params): #plugintools.log("[%s %s] Seriesadicto: getseriechapters() %s" % (addonName, addonVersion, repr(params))) season = params.get("season") datamovie = {} datamovie["Plot"] = params.get("plot") data = plugintools.read(params.get("url")) show = params.get("series_id") # Obtenemos modo de vista del usuario para series TV if show is None: show = params.get("page") if show is None: show = "tvshows" plugintools.log("show= "+show) plugintools.modo_vista(show) season = plugintools.find_multiple_matches(data, season + '(.*?)</table>') season = season[0] for entry in season: url_cap = plugintools.find_multiple_matches(season, '<a href=\"/capitulo(.*?)\" class=\"color4\"') title = plugintools.find_multiple_matches(season, 'class=\"color4\">(.*?)</a>') num_items = len(url_cap) i = 1 while i <= num_items: url_cap_fixed = 'http://seriesadicto.com/capitulo/' + url_cap[i-1] title_fixed = title[i-1] fanart = "http://socialgeek.co/wp-content/uploads/2013/06/series-TV-Collage-television-10056729-2560-1600.jpg" plugintools.add_item(action="seriesadicto4", title= title_fixed, url = url_cap_fixed, thumbnail = params.get("thumbnail") , extra = str(i) , info_labels = datamovie , page = show , plot = datamovie["Plot"] , fanart = fanart, folder = True, isPlayable = False) i = i + 1
def tumi(params): plugintools.log("[PalcoTV[0.3.0].Tumi " + repr(params)) data = plugintools.read(params.get("url")) if "Video is processing now" in data: xbmc.executebuiltin( "Notification(%s,%s,%i,%s)" % ('PalcoTV', "El archivo está en proceso", 3, art + 'icon.png')) else: # Vamos a buscar el ID de la página embebida matches = plugintools.find_multiple_matches(data, 'add_my_acc=(.*?)\"') for entry in matches: print 'match', entry # http://tumi.tv/embed-i9l4mr7jph1a.html url = 'http://tumi.tv/embed-' + entry + '.html' # Petición HTTP de esa URL request_headers = [] request_headers.append([ "User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31" ]) request_headers.append(["Referer", params.get("url")]) body, response_headers = plugintools.read_body_and_headers( url, headers=request_headers) plugintools.log("body= " + body) video_url = plugintools.find_single_match(body, 'file\: \"(.*?)\"') plugintools.log("video_url= " + video_url) plugintools.add_item(action="play", title="hola", url=video_url, folder=False, isPlayable=True) plugintools.play_resolved_url(video_url)
def adelante_geturl(params): plugintools.log("[PalcoTV-0.3.0].LaLigatv.es getURL: "+repr(params)) data = plugintools.read(params.get("url")) plugintools.log("data= "+data) url = plugintools.find_single_match(data, 'src: escape\(\"(.*?)\"') plugintools.log("URL= "+url) plugintools.play_resolved_url(url)
def tuerka_link(url_programa): plugintools.log("[PalcoTV-0.3.0].LaTuerka Link " + url_programa) data = plugintools.read(url_programa) plugintools.log("data= "+data) url = plugintools.find_single_match(data, 'stream\:\'(.*?)\',') plugintools.log("url= "+url) return url
def laligatv(params): plugintools.log("[PalcoTV-0.3.0].laligatv.es Playlist Sport Channels( "+repr(params)) thumbnail = params.get("thumbnail") plugintools.log("thumbnail= "+thumbnail) plugintools.add_item(action="", title = '[B][I][COLOR darkviolet]LALIGATV.ES[/B][/I][/COLOR]', url = "", thumbnail = 'http://files.lfp.es/201402/640x360_06172611noticia-la-liga-tv.es.jpg' , fanart = 'https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-ash3/556377_550288405007723_1790184113_n.jpg' , folder = True, isPlayable = False) plugintools.add_item(action="", title = '[B][I][COLOR white]Las emisiones comenzarán 15 minutos antes de cada partido[/B][/I][/COLOR]', url = "", thumbnail = 'http://files.lfp.es/201402/640x360_06172611noticia-la-liga-tv.es.jpg' , fanart = 'https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-ash3/556377_550288405007723_1790184113_n.jpg' , folder = True, isPlayable = False) url = params.get("url") thumbnail = params.get("thumbnail") fanart = params.get("fanart") title = params.get("title") plugintools.log("title= "+title) data = plugintools.read(url) match_total = plugintools.find_single_match(data, 'id=\"coming-soon\"(.*?)fb-root') plugintools.log("match_total= "+match_total) matches_dia = plugintools.find_single_match(data, 'id=\"coming-soon\"(.*?)</div></div>') plugintools.log("matches_dia= "+matches_dia) jornada = plugintools.find_multiple_matches(match_total, 'class=\"title_jornada\">(.*?)</div>') #print 'jornada',jornada matches = plugintools.find_multiple_matches(matches_dia, '<a href="(.*?)</a>') plugintools.add_item(action="" , title = '[COLOR lavender][B]' + jornada[0] + '[/B][/COLOR]' , thumbnail = thumbnail , folder = False , isPlayable = False) for entry in matches: plugintools.log("entry= "+entry) url_partido = entry.split('"') url_partido = url_partido[0] url_partido = url_partido.strip() plugintools.log("url_partido= "+url_partido) hora = plugintools.find_single_match(entry, 'hora_partido_otras_competiciones\">(.*?)</span>') plugintools.log("hora= "+hora) local = plugintools.find_single_match(entry, 'equipo_local_otras_competiciones\">(.*?)</span>') visitante = plugintools.find_single_match(entry, 'equipo_visitante_otras_competiciones\">(.*?)</span>') plugintools.log("local= "+local) plugintools.log("viistante= "+visitante) plugintools.add_item(action="adelante_geturl" , title = '[COLOR lightyellow][B](' + hora + ')[/B][/COLOR][COLOR white] ' + local + ' - ' + visitante + ' [/COLOR]' , url = url_partido , thumbnail = params.get("thumbnail") , folder = False , isPlayable = True) if len(jornada) >= 2: plugintools.add_item(action="" , title = '[COLOR lavender][B]' + jornada[1] + '[/B][/COLOR]' , thumbnail = thumbnail , folder = False , isPlayable = False) matches_dia = plugintools.find_single_match(match_total, jornada[1]+'(.*?)</div></div>') plugintools.log("matches_dia= "+matches_dia) matches = plugintools.find_multiple_matches(matches_dia, '<a href="(.*?)</a>') for entry in matches: plugintools.log("entry= "+entry) url_partido = entry.split('"') url_partido = url_partido[0] url_partido = url_partido.strip() plugintools.log("url_partido= "+url_partido) hora = plugintools.find_single_match(entry, 'hora_partido_otras_competiciones\">(.*?)</span>') plugintools.log("hora= "+hora) local = plugintools.find_single_match(entry, 'equipo_local_otras_competiciones\">(.*?)</span>') visitante = plugintools.find_single_match(entry, 'equipo_visitante_otras_competiciones\">(.*?)</span>') plugintools.log("local= "+local) plugintools.log("viistante= "+visitante) plugintools.add_item(action="adelante_geturl" , title = '[COLOR lightyellow][B](' + hora + ')[/B][/COLOR][COLOR white] ' + local + ' - ' + visitante + ' [/COLOR]' , url = url_partido , thumbnail = params.get("thumbnail") , folder = False , isPlayable = True)
def mips(url,ref,res): p = re.compile(ur'(width|height|channel)=\'?"?([^\,\'"]+)');par=re.findall(p,str(res)); w=par[0][1];h=par[1][1];c=par[2][1];ref=url;url='http://www.mips.tv/embedplayer/'+c+'/1/'+w+'/'+h;body=''; bodi=curl_frame(url,ref,body);#print bodi p ='SWFObject\(\'?"?([^\'"]+)';swf='http://www.mips.tv'+plugintools.find_single_match(bodi,p); p = 'FlashVars\'?"?,?\s?\'?"?([^\'"]+)';flashvars=plugintools.find_single_match(bodi,p); p = re.compile(ur'\&?.*?=([^\&]+)');flashvars=re.findall(p,flashvars);id=flashvars[0];c=flashvars[1]; lb='http://mips.tv:1935/loadbalancer';lb=plugintools.read(lb);lb=plugintools.find_single_match(lb,'redirect=(.*)'); media_url = 'rtmp://'+lb+'/live/ playpath='+c+'?id='+id+' swfUrl='+swf+' swfVfy=1 conn=S:OK live=true pageUrl='+url plugintools.play_resolved_url(media_url) print "MEDIA URL="+media_url
def torrentvru_channels(url): plugintools.log("[tvspot 4.0].Torrent-tv.ru getAcestream: "+url) data = plugintools.read(url) plugintools.log("data= "+data) match = plugintools.find_single_match(data, 'this.loadPlayer(.*?),{autoplay:') match = match.replace('"', "") match = match.replace("(", "") url = match.strip() plugintools.log("ace= "+url) return url
def check_for_updates(): plugintools.log("ruyaiptv.updater checkforupdates") # Descarga el fichero con la versión en la web try: plugintools.log("ruyaiptv.updater remote_version_file="+REMOTE_VERSION_FILE) data = plugintools.read( REMOTE_VERSION_FILE ) versiondescargada = data.splitlines()[0] urldescarga = data.splitlines()[1] plugintools.log("ruyaiptv.updater version descargada="+versiondescargada) # Lee el fichero con la versión instalada plugintools.log("ruyaiptv.updater local_version_file="+LOCAL_VERSION_FILE) infile = open( LOCAL_VERSION_FILE ) data = infile.read() infile.close(); versionlocal = data.splitlines()[0] plugintools.log("ruyaiptv.updater version local="+versionlocal) if int(versiondescargada)>int(versionlocal): plugintools.log("ruyaiptv.updater update found") yes_pressed = plugintools.message_yes_no("RuYa IPTV","An update is available!","Do you want to install it now?") if yes_pressed: try: plugintools.log("ruyaiptv.updater Download file...") local_file_name = os.path.join( plugintools.get_data_path() , "update.zip" ) urllib.urlretrieve(urldescarga, local_file_name ) # Lo descomprime plugintools.log("ruyaiptv.updater Unzip file...") import ziptools unzipper = ziptools.ziptools() destpathname = xbmc.translatePath( "special://home/addons") plugintools.log("ruyaiptv.updater destpathname=%s" % destpathname) unzipper.extract( local_file_name , destpathname ) # Borra el zip descargado plugintools.log("ruyaiptv.updater borra fichero...") os.remove(local_file_name) plugintools.log("ruyaiptv.updater ...fichero borrado") xbmc.executebuiltin((u'XBMC.Notification("Updated", "The add-on has been updated", 2000)')) xbmc.executebuiltin( "Container.Refresh" ) except: xbmc.executebuiltin((u'XBMC.Notification("Not updated", "An error causes the update to fail", 2000)')) except: import traceback plugintools.log(traceback.format_exc())
def servidores(params): plugintools.log("miratuserie_tv.servidores "+repr(params)) data=plugintools.read(params.get("url")) urlservidores=plugintools.find_single_match(data,'<iframe class="servidores" src="([^"]+)"') urlser="http://www.miratuserie.tv"+urlservidores plugintools.add_item(title=urlser,folder=False)#linea para monitoriar variable pagservidores=plugintools.read(urlser) #print "---------------------------------Imprimiendo pagina-------------------------------------------",pagservidores,"---------------------------------------------------------------------------" subnum=plugintools.find_single_match(pagservidores,'tc:(.*?),') iniciourl=plugintools.find_single_match(pagservidores,"url: '(.*?)'") calidadN=plugintools.find_single_match(pagservidores,'<div id="servidoresN">(.*?)</div>') CalidadHD=plugintools.find_single_match(pagservidores,'<div id="servidoresHD">(.*?)</div>') #print "---------------------------------Imprimiendo calidad N-------------------------------------------",calidadN,"---------------------------------------------------------------------------" #print "---------------------------------Imprimiendo CalidadHD-------------------------------------------",CalidadHD,"---------------------------------------------------------------------------" #print "---------------------------------Imprimiendo subnum-------------------------------------------",subnum,"---------------------------------------------------------------------------" #print "---------------------------------Imprimiendo iniciourl-------------------------------------------",iniciourl,"---------------------------------------------------------------------------" patron='<a href="#"(.*?)</a>' matchesN = re.compile(patron,re.DOTALL).findall(calidadN) matchesHD = re.compile(patron,re.DOTALL).findall(CalidadHD) #print "---------------------------------Imprimiendo matchesN------------------------------------------",matchesN,"---------------------------------------------------------------------------" #print "---------------------------------Imprimiendo matchesHD-------------------------------------------",matchesHD,"---------------------------------------------------------------------------" plugintools.add_item(title="[COLOR blue][B]Calidad Estandar[/B][/COLOR]",folder=False) for match in matchesN: nombre=plugintools.find_single_match(match,'<img alt="([^"]+)"') imagen="http:"+plugintools.find_single_match(match,'src="([^"]+)"') url=plugintools.find_single_match(match,'onclick="([^"]+)"')+' sub="'+subnum+'" urlorg="'+iniciourl+'"' #print "------------------------------------variables obtenidas nombre", nombre,"imagen",imagen,"url",url,"-----------------------" plugintools.add_item(action="play",title=nombre,thumbnail=imagen,url=url,isPlayable=True, folder=False) plugintools.add_item(title="[COLOR blue][B]Calidad HD[/B][/COLOR]",folder=False) for match in matchesHD: nombre=plugintools.find_single_match(match,'<img alt="([^"]+)"') imagen="http:"+plugintools.find_single_match(match,'src="([^"]+)"') url=plugintools.find_single_match(match,'onclick="([^"]+)"') #print "------------------------------------variables obtenidas nombre", nombre,"imagen",imagen,"url",url,"-----------------------" plugintools.add_item(action="play",title=nombre,thumbnail=imagen,url=url,isPlayable=True, folder=False)
def nowvideo(params): plugintools.log("[Movies-Online 0.0.1].nowvideo " + repr(params)) data = plugintools.read(params.get("url")) #data = data.replace("amp;", "") if "The file is being converted" in data: xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "El archivo está en proceso", 3 , art+'icon.png')) elif "no longer exists" in data: xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "El archivo ha sido borrado", 3 , art+'icon.png')) else: #plugintools.log("data= "+data) domain = plugintools.find_single_match(data, 'flashvars.domain="([^"]+)') video_id = plugintools.find_single_match(data, 'flashvars.file="([^"]+)') filekey = plugintools.find_single_match(data, 'flashvars.filekey=([^;]+)') # En la página nos da el token de esta forma (siendo fkzd el filekey): var fkzd="83.47.1.12-8d68210314d70fb6506817762b0d495e"; token_txt = 'var '+filekey #plugintools.log("token_txt= "+token_txt) token = plugintools.find_single_match(data, filekey+'=\"([^"]+)') token = token.replace(".","%2E").replace("-","%2D") #plugintools.log("domain= "+domain) #plugintools.log("video_id= "+video_id) #plugintools.log("filekey= "+filekey) #plugintools.log("token= "+token) if video_id == "": xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "Error!", 3 , art+'icon.png')) else: #http://www.nowvideo.sx/api/player.api.php?user=undefined&pass=undefined&cid3=undefined&numOfErrors=0&cid2=undefined&key=83%2E47%2E1%2E12%2D8d68210314d70fb6506817762b0d495e&file=b5c8c44fc706f&cid=1 url = 'http://www.nowvideo.sx/api/player.api.php?user=undefined&pass=undefined&cid3=undefined&numOfErrors=0&cid2=undefined&key=' + token + '&file=' + video_id + '&cid=1' # Vamos a lanzar una petición HTTP de esa URL referer = 'http://www.nowvideo.sx/video/b5c8c44fc706f' request_headers=[] request_headers.append(["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31"]) request_headers.append(["Referer",referer]) body,response_headers = plugintools.read_body_and_headers(url, headers=request_headers) # plugintools.log("data= "+body) # body= url=http://s173.coolcdn.ch/dl/04318aa973a3320b8ced6734f0c20da3/5440513e/ffe369cb0656c0b8de31f6ef353bcff192.flv&title=The.Black.Rider.Revelation.Road.2014.DVDRip.X264.AC3PLAYNOW.mkv%26asdasdas&site_url=http://www.nowvideo.sx/video/b5c8c44fc706f&seekparm=&enablelimit=0 body = body.replace("url=", "") body = body.split("&") if len(body) >= 0: print 'body',body url = body[0] plugintools.play_resolved_url(url) xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "Cargando vídeo...", 1 , art+'icon.png')) else: xbmc.executebuiltin("Notification(%s,%s,%i,%s)" % ('Movies-Online', "Error!", 3 , art+'icon.png'))
def get_datos(): pagina = plugintools.read("http://miratuserie.tv/lista.json") #Obitiene el Json con la lista de series y URL varJson= json.loads(pagina) for i in range(len(varJson)): if i==18: listaSeries.append("Escobar, El Patron del Mal") URLSeries.append('http://www.miratuserie.tv/mira-'+varJson[i]["url"]) seriesThums.append('http://sc.miratuserie.tv/posters/'+varJson[i]["url"]+".jpg") else: listaSeries.append(varJson[i]["value"]) URLSeries.append('http://www.miratuserie.tv/mira-'+varJson[i]["url"]) seriesThums.append('http://sc.miratuserie.tv/posters/'+varJson[i]["url"]+".jpg")
def ucaster(url,ref,res): p1 = re.compile(ur'channel=?\'?"?([^\'"\&,;]+)');f1=re.findall(p1, str(res)); p2 = re.compile(ur'width=?\'?"?([^\'"\&,;]+)');f2=re.findall(p2, str(res)); p3 = re.compile(ur'height=?\'?"?([^\'"\&,;]+)');f3=re.findall(p3, str(res)); c=f1[0];w=f2[0];h=f3[0]; url='http://www.ucaster.eu/embedded/'+c+'/1/'+w+'/'+h;body='' bodi=curl_frame(url,ref,body) p ='SWFObject\(\'?"?([^\'"]+)';swf='http://www.ucaster.eu'+plugintools.find_single_match(bodi,p); p = 'FlashVars\'?"?,?\s?\'?"?([^\'"]+)';flashvars=plugintools.find_single_match(bodi,p);print flashvars; p = re.compile(ur'\&?.*?=([^\&]+)');flashvars=re.findall(p,flashvars);print flashvars;id=flashvars[0];c=flashvars[1]; lb='http://www.ucaster.eu:1935/loadbalancer';lb=plugintools.read(lb);lb=plugintools.find_single_match(lb,'redirect=(.*)'); media_url = 'rtmp://'+lb+'/live/ playpath='+c+'?id='+id+' swfUrl='+swf+' swfVfy=1 conn=S:OK live=true pageUrl='+url plugintools.play_resolved_url(media_url)
def epg_verahora(params): plugintools.log("Arena+ " + repr(params)) url = params.get("url") thumbnail = params.get("thumbnail") fanart = params.get("extra") data = plugintools.read(url) # plugintools.log("data= "+data) plugintools.add_item( action="", title="[COLOR lightyellow][B]¿Qué ver ahora?[/B][/COLOR]", thumbnail=thumbnail, fanart=fanart, folder=False, isPlayable=False, ) body = plugintools.find_multiple_matches(data, '<td class="prga-i">(.*?)</tr>') for entry in body: channel = plugintools.find_single_match(entry, 'alt="([^"]+)') print "channel", channel ahora = plugintools.find_single_match(entry, "<p>(.*?)</p>") print "ahora", ahora hora_luego = plugintools.find_single_match(entry, 'class="fec1">(.*)</span>') hora_luego = hora_luego.split("</span>") hora_luego = hora_luego[0] print "hora_luego", hora_luego diff_luego = plugintools.find_single_match(entry, 'class="fdiff">([^<]+)').strip() print "diff_luego", diff_luego evento_luego = plugintools.find_single_match(entry, '<span class="tprg1">(.*?)</span>') print "evento_luego", evento_luego evento_mastarde = plugintools.find_single_match(entry, '<span class="tprg2">(.*?)</span>') print "evento_mastarde", evento_mastarde plugintools.add_item( action="", title="[COLOR orange][B]" + channel + " [/B][COLOR lightyellow]" + ahora + "[/COLOR] [COLOR lightgreen][I](" + diff_luego + ") [/I][/COLOR][COLOR white][B]" + hora_luego + " [/COLOR][/B] " + evento_luego, thumbnail=thumbnail, fanart=fanart, folder=False, isPlayable=False, )
def seriecatcher(params): plugintools.log("[Arena+ 0.3.3].seriecatcher "+repr(params)) show = params.get("series_id") # Obtenemos modo de vista del usuario para series TV if show is None: show = params.get("page") if show is None: show = "tvshows" plugintools.log("show= "+show) plugintools.modo_vista(show) url = params.get("url") data = plugintools.read(url) temp = plugintools.find_multiple_matches(data, '<i class=\"glyphicon\"></i>(.*?)</a>') SelectTemp(params, temp)
def seriecatcher(params): #plugintools.log("[%s %s] Seriesadicto: seriecatcher() %s" % (addonName, addonVersion, repr(params))) show = params.get("series_id") # Obtenemos modo de vista del usuario para series TV if show is None: show = params.get("page") if show is None: show = "tvshows" plugintools.log("show= "+show) plugintools.modo_vista(show) url = params.get("url") data = plugintools.read(url) temp = plugintools.find_multiple_matches(data, '<i class=\"glyphicon\"></i>(.*?)</a>') SelectTemp(params, show, temp)
def parse_av_channel(title, url, params): plugintools.log("[PalcoTV-0.3.0].parse_av_channel "+repr(params)) data = plugintools.read(url) fanart = params.get("fanart") plugintools.log("fanart= "+fanart) thumbnail = params.get("thumbnail") url = plugintools.find_single_match(data, 'sop://(.*?)>') url = url.replace('"', "").strip() if url == "": plugintools.add_item(action="play" , title=title + ' [COLOR red]OFF[/COLOR]', url=url, thumbnail=thumbnail , fanart='http://wallpaper-download.net/wallpapers/football-wallpapers-football-stadium-wallpaper-wallpaper-36537.jpg' , folder = False, isPlayable = True) else: url = 'sop://' + url url = 'plugin://plugin.video.p2p-streams/?url=' + url + '&mode=2&name=' + title plugintools.add_item(action="play" , title=title, url=url, thumbnail=thumbnail , fanart='http://wallpaper-download.net/wallpapers/football-wallpapers-football-stadium-wallpaper-wallpaper-36537.jpg' , folder = False, isPlayable = True)