def detail(params,url,category): xbmc.output("[peliculasyonkis.py] detail") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) # Descarga la página data = scrapertools.cachePage(url) #xbmc.output(data) # ------------------------------------------------------------------------------------ # Busca los enlaces a los videos # ------------------------------------------------------------------------------------ patronvideos = 'href="http://www.peliculasyonkis.com/player/visor_pymeno2.*?id=([^&]+)&al=[^"]+"' matches = re.compile(patronvideos,re.DOTALL).findall(data) if len(matches)>0: scrapertools.printMatches(matches) id = matches[0] xbmc.output("[peliculasyonkis.py] id="+id) dec = Yonkis.DecryptYonkis() url = dec.decryptID(dec.unescape(id)) if ":" in url: match = url.split(":") url = choiceOne(match) if url == "": return print 'codigo :%s' %url else: xbmctools.alertnodisponible() return xbmctools.playvideo(CHANNELNAME,"Megavideo",url,category,title,thumbnail,plot)
def play(params, url, category): logger.info("[sonolatino.py] play") title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8") try: thumbnail = urllib.unquote_plus(params.get("thumbnail")) except: thumbnail = xbmc.getInfoImage("ListItem.Thumb") plot = urllib.unquote_plus(params.get("plot")) plot = urllib.unquote_plus(params.get("plot")) try: plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") except: plot = xbmc.getInfoLabel("ListItem.Plot") server = params["server"] logger.info("[sonolatino.py] thumbnail=" + thumbnail) logger.info("[sonolatino.py] server=" + server) if server == "izlesene": print server data = scrapertools.cachePage(url) print data patron = 'durl="([^"]+)"' matches = re.compile(patron, re.DOTALL).findall(data) if len(matches) > 0: url = matches[0] server = "Directo" xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def play(params, url, category): logger.info("[ecarteleratrailers.py] play") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") server = params["server"] # ------------------------------------------------------ # Descarga la página # ------------------------------------------------------ data = scrapertools.cachePage(url) #logger.info(data) # ------------------------------------------------------ # Extrae las películas # ------------------------------------------------------ patron = "so\.addVariable\('file','([^']+)'\)" #patron = "s1\.addParam\('flashvars'\,'file\=([^\&]+)\&" matches = re.compile(patron, re.DOTALL).findall(data) if DEBUG: scrapertools.printMatches(matches) if len(matches) > 0: url = urlparse.urljoin(url, matches[0]) logger.info("[ecarteleratrailers.py] url=" + url) xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def detail(params, url, category): logger.info("[documentalesyonkis.py] detail") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") # ------------------------------------------------------------------------------------ # Busca los enlaces a los videos # ------------------------------------------------------------------------------------ data = scrapertools.cachePage(url) patroniframe = '<iframe src="(http:\/\/documentales\.videosyonkis\.com.*?id=(.*?))" onLoad.*' matches = re.compile(patroniframe, re.DOTALL).findall(data) # scrapertools.printMatches(matches) if len(matches) > 0: id = matches[0][1] logger.info("[documentalesyonkis.py] detail id=" + id) if "&" in id: ids = id.split("&") id = ids[0] dec = Yonkis.DecryptYonkis() id = dec.decryptALT(dec.charting(dec.unescape(id))) logger.info("[documentalesyonkis.py] detail id=" + id) url = id else: xbmctools.alertnodisponible() return xbmctools.playvideo(CHANNELNAME, "Megavideo", url, category, title, thumbnail, plot)
def play(params,url,category): logger.info("[delatv.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = "" # Abre dialogo dialogWait = xbmcgui.DialogProgress() dialogWait.create( 'Accediendo al video...', title , plot ) # Busca los enlaces a los videos data = scrapertools.cachePage(url) listavideos = servertools.findvideos(data) # Cierra dialogo dialogWait.close() del dialogWait if len(listavideos)>0: url = listavideos[0][1] server = listavideos[0][2] logger.info("url="+url) xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot) else: xbmctools.alertnodisponible()
def play(params,url,category): logger.info("[a3.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = urllib.unquote_plus( params.get("plot") ) server = "directo" xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot) ''' flvstreamer -V -r "rtmp://antena3tvfs.fplive.net/antena3mediateca/mp_seriesh2/2010/07/21/00004/001.mp4" -o out.mp4 FLVStreamer v1.9 (c) 2009 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL DEBUG: Parsing... DEBUG: Parsed protocol: 0 DEBUG: Parsed host : antena3tvfs.fplive.net DEBUG: Parsed app : antena3mediateca/mp_seriesh2 DEBUG: Protocol : RTMP DEBUG: Hostname : antena3tvfs.fplive.net DEBUG: Port : 1935 DEBUG: Playpath : mp4:2010/07/21/00004/001.mp4 DEBUG: tcUrl : rtmp://antena3tvfs.fplive.net:1935/antena3mediateca/mp_seriesh2 DEBUG: app : antena3mediateca/mp_seriesh2 DEBUG: flashVer : LNX 10,0,22,87 DEBUG: live : no DEBUG: timeout : 120 sec ''' '''
def play(params,url,category): logger.info("[peliculasid.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) try: plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) except: plot = xbmc.getInfoLabel( "ListItem.Plot" ) server = params["server"] if "|" in url: matches = url.split("|") patronvideos = 'file=([^\&]+)\&' c = 0 listdata = [] for match in matches: c += 1 print match data = scrapertools.cachePage(match) matches2 = re.compile(patronvideos,re.DOTALL).findall(data) listdata.append(["Parte %d" %c,matches2[0]]) url = xmltoplaylist.MakePlaylistFromList(listdata) elif "iframeplayer.php" in url: #"http://peliculasid.com/iframeplayer.php?url=aHR0cDovL3ZpZGVvLmFrLmZhY2Vib29rLmNvbS9jZnMtYWstc25jNC80MjIxNi82MS8xMjgxMTI4ODgxOTUwXzM5NTAwLm1wNA==" data = scrapertools.cachePage(url) patronvideos = 'file=([^\&]+)\&' matches = re.compile(patronvideos,re.DOTALL).findall(data) if len(matches)>0: url = matches[0] xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): xbmc.output("[yotix.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = urllib.unquote_plus( params.get("plot") ) server = urllib.unquote_plus( params.get("server") ) # Abre dialogo dialogWait = xbmcgui.DialogProgress() dialogWait.create( 'Accediendo al video...', title , plot ) if server=="Directo": # Descarga la página del reproductor # http://yotix.com/flash/UPY6KEB4/cleaner.html xbmc.output("url="+url) data = scrapertools.cachePage(url) patron = 'so.addParam\(\'flashvars\',\'\&file\=([^\&]+)\&' matches = re.compile(patron,re.DOTALL).findall(data) if len(matches)>0: url = matches[0] else: patron = 'http://yotix.tv/flash/([^\/]+)/' matches = re.compile(patron,re.DOTALL).findall(url) if len(matches)>0: url = matches[0] xbmc.output("url="+url) # Cierra dialogo dialogWait.close() del dialogWait xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): logger.info("[ecarteleratrailers.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = params["server"] # ------------------------------------------------------ # Descarga la página # ------------------------------------------------------ data = scrapertools.cachePage(url) #logger.info(data) # ------------------------------------------------------ # Extrae las películas # ------------------------------------------------------ patron = "so\.addVariable\('file','([^']+)'\)" #patron = "s1\.addParam\('flashvars'\,'file\=([^\&]+)\&" matches = re.compile(patron,re.DOTALL).findall(data) if DEBUG: scrapertools.printMatches(matches) if len(matches)>0: url = urlparse.urljoin(url,matches[0]) logger.info("[ecarteleratrailers.py] url="+url) xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): xbmc.output("[argia.py] play") # Page downloading data = scrapertools.cachePage(url) ## ## PARSE VIDEO DATA ## ''' s1.addVariable('file','/multimedia/docs/bideoak/dantzaTradizioa.flv'); ''' #pattern = 'file=(.*?).flv' pattern = "s1\.addVariable\('file','([^']+)'\)" matches = re.compile(pattern,re.DOTALL).findall(data) scrapertools.printMatches(matches) try: url = MAINURL+matches[0] except: url = "" title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = "Directo" xbmctools.playvideo(CHANNELCODE,server,url,category,title,thumbnail,plot)
def play(params,url,category): xbmc.output("[skai_folders.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "UTF-8" ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "UTF-8" ) server = "Directo" # -------------------------------------------------------- # DDownload page # -------------------------------------------------------- data = scrapertools.cachePage(url) pattern = 'rtmp://cp67754.edgefcs.net/ondemand/mp4:content/Fakeloi/20.*?mp4' matches = re.compile(pattern,re.DOTALL).findall(data) xbmc.output("[skai_folders.py] matches are") if len(matches)==0: xbmctools.alerterrorpagina() return url = matches[0] xbmc.output("url="+url) plot= HTMLParser.HTMLParser().unescape(plot)+"_UNESCAPED_" xbmctools.playvideo(CHANNELCODE,server,url,category,title,thumbnail,plot)
def play(params,url,category): logger.info("[animeid.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = params["server"] scrapedurl = "" # Lee la página con el player data = scrapertools.downloadpageGzip(url) #logger.info(data) # Extrae las entradas (capítulos #patronvideos = 'SWFObject\(\'http\:\/\/www\.SeriesID\.com\/player\.swf\'.*?\&file\=([^\&]+)&' patronvideos = "so.addParam\('flashvars','\&file=([^\&]+)\&" matches = re.compile(patronvideos,re.DOTALL).findall(data) if len(matches)>0: scrapedurl = matches[0] server = "Directo" else: patronvideos = '<param name="flashvars" value="file=([^\&]+)&' matches = re.compile(patronvideos,re.DOTALL).findall(data) if len(matches)>0: scrapedurl = matches[0] server= "Directo" xbmctools.playvideo(CHANNELNAME,server,scrapedurl,category,title,thumbnail,plot)
def play(params,url,category): xbmc.output("[terratv.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = "Directo" xbmc.output("[terratv.py] thumbnail="+thumbnail) # Abre dialogo dialogWait = xbmcgui.DialogProgress() dialogWait.create( 'Descargando datos del vídeo...', title ) # -------------------------------------------------------- # Descarga pagina detalle # -------------------------------------------------------- data = scrapertools.cachePage(url) patron = "'(http\:\/\/www\.terra\.tv\/templates\/getVideo\.aspx[^']+)'" matches = re.compile(patron,re.DOTALL).findall(data) scrapertools.printMatches(matches) url = matches[0] xbmc.output("url="+url) req = urllib2.Request(url) req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3') response = urllib2.urlopen(req) data=response.read() response.close() xbmc.output("data="+data) patron = '<ref href="([^"]+)"' matches = re.compile(patron,re.DOTALL).findall(data) if len(matches)==0: patron = '<video src="([^"]+)"' matches = re.compile(patron,re.DOTALL).findall(data) url = matches[0] xbmc.output("url="+url) # -------------------------------------------------------- # Amplia el argumento # -------------------------------------------------------- patron = '<div id="encuesta">\s*<div class="cab">.*?</div>(.*?)</div>' matches = re.compile(patron,re.DOTALL).findall(data) scrapertools.printMatches(matches) if len(matches)>0: plot = "%s" % matches[0] plot = plot.replace("<p>","") plot = plot.replace("</p>"," ") plot = plot.replace("<strong>","") plot = plot.replace("</strong>","") plot = plot.replace("<br />"," ") plot = plot.strip() # Cierra dialogo dialogWait.close() del dialogWait xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): xbmc.output("[pintadibujos.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = urllib.unquote_plus( params.get("plot") ) server = params["server"] xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): xbmc.output("[sieterm.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = "Directo" xbmctools.playvideo(CHANNELCODE,server,url,category,title,thumbnail,plot)
def play(params,url,category): xbmc.output("[tvmallorca.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = urllib.unquote_plus( params.get("plot") ) server = "Directo" xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): xbmc.output("[filmesonlinebr.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = params["server"] xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): logger.info("[gratisdocumentales.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = params["server"] xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): logger.info("[cinegratis24h.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = params["server"] xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): logger.info("[tumejortv.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = urllib.unquote_plus( params.get("plot") ) server = urllib.unquote_plus( params.get("server") ) xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): xbmc.output("[meristation.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = "Directo" # URL de detalle # http://www.meristation.com/v3/des_videos.php?pic=WII&idj=cw49944ba621067&COD=cw4a8d04e8e355d # URL con el vídeo # http://www.meristation.com/v3/des_videos.php?id=cw4a8d04e8e355d&c=1&pic=WII&idj=cw49944ba621067 # URL descargar vídeo # http://www.meristation.com/v3/des_videos.php?id=cw4a8d04e8e355d&c=1&pic=WII&idj=cw49944ba621067 # XML # http://www.meristation.com/v3/video_player.php?vid=cw48fc48c0d0da9&res=alta&format=xml&version=1.5.002 # Extrae el código del vídeo xbmc.output("[meristation.py] url="+url) patron = 'http\://www.meristation.com/v3/des_videos.php.*?\&COD\=([^$]+)$' matches = re.compile(patron,re.DOTALL).findall(url) scrapertools.printMatches(matches) if len(matches)==0: patron = 'id\=([^\&]+)\&' matches = re.compile(patron,re.DOTALL).findall(url) scrapertools.printMatches(matches) if len(matches)==0: patron = 'http\://www.meristation.com/v3/des_videos.php.*?\&id\=([^$]+)$' matches = re.compile(patron,re.DOTALL).findall(url) scrapertools.printMatches(matches) if len(matches)==0: xbmctools.alertnodisponible() return # Descarga la página xbmc.output("[meristation.py] vid="+matches[0]) url = 'http://www.meristation.com/v3/video_player.php?id='+matches[0]+'&format=xml' xbmc.output("[meristation.py] url="+url) data = scrapertools.downloadpagewithcookies(url) xbmc.output(data[:200]) # Extrae las entradas (carpetas) patron = '<location>([^<]+)</location>' matches = re.compile(patron,re.DOTALL).findall(data) scrapertools.printMatches(matches) if len(matches)==0: return url = matches[0] url = url.replace(" ","%20") xbmctools.playvideo(CHANNELCODE,server,url,category,title,thumbnail,plot)
def play(params, url, category): xbmc.output("[thehaine.py] play") title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8") thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") server = "Directo" xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def play(params, url, category): logger.info("[terrorygore.py] play") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = urllib.unquote_plus(params.get("plot")) server = params["server"] xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def play(params,url,category): logger.info("[newcineonline.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = xbmc.getInfoImage( "ListItem.Thumb" ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = params["server"] logger.info("[newcineonline.py] thumbnail="+thumbnail) logger.info("[newcineonline.py] server="+server) xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): xbmc.output("[stagevusite.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = xbmc.getInfoImage( "ListItem.Thumb" ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = params["server"] xbmc.output("[stagevusite.py] thumbnail="+thumbnail) xbmc.output("[stagevusite.py] server="+server) xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): logger.info("[divxonline.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = xbmc.getInfoImage( "ListItem.Thumb" ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = params["server"] logger.info("[divxonline.py] thumbnail="+thumbnail) logger.info("[divxonline.py] server="+server) xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def youtubeplay(params,url,category): logger.info("[peliculas21.py] youtubeplay") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) videourl = youtube.geturl(id) if videourl == "":return logger.info("link directo de youtube : "+videourl) xbmctools.playvideo("Trailer",server,videourl,category,title,thumbnail,plot)
def youtubeplay(params,url,category): logger.info("[peliculas21.py] youtubeplay") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) videourl = youtube.geturl(id) if videourl == ("" or "Esc"):return logger.info("link directo de youtube : "+videourl) xbmctools.playvideo("Trailer",server,videourl,category,title,thumbnail,plot)
def detail(params,url,category): logger.info("[dospuntocerovision.py] detail") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) try: plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) except: plot = xbmc.getInfoLabel( "ListItem.Plot" ) server = params["server"] xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params, url, category): logger.info("[peliculasid.py] play") title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8") thumbnail = urllib.unquote_plus(params.get("thumbnail")) try: plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") except: plot = xbmc.getInfoLabel("ListItem.Plot") server = params["server"] if "|" in url: matches = url.split("|") patronvideos = 'file=([^\&]+)\&' c = 0 listdata = [] for match in matches: c += 1 print match data = scrapertools.downloadpageGzip(match) matches2 = re.compile(patronvideos, re.DOTALL).findall(data) listdata.append(["Parte %d" % c, matches2[0]]) url = xmltoplaylist.MakePlaylistFromList(listdata) elif "iframeplayer.php" in url: #"http://peliculasid.net/iframeplayer.php?url=aHR0cDovL3ZpZGVvLmFrLmZhY2Vib29rLmNvbS9jZnMtYWstc25jNC80MjIxNi82MS8xMjgxMTI4ODgxOTUwXzM5NTAwLm1wNA==" data = scrapertools.downloadpageGzip(url) patronvideos = 'file=([^\&]+)\&' matches = re.compile(patronvideos, re.DOTALL).findall(data) if len(matches) > 0: url = matches[0] elif "iframevk.php" in url: data = scrapertools.downloadpageGzip(url) patronvideos = '<iframe src="(http://vk[^/]+/video_ext.php[^"]+)"' matches = re.compile(patronvideos, re.DOTALL).findall(data) if len(matches) > 0: import vk server = "Directo" url = vk.geturl(matches[0]) elif "iframemv.php" in url: data = scrapertools.downloadpageGzip(url) patronvideos = 'src="http://www.megavideo.com/mv_player.swf\?v\=([^"]+)"' matches = re.compile(patronvideos, re.DOTALL).findall(data) if len(matches) > 0: server = "Megavideo" url = matches[0] xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def play(params,url,category): logger.info("[frozenlayer.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = params["server"] # En tu.tv, la URL es la del detalle en el servidor if server=="tu.tv": data = scrapertools.cachePage(url) listavideos = servertools.findvideos(data) if len(listavideos)>0: url = listavideos[0][1] xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def strm_detail (params,url,category): xbmc.output("[seriesyonkis.py] strm_detail") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) # ------------------------------------------------------------------------------------ # Busca los enlaces a los videos # ------------------------------------------------------------------------------------ url = scrapvideoURL(url) if url == "": return xbmc.output("[seriesyonkis] strm_detail url="+url) xbmctools.playvideo("STRM_Channel","Megavideo",url,category,title,thumbnail,plot,1)
def detail(params,url,category): xbmc.output("[seriesyonkis.py] detail") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) Serie = urllib.unquote_plus( params.get("Serie") ) # ------------------------------------------------------------------------------------ # Busca los enlaces a los videos # ------------------------------------------------------------------------------------ url = scrapvideoURL(url) if url == "": return xbmc.output("[seriesyonkis - detail] url="+url) xbmctools.playvideo(CHANNELNAME,"Megavideo",url,category,title,thumbnail,plot,Serie=Serie)
def play(params,url,category): logger.info("[tupornotv.py] play") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = "Directo" #http://tuporno.tv/videos/adolescentes-trio-follando-18 #http://149.12.64.129/videoscodiH264/a/d/adolescentes-trio-follando-18.flv trozos = url.split("/") id = trozos[len(trozos)-1] url = "http://149.12.64.129/videoscodiH264/"+id[0:1]+"/"+id[1:2]+"/"+id+".flv" logger.info("url="+url) xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params,url,category): logger.info("[peliculaseroticas.py] play") #title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) #thumbnail = xbmc.getInfoImage( "ListItem.Thumb" ) title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = urllib.unquote_plus(params["server"]) #xbmc.executebuiltin("XBMC.ActivateWindow(contextmenu)") #xbmc.executebuiltin("XBMC.ActivateWindow(movieinformation)") logger.info("[peliculaseroticas.py] thumbnail="+thumbnail) logger.info("[peliculaseroticas.py] server="+server) #xbmc.executebuiltin("XBMC.ReplaceWindow(contextmenu)") xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def youtubeplay(params,url,category): xbmc.output("[trailertools.py] youtubeplay") #http://www.youtube.com/watch?v=byvXidWNf2A&feature=youtube_gdata title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) videourl = youtube.geturl(id) if len(videourl)>0: xbmc.output("link directo de youtube : "+videourl) xbmctools.playvideo("Trailer",server,videourl,category,title,thumbnail,plot) elif videourl is None: alertaerror() return else: return ""
def play(params, url, category): xbmc.output("[veocine.py] play") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = urllib.unquote_plus(params.get("plot")) server = urllib.unquote_plus(params.get("server")) # Abre dialogo dialogWait = xbmcgui.DialogProgress() dialogWait.create("Accediendo al video...", title, plot) # Cierra dialogo dialogWait.close() del dialogWait xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def strm_detail (params,url,category): logger.info("[seriesyonkis.py] strm_detail") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) #server = "Megavideo" # ------------------------------------------------------------------------------------ # Busca los enlaces a los videos # ------------------------------------------------------------------------------------ server,url = scrapvideoURL(url) if url == "": return logger.info("[seriesyonkis] strm_detail url="+url) xbmctools.playvideo("STRM_Channel",server,url,category,title,thumbnail,plot,1)
def play(params, url, category): logger.info("[frozenlayer.py] play") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") server = params["server"] # En tu.tv, la URL es la del detalle en el servidor if server == "tu.tv": data = scrapertools.cachePage(url) listavideos = servertools.findvideos(data) if len(listavideos) > 0: url = listavideos[0][1] xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def detail(params,url,category): logger.info("[seriesyonkis.py] detail") title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) Serie = urllib.unquote_plus( params.get("Serie") ) # ------------------------------------------------------------------------------------ # Busca los enlaces a los videos # ------------------------------------------------------------------------------------ #server = "Megavideo" server,url = scrapvideoURL(url) if url == "": return logger.info("[seriesyonkis - detail] url="+url) xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot,Serie=Serie)
def youtubeplay(params, url, category): logger.info("[peliculasonlineflv.py] youtubeplay") if "www.youtube" not in url: url = 'http://www.youtube.com' + url title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) videourl = youtube.geturl(id) if len(videourl) > 0: logger.info("link directo de youtube : " + videourl) xbmctools.playvideo("Trailer", server, videourl, category, title, thumbnail, plot) return
def play(params, url, category): logger.info("[veocine.py] play") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = urllib.unquote_plus(params.get("plot")) server = urllib.unquote_plus(params.get("server")) # Abre dialogo dialogWait = xbmcgui.DialogProgress() dialogWait.create('Accediendo al video...', title, plot) # Cierra dialogo dialogWait.close() del dialogWait xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def play(params, url, category): logger.info("[tupornotv.py] play") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") server = "Directo" #http://tuporno.tv/videos/adolescentes-trio-follando-18 #http://149.12.64.129/videoscodiH264/a/d/adolescentes-trio-follando-18.flv trozos = url.split("/") id = trozos[len(trozos) - 1] url = "http://149.12.64.129/videoscodiH264/" + id[0:1] + "/" + id[ 1:2] + "/" + id + ".flv" logger.info("url=" + url) xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def play(params, url, category): logger.info("[tutvsite.py] play") title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8") thumbnail = xbmc.getInfoImage("ListItem.Thumb") plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") server = params["server"] logger.info("[tutvsite.py] thumbnail=" + thumbnail) logger.info("[tutvsite.py] server=" + server) # Descarga la página de detalle y extrae el vídeo data = scrapertools.cachePage(url) listavideos = servertools.findvideos(data) if len(listavideos) > 0: url = listavideos[0][1] logger.info("[tutvsite.py] url=" + url) xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def play(params, url, category): logger.info("[documentariestv.py] play") title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8") title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8") try: thumbnail = urllib.unquote_plus(params.get("thumbnail")) except: thumbnail = xbmc.getInfoImage("ListItem.Thumb") plot = urllib.unquote_plus(params.get("plot")) plot = urllib.unquote_plus(params.get("plot")) try: plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") except: plot = xbmc.getInfoLabel("ListItem.Plot") server = params["server"] logger.info("[documentariestv.py] thumbnail=" + thumbnail) logger.info("[documentariestv.py] server=" + server) xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def detail(params, url, category): logger.info("[peliculasyonkis.py] detail") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") # Descarga la página data = scrapertools.cachePage(url) #logger.info(data) # ------------------------------------------------------------------------------------ # Busca los enlaces a los videos # ------------------------------------------------------------------------------------ patronvideos = 'href="http://www.peliculasyonkis.com/player/visor_([^\.]+).php.*?' patronvideos += 'id=([^"]+)".*?' patronvideos += 'alt="([^"]+)"' patronvideos += '(.*?)</tr>' matches = re.compile(patronvideos, re.DOTALL).findall(data) if len(matches) > 0: scrapertools.printMatches(matches) id, serv = ChoiceOneVideo(matches, title) logger.info("[peliculasyonkis.py] id=" + id) url = Decrypt_Server(id, serv) if (serv in ["pymeno2", "pymeno3"]) and (":" in url): match = url.split(":") url = choiceOnePart(match) if url == "": return print 'codigo :%s' % url else: xbmctools.alertnodisponible() return "" if url == "": return xbmctools.playvideo(CHANNELNAME, SERVER[serv], url, category, title, thumbnail, plot)
def play(params,url,category): xbmc.output("[delicast.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = "Directo" # -------------------------------------------------------- # Descarga la página # -------------------------------------------------------- data = scrapertools.cachePage(url) #xbmc.output(data) # -------------------------------------------------------- # Extrae la URL # -------------------------------------------------------- #location.replace("mms://streamingtv01.ib3.es/ib3tv_en_directe") patron = 'location.replace\("([^"]+)"\)' matches = re.compile(patron,re.DOTALL).findall(data) if DEBUG: scrapertools.printMatches(matches) url = matches[0] xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def youtubeplay(params, url, category): logger.info("[series21.py] youtubeplay") title = urllib.unquote_plus(params.get("title")) thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = "Ver Video" server = "Directo" id = youtube.Extract_id(url) # Abre el diálogo de selección opciones = [] opciones.append("(FLV) Baja calidad") opciones.append("(MP4) Alta calidad") dia = xbmcgui.Dialog() seleccion = dia.select("tiene 2 formatos elige uno", opciones) logger.info("seleccion=%d" % seleccion) if seleccion == -1: return ("") if seleccion == 0: videourl, videoinfo = youtube.GetYoutubeVideoInfo(id) else: videourl = youtube.geturl(id) logger.info("link directo de youtube : " + videourl) xbmctools.playvideo("Trailer", server, videourl, category, title, thumbnail, plot)
def playVideo(params, url, category, strmfile=False): '''Reproduce el video seleccionado Actualizado a cambios de febrero 2011 ''' logger.info("[tvshack.py] playVideo") if params.has_key("Serie"): serie = params.get("Serie") else: serie = "" if (params.has_key("category")): category = params.get("category") title = urllib.unquote_plus(params.get("title")) if params.has_key("thumbnail"): thumbnail = urllib.unquote_plus(params.get("thumbnail")) else: thumbnail = '' if params.has_key("plot"): plot = params.get("plot") else: plot = xbmc.getInfoLabel("ListItem.Plot") server = params["server"] if DEBUG: logger.info("[tvshack.py] url=" + url) logger.info("[tvshack.py] title=" + title) logger.info("[tvshack.py] plot=" + plot) logger.info("[tvshack.py] thumbnail=" + thumbnail) logger.info("[tvshack.py] server=" + server) # Descarga la página data = scrapertools.cachePage(url) if server == 'megavideo' or server == 'megaupload': dlog("[tvshack.py]playVideo: Server= megavideo") # #Ej. <param name="movie" value="http://wwwstatic.megavideo.com/mv_player.swf?image=http://tvshack.bz/images/splash.jpg&v=HEIFJJ0E"> patronpath = '''(?x) # Activa opción VERBOSE. &v= # Basura (.{8})"> # $0 = url megavideo Ej. '5ZZHOM74' or 'HEIFJJ0E' ''' mediaurl = re.findall(patronpath, data) if len(mediaurl) == 0: dlog( "[tvshack.py]playVideo: No se encontró la url de megavideo en:" ) dlog(data) dialog = xbmcgui.Dialog() dialog.ok('pelisalacarta - tvshack', 'No se encontr� el video en megavideo.', 'Eliga otro video.') return elif len(mediaurl) > 1: dlog( "[tvshack.py]playVideo: Hay más de un enlace de megavideo (y no debería)" ) for url in mediaurl: dlog(url) mediaurl = mediaurl[0] # xbmctools.playvideo(CHANNELNAME,server,mediaurl,category,title,thumbnail,plot,Serie=Serie) dlog("[tvshack.py]playVideo: Llamando al play. mediaurl= " + mediaurl) xbmctools.playvideo(CHANNELNAME, 'Megavideo', mediaurl, category, title, '', '', Serie=serie, strmfile=strmfile) else: # Video de otro servidor (no megavideo) #Probamos si es flash... flashmatch = re.search('flashvars="file=(.+?)&type=flv', data) if flashmatch != None: dlog('[tvshack.py]playVideo: Video flash - url = ' + flashmatch.group(1)) xbmctools.playvideo(CHANNELNAME, 'Directo', flashmatch.group(1), category, title, '', '', Serie=serie, strmfile=strmfile) return #Si no, buscamos otras fuentes de video othersmatch = re.search('src="([^"]+)"', data) if othersmatch != None and server in ALLOWED_SERVERS: url = othersmatch.group(1).replace('&', '&') xbmctools.playvideo(CHANNELNAME, server, url, category, title, '', '', Serie=serie, strmfile=strmfile) return dlog("[tvshack.py]playVideo: Servidor no soportado: " + server) dialog = xbmcgui.Dialog() dialog.ok('pelisalacarta - tvshack - ' + server, 'El video seleccionado es de ' + server, 'Ese servidor aún no está soportado en TVShack.') return
def play(params,url,category): xbmc.output("[tva.py] play") title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = "Directo" if url.startswith("rtmp"): # Playlist vacia playlist = xbmc.PlayList( xbmc.PLAYLIST_VIDEO ) playlist.clear() ''' C:\util\rtmpdump-2.1d-windows>rtmpdump -V -r "rtmp://aztecaodfs.fplive.net/aztecaod/servicios/videos/am/ent/n/am_100515_07_ent_n_dis_2_1.flv" RTMPDump v2.1d (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL DEBUG: Parsing... DEBUG: Parsed protocol: 0 DEBUG: Parsed host : aztecaodfs.fplive.net DEBUG: Parsed app : aztecaod/servicios DEBUG: Protocol : RTMP DEBUG: Hostname : aztecaodfs.fplive.net DEBUG: Port : 1935 DEBUG: Playpath : videos/am/ent/n/am_100515_07_ent_n_dis_2_1 DEBUG: tcUrl : rtmp://aztecaodfs.fplive.net:1935/aztecaod/servicios DEBUG: swfUrl : <NULL> DEBUG: pageUrl : <NULL> DEBUG: app : aztecaod/servicios DEBUG: auth : <NULL> DEBUG: subscribepath : <NULL> DEBUG: flashVer : WIN 10,0,22,87 DEBUG: live : no DEBUG: timeout : 120 sec DEBUG: Setting buffer time to: 36000000ms ''' #url=rtmp://aztecaodfs.fplive.net/aztecaod/servicios/videos/am/ent/n/am_100515_07_ent_n_dis_2_1.flv&duration=176.7766 xbmc.output("[tva.py] url="+url) patron='(\&[^\&]+\&)' url = re.compile(patron,re.DOTALL).sub("",url+"&") #url=rtmp://aztecaodfs.fplive.net/aztecaod/servicios/videos/am/ent/n/am_100515_07_ent_n_dis_2_1.flv xbmc.output("[tva.py] url="+url) hostname = "aztecaodfs.fplive.net" xbmc.output("[tva.py] hostname="+hostname) portnumber = "1935" xbmc.output("[tva.py] portnumber="+portnumber) tcurl = "rtmp://aztecaodfs.fplive.net/aztecaod/servicios" xbmc.output("[tva.py] tcurl="+tcurl) #playpath = "alacarta/flv/5/3/1270074791935" playpath = url[48:-4] xbmc.output("[tva.py] playpath="+playpath) app = "aztecaod/servicios" xbmc.output("[tva.py] app="+app) listitem = xbmcgui.ListItem( title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail ) #listitem.setProperty("SWFPlayer", "http://www.plus.es/plustv/carcasa.swf") listitem.setProperty("Hostname",hostname) listitem.setProperty("Port",portnumber) listitem.setProperty("tcUrl",tcurl) listitem.setProperty("Playpath",playpath) listitem.setProperty("app",app) listitem.setProperty("flashVer","WIN 10,0,22,87") #listitem.setProperty("pageUrl","") listitem.setInfo( "video", { "Title": title, "Plot" : plot , "Studio" : CHANNELNAME , "Genre" : category } ) playlist.add( url, listitem ) # Reproduce xbmcPlayer = xbmc.Player( xbmc.PLAYER_CORE_AUTO ) xbmcPlayer.play(playlist) elif url.startswith("http"): xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def playVideo_OLD(params, url, category, strmfile=False): '''Reproduce el video seleccionado En desuso desde los cambios de febrero 2011 ''' logger.info("[tvshack.py] playVideo") if params.has_key("Serie"): serie = params.get("Serie") else: serie = "" if (params.has_key("category")): category = params.get("category") title = urllib.unquote_plus(params.get("title")) if params.has_key("thumbnail"): thumbnail = urllib.unquote_plus(params.get("thumbnail")) else: thumbnail = '' if params.has_key("plot"): plot = params.get("plot") else: plot = xbmc.getInfoLabel("ListItem.Plot") server = params["server"] if DEBUG: logger.info("[tvshack.py] url=" + url) logger.info("[tvshack.py] title=" + title) logger.info("[tvshack.py] plot=" + plot) logger.info("[tvshack.py] thumbnail=" + thumbnail) logger.info("[tvshack.py] server=" + server) # Descarga la p�gina data = scrapertools.cachePage(url) #Averiguamos las partes del video (Puede tener m�s de una) partes = re.findall('<a href="javascript:changevid\(([0-9]+)\);"', data) # Y el path relativo de los v�deos #JUR CAMBIO EN WEB 01/04/2010 # patronpath = '''(?x) # Activa opci�n VERBOSE. # http://tvshack\.bz/report_video/ # Basura # ([^/]+/[^/]+) # $0 = Path relativo Ej. 'tv/716063' # /","report" # Basura # ''' patronpath = '''(?x) # Activa opci�n VERBOSE. http://tvshack\.bz/video_load/ # Basura ([^/]+/[^/]+) # $0 = Path relativo Ej. 'tv/716063' /'\+part # Basura ''' paths = re.findall(patronpath, data) #JUR-PROV: De momento voy a considerar los v�deos de 1 s�la parte. # Para los v�deos con m�s partes habr� que crear una funci�n especial que # pregunte una sola vez y meta todos los v�deos juntos. if len(partes) > 1: logger.info("[tvshack] playVideo - Video multiparte - pendiente:" + str(len(partes))) dialog = xbmcgui.Dialog() dialog.ok( 'pelisalacarta - tvshack', 'Este video tiene varias partes.', 'En esta versi�n de pelisalacarta no est�n soportados.', 'Eliga otro video con una s�la parte.') # for parte in partes: elif len(partes) == 1: url = 'http://tvshack.bz/video_load/' + paths[0] + '/' + partes[0] #Esta URL sigue sin ser un enlace megaupload u otro servidor v�lido por lo que seguimos scrapeando # para evitar excesivas selecciones por parte del usuario. # Descarga la p�gina data2 = scrapertools.cachePage(url) if server == 'megavideo': dlog("[tvshack.py]playVideo: Server= megavideo") # #Ej.<embed src="http://www.megavideo.com/v/5ZZHOM74... patronpath = '''(?x) # Activa opci�n VERBOSE. <embed\ src="http://www\.megavideo\.com/v/ # Basura (.{8}) # $0 = url megavideo Ej. '5ZZHOM74' ''' mediaurl = re.findall(patronpath, data2) if len(mediaurl) == 0: dlog( "[tvshack.py]playVideo: No se encontr� la url de megavideo en:" ) dlog(data2) dialog = xbmcgui.Dialog() dialog.ok('pelisalacarta - tvshack', 'No se encontr� el video en megavideo.', 'Eliga otro video.') return elif len(mediaurl) > 1: dlog( "[tvshack.py]playVideo: Hay m�s de un enlace de megavideo (y no deber�a)" ) for url in mediaurl: dlog(url) mediaurl = mediaurl[0] # xbmctools.playvideo(CHANNELNAME,server,mediaurl,category,title,thumbnail,plot,Serie=Serie) dlog("[tvshack.py]playVideo: Llamando al play. mediaurl= " + mediaurl) xbmctools.playvideo(CHANNELNAME, 'Megavideo', mediaurl, category, title, '', '', Serie=serie, strmfile=strmfile) else: # Video de otro servidor (no megavideo) #Probamos si es flash... flashmatch = re.search('flashvars="file=(.+?)&type=flv', data2) if flashmatch != None: dlog('[tvshack.py]playVideo: Video flash - url = ' + flashmatch.group(1)) xbmctools.playvideo(CHANNELNAME, 'Directo', flashmatch.group(1), category, title, '', '', Serie=serie, strmfile=strmfile) return #Si no, buscamos otras fuentes de video othersmatch = re.search('src="([^"]+)"', data2) if othersmatch != None and server in ALLOWED_SERVERS: url = othersmatch.group(1).replace('&', '&') xbmctools.playvideo(CHANNELNAME, server, url, category, title, '', '', Serie=serie, strmfile=strmfile) return dlog("[tvshack.py]playVideo: Servidor no soportado: " + server) dialog = xbmcgui.Dialog() dialog.ok( 'pelisalacarta - tvshack - ' + server, 'El video seleccionado es de ' + server, 'Ese servidor a�n no est� soportado en TVShack.') return
def play(params, url, category): xbmc.output("[terratv.py] play") title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8") thumbnail = urllib.unquote_plus(params.get("thumbnail")) plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8") server = "Directo" xbmc.output("[terratv.py] thumbnail=" + thumbnail) # Abre dialogo dialogWait = xbmcgui.DialogProgress() dialogWait.create('Descargando datos del vídeo...', title) # -------------------------------------------------------- # Descarga pagina detalle # -------------------------------------------------------- data = scrapertools.cachePage(url) patron = "'(http\:\/\/www\.terra\.tv\/templates\/getVideo\.aspx[^']+)'" matches = re.compile(patron, re.DOTALL).findall(data) scrapertools.printMatches(matches) url = matches[0] xbmc.output("url=" + url) req = urllib2.Request(url) req.add_header( 'User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ) response = urllib2.urlopen(req) data = response.read() response.close() xbmc.output("data=" + data) patron = '<ref href="([^"]+)"' matches = re.compile(patron, re.DOTALL).findall(data) if len(matches) == 0: patron = '<video src="([^"]+)"' matches = re.compile(patron, re.DOTALL).findall(data) url = matches[0] xbmc.output("url=" + url) # -------------------------------------------------------- # Amplia el argumento # -------------------------------------------------------- patron = '<div id="encuesta">\s*<div class="cab">.*?</div>(.*?)</div>' matches = re.compile(patron, re.DOTALL).findall(data) scrapertools.printMatches(matches) if len(matches) > 0: plot = "%s" % matches[0] plot = plot.replace("<p>", "") plot = plot.replace("</p>", " ") plot = plot.replace("<strong>", "") plot = plot.replace("</strong>", "") plot = plot.replace("<br />", " ") plot = plot.strip() # Cierra dialogo dialogWait.close() del dialogWait xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail, plot)
def play(params,url,category): logger.info("[delatv.py] play") try: title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" ) except: title = urllib.unquote_plus( params.get("title") ) thumbnail = urllib.unquote_plus( params.get("thumbnail") ) plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ) server = params.get("server") # Abre dialogo dialogWait = xbmcgui.DialogProgress() dialogWait.create( 'Accediendo al video...', title , plot ) # Descarga la página del reproductor # http://delatv.com/modulos/player.php?url=dmlkZW8uYWsuZmFjZWJvb2suY29tL2Nmcy1hay1hc2gyLzMzMjM2LzY4NS8xMDU1NTcxNDYxNjI3MjNfMzQ5ODk= # http://delatv.com/modulos/embed/playerembed.php?url=dmlkZW8uYWsuZmFjZWJvb2suY29tL2Nmcy1hay1hc2gyLzMzMjM2LzY4NS8xMDU1NTcxNDYxNjI3MjNfMzQ5ODk= logger.info("[delatv.py] url="+url) ## --------------------------------------------------------------------------------------## # Busca enlaces de videos para el servidor vkontakte.ru # ## --------------------------------------------------------------------------------------## #"http://vkontakte.ru/video_ext.php?oid=89710542&id=147003951&hash=28845bd3be717e11&hd=1 if "vkontakteX.php" or "/vk/" in url: data = scrapertools.cachePage(url) server = "Directo" ''' var video_host = 'http://cs12916.vkontakte.ru/'; var video_uid = '87155741'; var video_vtag = 'fc697084d3'; var video_no_flv = 1; var video_max_hd = '1' ''' patronvideos = '<iframe src="(http://vk[^/]+/video_ext.php[^"]+)"' matches = re.compile(patronvideos,re.DOTALL).findall(data) if len(matches)>0: print " encontro VKontakte.ru :%s" %matches[0] url = vk.geturl(matches[0]) ''' data2 = scrapertools.cachePage(matches[0]) print data2 patron = "var video_host = '([^']+)'.*?" patron += "var video_uid = '([^']+)'.*?" patron += "var video_vtag = '([^']+)'.*?" patron += "var video_no_flv = ([^;]+);.*?" patron += "var video_max_hd = '([^']+)'" matches2 = re.compile(patron,re.DOTALL).findall(data2) if len(matches2)>0: #http://cs12385.vkontakte.ru/u88260894/video/d09802a95b.360.mp4 for match in matches2: if match[3].strip() == "0": tipo = "flv" url = "%su%s/video/%s.%s" % (match[0],match[1],match[2],tipo) else: tipo = "360.mp4" url = "%su%s/video/%s.%s" % (match[0],match[1],match[2],tipo) ''' # Cierra dialogo dialogWait.close() del dialogWait if len(url)>0: logger.info("url="+url) xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot) else: xbmctools.alertnodisponible()
def run(): logger.info("[pelisalacarta.py] run") # Verifica si el path de usuario del plugin está creado if not os.path.exists(config.DATA_PATH): logger.debug( "[pelisalacarta.py] Path de usuario no existe, se crea: " + config.DATA_PATH) os.mkdir(config.DATA_PATH) # Imprime en el log los parámetros de entrada logger.info("[pelisalacarta.py] sys.argv=%s" % str(sys.argv)) # Crea el diccionario de parametros params = dict() if len(sys.argv) >= 2 and len(sys.argv[2]) > 0: params = dict(part.split('=') for part in sys.argv[2][1:].split('&')) logger.info("[pelisalacarta.py] params=%s" % str(params)) # Extrae la url de la página if (params.has_key("url")): url = urllib.unquote_plus(params.get("url")) else: url = '' # Extrae la accion if (params.has_key("action")): action = params.get("action") else: action = "selectchannel" # Extrae el server if (params.has_key("server")): server = params.get("server") else: server = "" # Extrae la categoria if (params.has_key("category")): category = urllib.unquote_plus(params.get("category")) else: if params.has_key("channel"): category = params.get("channel") else: category = "" # Extrae la serie if (params.has_key("Serie")): serie = params.get("Serie") else: serie = "" logger.info("[pelisalacarta.py] url=" + url + ", action=" + action + ", server=" + server + ", category=" + category + ", serie=" + serie) #JUR - Gestión de Errores de Internet (Para que no casque el plugin # si no hay internet (que queda feo) try: # Accion por defecto - elegir canal if (action == "selectchannel"): import channelselector as plugin plugin.mainlist(params, url, category) # Actualizar version elif (action == "update"): try: import updater updater.update(params) except ImportError: logger.info( "[pelisalacarta.py] Actualizacion automática desactivada") import channelselector as plugin plugin.mainlist(params, url, category) # Reproducir un STRM elif (action == "strm"): import xbmctools xbmctools.playstrm(params, url, category) # El resto de acciones vienen en el parámetro "action", y el canal en el parámetro "channel" else: # Actualiza el canal si ha cambiado if action == "mainlist" and config.getSetting( "updatechannels") == "true": try: import updater actualizado = updater.updatechannel(params.get("channel")) if actualizado: import xbmcgui advertencia = xbmcgui.Dialog() advertencia.ok("pelisalacarta", params.get("channel"), config.getLocalizedString(30063)) except: for line in sys.exc_info(): logger.error("%s" % line) logger.info("Actualización de canales desactivada") # Ejecuta el canal exec "import " + params.get("channel") + " as channel" generico = False try: generico = channel.isGeneric() except: generico = False print "generico=", generico # Es un canal específico de xbmc if not generico: exec "channel." + action + "(params, url, category)" # Es un canal genérico else: if params.has_key("title"): title = urllib.unquote_plus(params.get("title")) else: title = "" if params.has_key("thumbnail"): thumbnail = urllib.unquote_plus(params.get("thumbnail")) else: thumbnail = "" if params.has_key("plot"): plot = urllib.unquote_plus(params.get("plot")) else: plot = "" if params.has_key("server"): server = urllib.unquote_plus(params.get("server")) else: server = "directo" if params.has_key("extradata"): extradata = urllib.unquote_plus(params.get("extradata")) else: extradata = "" if params.has_key("category"): category = urllib.unquote_plus(params.get("category")) else: category = "" if params.has_key("Serie"): Serie = urllib.unquote_plus(params.get("Serie")) else: Serie = "" import xbmctools if action == "play": xbmctools.playvideo(params.get("channel"), server, url, category, title, thumbnail, plot) else: from item import Item item = Item(channel=params.get("channel"), title=title, url=url, thumbnail=thumbnail, plot=plot, server=server, category=category, extra=extradata) if action != "findvideos": exec "itemlist = channel." + action + "(item)" else: # Intenta ejecutar una posible funcion "findvideos" del canal try: exec "itemlist = channel." + action + "(item)" # Si no funciona, lanza el método genérico para detectar vídeos except: itemlist = findvideos(item) xbmctools.renderItems(itemlist, params, url, category) except urllib2.URLError, e: for line in sys.exc_info(): logger.error("%s" % line) import xbmcgui ventana_error = xbmcgui.Dialog() # Agarra los errores surgidos localmente enviados por las librerias internas if hasattr(e, 'reason'): logger.info("Razon del error, codigo: %d , Razon: %s" % (e.reason[0], e.reason[1])) texto = config.getLocalizedString( 30050) # "No se puede conectar con el sitio web" ok = ventana_error.ok("pelisalacarta", texto) # Agarra los errores con codigo de respuesta del servidor externo solicitado elif hasattr(e, 'code'): logger.info("codigo de error HTTP : %d" % e.code) texto = ( config.getLocalizedString(30051) % e.code ) # "El sitio web no funciona correctamente (error http %d)" ok = ventana_error.ok("pelisalacarta", texto) else: pass