• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python xbmc.output函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中xbmc.output函数的典型用法代码示例。如果您正苦于以下问题:Python output函数的具体用法?Python output怎么用?Python output使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了output函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: ListadoTotal

def ListadoTotal(params,url,category):
	xbmc.output("[peliculas24h.py] ListadoTotal")

	# Descarga la p�gina
	data = scrapertools.cachePage(url)
	#xbmc.output(data)

	# Patron de las entradas
	patron = "<a dir='ltr' href='([^']+)'>(.*?)</a>"
	matches = re.compile(patron,re.DOTALL).findall(data)
	scrapertools.printMatches(matches)

	# A�ade las entradas encontradas
	for match in matches:
		# Atributos
		scrapedtitle = match[1]
		scrapedurl = match[0]
		scrapedthumbnail = ""
		scrapedplot = ""
		if (DEBUG): xbmc.output("title=["+scrapedtitle+"], url=["+scrapedurl+"], thumbnail=["+scrapedthumbnail+"]")

		# A�ade al listado de XBMC
		xbmctools.addnewfolder( CHANNELNAME , "detail" , category , scrapedtitle , scrapedurl , scrapedthumbnail, scrapedplot )

	# Asigna el t�tulo, desactiva la ordenaci�n, y cierra el directorio
	xbmcplugin.setPluginCategory( handle=pluginhandle, category=category )
	xbmcplugin.addSortMethod( handle=pluginhandle, sortMethod=xbmcplugin.SORT_METHOD_NONE )
	xbmcplugin.endOfDirectory( handle=pluginhandle, succeeded=True )
开发者ID:HackJoues,项目名称:pelisalacarta-personal-fork,代码行数:28,代码来源:cinegratis24h.py


示例2: 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)
开发者ID:HackJoues,项目名称:pelisalacarta-personal-fork,代码行数:35,代码来源:peliculasyonkis.py


示例3: searchresults

def searchresults(params,url,category):
	xbmc.output("[peliculasyonkis.py] searchresults")

	if xbmctools.getPluginSetting("forceview")=="true":
		xbmc.executebuiltin("Container.SetViewMode(53)")  #53=icons

	# Descarga la página
	data = scrapertools.cachePage(url)
	#xbmc.output(data)

	# Extrae las entradas (carpetas)
	#<li> <a href="http://www.peliculasyonkis.com/pelicula/las-edades-de-lulu-1990/" title="Las edades de Lulú (1990)"><img width="77" height="110" src="http://images.peliculasyonkis.com/thumbs/las-edades-de-lulu-1990.jpg" alt="Las edades de Lulú (1990)" align="right" />
	
	patronvideos  = '<li> <a href="([^"]+)" title="([^"]+)"><img.*?src="([^"]+)"'
	matches = re.compile(patronvideos,re.DOTALL).findall(data)
	scrapertools.printMatches(matches)

	for match in matches:
		scrapedtitle = match[1]
		scrapedurl = match[0]
		scrapedthumbnail = match[2]
		scrapedplot = ""
		if (DEBUG): xbmc.output("title=["+scrapedtitle+"], url=["+scrapedurl+"], thumbnail=["+scrapedthumbnail+"]")
		xbmctools.addnewvideo( CHANNELNAME , "detail" , category , "Megavideo" , scrapedtitle , scrapedurl , scrapedthumbnail , scrapedplot )

	# Label (top-right)...
	xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )

	# Disable sorting...
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )

	# End of directory...
	xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
开发者ID:HackJoues,项目名称:pelisalacarta-personal-fork,代码行数:33,代码来源:peliculasyonkis.py


示例4: listcategorias

