本文整理汇总了Python中xbmctools.playvideo函数的典型用法代码示例。如果您正苦于以下问题:Python playvideo函数的具体用法?Python playvideo怎么用?Python playvideo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了playvideo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: detail
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)
示例2: play
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
'''
'''
示例3: play
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)
示例4: play
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)
示例5: play
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)
示例6: play
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)
示例7: play
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)
示例8: play
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)
示例9: play
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)
示例10: play
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)
示例11: detail
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)
示例12: play
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()
示例13: play
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)
示例14: play
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)
示例15: play
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)