def listcategorias(params,url,category):
	xbmc.output("[yotix.py] listcategorias")

	# ------------------------------------------------------
	# Descarga la página
	# ------------------------------------------------------
	data = scrapertools.cachePage(url)
	#xbmc.output(data)

	# ------------------------------------------------------
	# Extrae las entradas de la home como carpetas
	# ------------------------------------------------------
	patron  = '<a href="(/categoria/[^"]+)">([^<]+)</a>'

	matches = re.compile(patron,re.DOTALL).findall(data)
	if DEBUG: scrapertools.printMatches(matches)

	for match in matches:
		# Atributos
		scrapedtitle = match[1]
		scrapedurl = urlparse.urljoin(url,match[0])
		scrapedthumbnail = ""
		scrapedplot = ""
		if (DEBUG): xbmc.output("title=["+scrapedtitle+"], url=["+scrapedurl+"], thumbnail=["+scrapedthumbnail+"]")

		# Añade al listado de XBMC
		xbmctools.addnewfolder( CHANNELNAME , "videolist" , category , scrapedtitle , scrapedurl , scrapedthumbnail, scrapedplot )

	# Label (top-right)...
	xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )
	xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
开发者ID:HackJoues,项目名称:pelisalacarta-personal-fork,代码行数:32,代码来源:yotix.py


示例5: onClick

    def onClick( self, controlId ):
      xbmc.output("controlId: %s" % (controlId) ,level=xbmc.LOGDEBUG )
      if ( controlId == CONTROL_END ):
        self.exit_script()
        
      if ( controlId == CONTROL_NEXT ):      
        self.screen_next(self.screen)

      if ( controlId == 1502 ): #Confirm Installation
        self.getControl( 1099 ).setVisible( self.getControl( 1502 ).isSelected() )
              
      if ( controlId == 1503 ): #Password
        self.password = self.keyboard(_(505), True )
        self.getControl( 1503 ).setLabel( self.hide_pass(self.password) )
        if __settings__.getSetting( "enable_custom_password" ) == "true" :
          self.getControl( 1502 ).setVisible((self.password == self.password_confirmed) and self.password_confirmed != "")
          self.getControl( 1099 ).setVisible((self.password == self.password_confirmed) and self.password_confirmed != "" and self.getControl( 1502 ).isSelected())
      if ( controlId == 1504 ): #Confirm Password
        self.password_confirmed = self.keyboard(_(506), True )
        self.getControl( 1504 ).setLabel( self.hide_pass(self.password_confirmed) )
        if __settings__.getSetting( "enable_custom_password" ) == "true" :
          self.getControl( 1502 ).setVisible((self.password == self.password_confirmed) and self.password != "")
          self.getControl( 1099 ).setVisible((self.password == self.password_confirmed) and self.password != "" and self.getControl( 1502 ).isSelected())
      
      if ( controlId == 1401 ):
        self.slider()
开发者ID:070499,项目名称:repo-scripts,代码行数:26,代码来源:gui.py


示例6: 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)
开发者ID:jorik041,项目名称:pelisalacarta-personal-fork,代码行数:28,代码来源:argia.py


示例7: performsearch

def performsearch(texto):
	xbmc.output("[tutvsite.py] performsearch")
	url = "http://www.tu.tv/buscar/?str="+texto

	# Descarga la página
	data = scrapertools.cachePage(url)

	# Extrae las entradas (carpetas)
	patronvideos  = '<div class="fila clearfix">[^<]+<div.*?</div>[^<]+<a href="([^"]+)"[^<]+<img src="([^"]+)".*?<span id="txtN">(.*?)</span>.*?<span class="tmp">([^<]+)</span.*?<span id="txtN">(.*?)</span>'
	matches = re.compile(patronvideos,re.DOTALL).findall(data)
	scrapertools.printMatches(matches)
	
	resultados = []

	for match in matches:
		# Titulo
		try:
			scrapedtitle = unicode( match[2], "utf-8" ).encode("iso-8859-1")
		except:
			scrapedtitle = match[2]
		scrapedtitle = scrapedtitle.replace("<b>","")
		scrapedtitle = scrapedtitle.replace("</b>","")
		scrapedtitle = scrapedtitle.strip()
		scrapedurl = urlparse.urljoin(url,match[0])
		scrapedthumbnail = urlparse.urljoin(url,match[1])
		scrapedplot = match[4].strip()

		if (DEBUG): xbmc.output("title=["+scrapedtitle+"], url=["+scrapedurl+"], thumbnail=["+scrapedthumbnail+"]")

		# Añade al listado de XBMC
		resultados.append( [CHANNELNAME , "playfolder" , "buscador" , scrapedtitle , scrapedurl , scrapedthumbnail, scrapedplot ] )
		
	return resultados
开发者ID:HackJoues,项目名称:pelisalacarta-personal-fork,代码行数:33,代码来源:tutvsite.py


示例8: listcategorias

def listcategorias(params,url,category):
        xbmc.output("[peliculas.py] listcategorias")

        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Acci�n"    ,"http://www.peliculasid.com/accion-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Animaci�n"    ,"http://www.peliculasid.com/animacion-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Aventura"    ,"http://www.peliculasid.com/aventura-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Ciencia Ficci�n"    ,"http://www.peliculasid.com/ciencia_ficcion-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Cine Indio"    ,"http://www.peliculasid.com/cine_indio-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Comedia"    ,"http://www.peliculasid.com/comedia-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Crimen"    ,"http://www.peliculasid.com/crimen-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Documentales y mas"    ,"http://www.peliculasid.com/documentales-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Drama"    ,"http://www.peliculasid.com/drama-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Fantasia"    ,"http://www.peliculasid.com/fantasia-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Horror"    ,"http://www.peliculasid.com/horror-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Misterio"    ,"http://www.peliculasid.com/misterio-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Romance"    ,"http://www.peliculasid.com/romance-1.html","","")
        xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Thriller"    ,"http://www.peliculasid.com/thriller-1.html","","")
        
        # Label (top-right)...
	xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )

	# Disable sorting...
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )

	# End of directory...
	xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
开发者ID:HackJoues,项目名称:pelisalacarta-personal-fork,代码行数:26,代码来源:peliculasid.py


示例9: listarelacionados

def listarelacionados(params,url,category):
	xbmc.output("[series21.py] listaractores")
	
	url1 = "http://www.series21.com"
	#patronvideos = '<div><a href="([^"]+)">([^<]+)</a><br'
	data = urllib.unquote_plus(params.get("extradata"))
	matches = buscarelacionados(data) 
	patronvideos = '<b>Serie:</b>(.*?)<.*?<b>Temporada:</b>(.*?)<a'
	serie = re.compile(patronvideos,re.DOTALL).findall(data)
	for match in serie:
		plot  = 'Serie : '+ match[0]+'\n'
		plot += 'Temporada : '+match[1]
	opciones = []
	URL = []
	for i in matches:
		if i[0] == "><a href=":
			opciones.append(i[2])
			URL.append(i[1])
		else:
			opciones.append("**"+i[2]+"**")
		
	dia = xbmcgui.Dialog()
	seleccion = dia.select("Selecciona uno ", opciones)
	xbmc.output("seleccion=%d" % seleccion)
	if seleccion == -1 :return
	elif "(Viendo ahora)" in opciones[seleccion]:return
	else:
		params["title"] = opciones[seleccion]
		params["plot"] = plot 
		ListarVideos(params,URL[seleccion],category)
	return
开发者ID:HackJoues,项目名称:pelisalacarta-personal-fork,代码行数:31,代码来源:series21.py


示例10: play

def play(params,url,category):
	xbmc.output("[kideos.py] play")

	title = urllib.unquote_plus( params.get("title") )
	thumbnail = urllib.unquote_plus( params.get("thumbnail") )
	xbmc.output("[kideos.py] play thumbnail="+thumbnail)
	plot = urllib.unquote_plus( params.get("plot") )
	server = urllib.unquote_plus( params.get("server") )

	# Abre dialogo
	dialogWait = xbmcgui.DialogProgress()
	dialogWait.create( xbmc.getLocalizedString( 30901 ), title , plot )

	# Carga la página de detalle
	data = scrapertools.cachePage(url)
	addvideopage(data,params,url,category)

	# Busca el id del vídeo
	patron = '<param name\="flashVars" value\="videoId\=([^"]+)"'
	matches = re.compile(patron,re.DOTALL).findall(data)
	scrapertools.printMatches(matches)		

	if len(matches)>0:
		video_id = matches[0]
		url = youtube.geturl(video_id)
		listitem = xbmcgui.ListItem( title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail )
		listitem.setInfo( "video", { "Title": title, "Plot": plot } )

	# Cierra dialogo
	dialogWait.close()
	del dialogWait

	# Play video with the proper core
	xbmc.Player().play( url, listitem )
开发者ID:jorik041,项目名称:pelisalacarta-personal-fork,代码行数:34,代码来源:kideos.py


示例11: downloadFile

def downloadFile(url):
    if __settings__.getSetting('download_path') == '':
        try:
            dl_path = xbmcgui.Dialog().browse(0, __language__(30017),'files', '', False, False)
            __settings__.setSetting(id='download_path', value=dl_path)
            if not os.path.exists(dl_path):
                os.mkdir(dl_path)
        except:pass
    name =''
    extl = url.split('/')
    for i in extl:
        name=i
    file_path = xbmc.makeLegalFilename(os.path.join(__settings__.getSetting('download_path'), name))
    if os.path.isfile(file_path):
        return None
    try:
        urllib.urlretrieve(url, file_path, report_hook)
        if enable_debug:
            xbmc.output('Picture ' + str(url) + ' downloaded to ' + repr(file_path))
        return file_path
    except IOError:
        return None
        
    except  Exception,e:
        print e
        pass
开发者ID:Stevie-Bs,项目名称:xbmc-eraser,代码行数:26,代码来源:addon.py


示例12: download_subtitles

def download_subtitles (url):

    tmp_sub_dir= SUB_PATH #Carpeta temporal
    fullpath = os.path.join( config.get_data_path(), 'subtitulo.srt' )
    if os.path.exists(fullpath):   #Borro subtitulo anterior
        try:
          os.remove(fullpath)
        except IOError:
          xbmc.output("Error al eliminar el archivo subtitulo.srt "+fullpath)
          raise	
    for root, dirs, files in os.walk(tmp_sub_dir): #Borro archivos de la carpeta temporal
        for f in files:
            f = unicode(f,'utf8')
            os.unlink(os.path.join(root, f)) 
        for d in dirs:
            from shutil import rmtree						
            shutil.rmtree(os.path.join(root, d))
    #Mensaje de información
    mensaje = xbmcgui.DialogProgress()
    linea1 = 'Extrayendo archivo de subtítulos...'
    linea2 = 'Seleccione uno de la lista'
    linea3 = 'que aparecerá a continuación'
    mensaje.create(linea1 , linea2 , linea3)
    time.sleep(3)
    mensaje.close()	
    try:
        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')
        opener = urllib2.build_opener(SmartRedirectHandler())
        content = opener.open(req)
    except ImportError, inst:
        status,location = inst	
        response = urllib.urlopen(location)
        content =response.read()
开发者ID:jorik041,项目名称:pelisalacarta-personal-fork,代码行数:34,代码来源:asiateam.py


示例13: detail

def detail(params,url,category):
	xbmc.output("[newcineonline.py] detail")

	title = urllib.unquote_plus( params.get("title") )
	thumbnail = urllib.unquote_plus( params.get("thumbnail") )

	# Descarga la página
	data = scrapertools.cachePage(url)
	#xbmc.output(data)
	
	# La siguiente página
	patronvideos  = '<embed src\="http\:\/\/wwwstatic.megavideo.com\/mv\_player\.swf\?image=[^\&]+\&amp\;v\=([^"]+)"'
	matches = re.compile(patronvideos,re.DOTALL).findall(data)
	scrapertools.printMatches(matches)
	if len(matches)>0:
		xbmctools.addnewvideo( CHANNELNAME , "play" , category , "Megavideo" , title + " - [Megavideo]" , matches[0], thumbnail , "" )

	# ------------------------------------------------------------------------------------
	# Busca los enlaces a los videos
	# ------------------------------------------------------------------------------------
	listavideos = servertools.findvideos(data)
	
	for video in listavideos:
		xbmctools.addnewvideo( CHANNELNAME , "play" , category , video[2] , title +" - "+video[0], video[1], thumbnail , "" )
	# ------------------------------------------------------------------------------------

	# Label (top-right)...
	xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )
		
	# Disable sorting...
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )

	# End of directory...
	xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
开发者ID:HackJoues,项目名称:pelisalacarta-personal-fork,代码行数:34,代码来源:newcineonline.py


示例14: log

def log(msg, err=False):
    if err:
        xbmc.log(addon.getAddonInfo('name') + ': ' + msg.encode('utf-8'), 
                 xbmc.LOGERROR)    
    else:
        xbmc.output(addon.getAddonInfo('name') + ': ' + msg.encode('utf-8'), 
                    xbmc.LOGDEBUG)    
开发者ID:Orabig,项目名称:nutt318-xbmc-plugins,代码行数:7,代码来源:Addon.py


示例15: listcategorias

def listcategorias(params,url,category):
	xbmc.output("[filmeonlinebr.py] listcategorias")


	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Aзгo"    ,"http://www.filmesonlinebr.com/search/label/A%C3%A7%C3%A3o","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Aventura"    ,"http://www.filmesonlinebr.com/search/label/Aventura","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Comйdia Romвntica"    ,"http://www.filmesonlinebr.com/search/label/Com%C3%A9dia%20Rom%C3%A2ntica","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Comйdia"    ,"http://www.filmesonlinebr.com/search/label/Com%C3%A9dia","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Documentбrio"    ,"http://www.filmesonlinebr.com/search/label/Document%C3%A1rio","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Drama"    ,"http://www.filmesonlinebr.com/search/label/Drama","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Ficзгo Cientнfica"    ,"http://www.filmesonlinebr.com/search/label/Fic%C3%A7%C3%A3o%20Cient%C3%ADfica","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Guerra"    ,"http://www.filmesonlinebr.com/search/label/Guerra","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Lanзamentos 2010"    ,"http://www.filmesonlinebr.com/search/label/Lan%C3%A7amentos%202010","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Musical e Shows"    ,"http://www.filmesonlinebr.com/search/label/Musical","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Filmes Brasileiros"    ,"http://www.filmesonlinebr.com/search/label/Nacional","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Policial"    ,"http://www.filmesonlinebr.com/search/label/Policial","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Romance"    ,"http://www.filmesonlinebr.com/search/label/Romance","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Suspense"    ,"http://www.filmesonlinebr.com/search/label/Suspense","","")
	xbmctools.addnewfolder( CHANNELNAME , "listvideos" , category , "Terror"    ,"http://www.filmesonlinebr.com/search/label/Terror","","")
	
    # Label (top-right)...
	xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )

	# Disable sorting...
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )

	# End of directory...
	xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
开发者ID:HackJoues,项目名称:pelisalacarta-personal-fork,代码行数:28,代码来源:filmesonlinebr.py


示例16: 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)
开发者ID:arieltools,项目名称:plugin.video.tvalacarta,代码行数:60,代码来源:terratv.py


示例17: categorias

def categorias(params,url,category):
	xbmc.output("[goear.py] listcategorias")

	# Descarga la página
	data = scrapertools.cachePage(url)
	#xbmc.output(data)

	# Extrae las entradas (carpetas)
	patronvideos  = '<div class="cate-tipos"><a href="([^"]+)">([^<]+)</a></div>'
	matches = re.compile(patronvideos,re.DOTALL).findall(data)
	scrapertools.printMatches(matches)

	for match in matches:
		scrapedtitle = match[1]
		scrapedurl = urlparse.urljoin(url,match[0])
		if (DEBUG): xbmc.output("title=["+scrapedtitle+"], url=["+scrapedurl+"]")

		# Añade al listado de XBMC
		addnewfolder( "categoryresults" , scrapedtitle , scrapedurl )
	
	patronvideos  = '<div class="flechas" style="float:right;"><a href="([^"]+)"><strong>Siguiente  »</strong></a></div></div>'

	# Cierra el directorio
	xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )
	xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
开发者ID:hmemar,项目名称:xbmc-tvalacarta,代码行数:26,代码来源:goear.py


示例18: listageneros

def listageneros(params,url,category):
	xbmc.output("[meristation.py] listaporgenero")
	
	# --------------------------------------------------------
	# Descarga la página
	# --------------------------------------------------------
	data = scrapertools.cachePage(url)
	#xbmc.output(data)

	# --------------------------------------------------------
	# Extrae las categorias (carpetas)
	# --------------------------------------------------------
	patron = '<option  value="([^"]+)">([^<]+)</option>'
	matches = re.compile(patron,re.DOTALL).findall(data)
	if DEBUG: scrapertools.printMatches(matches)

	for match in matches:
		scrapedtitle = match[1].replace("&nbsp;","").strip()
		scrapedurl = urlparse.urljoin(url,match[0])
		scrapedthumbnail = ""
		scrapedplot = ""
		if (DEBUG): xbmc.output("title=["+scrapedtitle+"], url=["+scrapedurl+"], thumbnail=["+scrapedthumbnail+"]")

		# Añade al listado de XBMC
		#addvideo( scrapedtitle , scrapedurl , category )
		xbmctools.addnewfolder( CHANNELCODE , "letraresults" , CHANNELNAME , scrapedtitle , scrapedurl , scrapedthumbnail, scrapedplot )

	# Label (top-right)...
	xbmcplugin.setPluginCategory( handle=pluginhandle, category=category )

	# Disable sorting...
	xbmcplugin.addSortMethod( handle=pluginhandle, sortMethod=xbmcplugin.SORT_METHOD_NONE )

	# End of directory...
	xbmcplugin.endOfDirectory( handle=pluginhandle, succeeded=True )
开发者ID:jorik041,项目名称:pelisalacarta-personal-fork,代码行数:35,代码来源:meristation.py


示例19: mainlist

def mainlist(params,url,category):
	xbmc.output("[argia.py] mainlist")
	
	###
	### MAIN MENU
	###
	# Full Video List
	xbmctools.addnewfolder( CHANNELCODE , "videolist" , CHANNELNAME , "Denak" , "http://www.argia.com/multimedia?p=1" , "" , "" )
	# Recommended
	xbmctools.addnewfolder( CHANNELCODE , "recommended" , CHANNELNAME , "Gomendatuak" , VIDEOURL , "" , "" )
	# Most Viewed (this week)
	xbmctools.addnewfolder( CHANNELCODE , "mostviewed" , CHANNELNAME , "Asteko ikusienak" , VIDEOURL , "" , "" )
	# Videos (sin categoria)
	xbmctools.addnewfolder( CHANNELCODE , "videolist" , CHANNELNAME , "Bideoak" , "http://www.argia.com/multimedia/bideoak?p=1" , "" , "" )
	# Actos
	xbmctools.addnewfolder( CHANNELCODE , "videolist" , CHANNELNAME , "Ekitaldiak" , "http://www.argia.com/multimedia/ekitaldiak?p=1" , "" , "" )
	# Cortometrajes
	xbmctools.addnewfolder( CHANNELCODE , "videolist" , CHANNELNAME , "Film laburrak" , "http://www.argia.com/multimedia/laburrak?p=1" , "" , "" )
	
	# Label (top-right)...
	xbmcplugin.setPluginCategory( handle=int( sys.argv[ 1 ] ), category=category )
	# Disable sorting...
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_NONE )
	# End of directory...
	xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
开发者ID:jorik041,项目名称:pelisalacarta-personal-fork,代码行数:25,代码来源:argia.py


示例20: play

def play(params,url,category):
	xbmc.output("[totlolchannel.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( xbmc.getLocalizedString( 30702 ), title , plot )

	# Busca el id del vídeo
	# La URL tiene el id de vídeo de youtube: http://www.totlol.com/watch/Bxu3jfqpItE/Pocoyo-Dance/0/
	patron = 'http\:\/\/www.totlol.com\/watch\/([^\/]+)/'
	matches = re.compile(patron,re.DOTALL).findall(url)
	scrapertools.printMatches(matches)

	if len(matches)>0:
		video_id = matches[0]
		url = youtube.geturl(video_id)
		listitem = xbmcgui.ListItem( title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail )
		listitem.setInfo( "video", { "Title": title, "Plot": plot } )

	# Cierra dialogo
	dialogWait.close()
	del dialogWait

	# Play video with the proper core
	xbmc.Player().play( url, listitem )
开发者ID:hmemar,项目名称:xbmc-tvalacarta,代码行数:30,代码来源:totlolchannel.py



注:本文中的xbmc.output函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python xbmc.sleep函数代码示例发布时间:2022-05-26
下一篇:
Python xbmc.makeLegalFilename函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap