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

Python servertools.findvideos函数代码示例

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

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



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

示例1: loadvideo

def loadvideo(params,data,category,title,thumbnail,plot):
	# ----------------------------------------------------------
	# the loading of series with a lot of seasons is very slow
	# this system prevents freeze everytime in loading screen
	# ----------------------------------------------------------
	max_len = 3000
	while (len(data) > max_len): 
		data_all = data
		data_trunc = data[:max_len].rfind('<a ')
		if(data_trunc <= 0):
			data = data = data_all[max_len:]
		else:
			data = data[:data_trunc]
			listavideos = servertools.findvideos(data)
			for video in listavideos:
				videotitle = video[0]
				url = video[1]
				server = video[2]
				patronvideos  = url+'[^>]+>([^<]+)'
				matches = re.compile(patronvideos,re.DOTALL).findall(data)
				scrapertools.printMatches(matches)
				if (matches): videotitle = matches[0]
				xbmctools.addnewvideo( CHANNELNAME , "play" , category , server , title.strip() + " - " + videotitle + " ["+server+"]" , url , thumbnail , plot )
			data = data_all[data_trunc:]
	#end while
	listavideos = servertools.findvideos(data)
	for video in listavideos:
		videotitle = video[0]
		url = video[1]
		server = video[2]
		patronvideos  = url+'[^>]+>([^<]+)'
		matches = re.compile(patronvideos,re.DOTALL).findall(data)
		scrapertools.printMatches(matches)
		if (matches): videotitle = matches[0]
		xbmctools.addnewvideo( CHANNELNAME , "play" , category , server , title.strip() + " - " + videotitle + " ["+server+"]" , url , thumbnail , plot )
开发者ID:hmemar,项目名称:xbmc-tvalacarta,代码行数:35,代码来源:italiafilm.py


示例2: mirrors

def mirrors(item):
	logger.info("[capitancinema.py] mirrors")

	title = item.title
	thumbnail = item.thumbnail
	plot = item.plot

	# Descarga la página
	data = scrapertools.cachePage(item.url)
	patronvideos  = '<li><strong>DISPONIBLE EN EL FORO</strong>[^<]+<a href="([^"]+)"'
	matches = re.compile(patronvideos,re.DOTALL).findall(data)
	itemlist = []
	if len(matches)>0:
		url = matches[0]
		data = scrapertools.cachePage(url)

		# ------------------------------------------------------------------------------------
		# Busca los enlaces a los videos
		# ------------------------------------------------------------------------------------
		listavideos = servertools.findvideos(data)

		for video in listavideos:
			scrapedtitle = title.strip() + " - " + video[0]
			scrapedurl = video[1]
			server = video[2]
			
			itemlist.append( Item(channel=CHANNELNAME, action="play" , title=scrapedtitle , url=scrapedurl, thumbnail=item.thumbnail, plot=item.plot, server=server, folder=False))

	return itemlist
开发者ID:hmemar,项目名称:xbmc-tvalacarta,代码行数:29,代码来源:capitancinema.py


示例3: mirrorlist

def mirrorlist(params,url,category):
	xbmc.output("[seriespepito.py] mirrorlist")

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

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

	# ------------------------------------------------------------------------------------
	# Busca los enlaces a los videos
	# ------------------------------------------------------------------------------------
	listavideos = servertools.findvideos(data)

	for video in listavideos:
		videotitle = video[0]
		url = video[1]
		server = video[2]
		xbmctools.addnewvideo( CHANNELNAME , "play" , category , server , title.strip() + " - " + videotitle , url , thumbnail , plot )
	# ------------------------------------------------------------------------------------

	# 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:HackJoues,项目名称:pelisalacarta-personal-fork,代码行数:31,代码来源:seriespepito.py


示例4: ddpostdetail

def ddpostdetail(params,url,category):
	logger.info("[mcanime.py] ddpostdetail")

	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)

	# Foto de la serie de la enciclopedia
	patron = '<img src="([^"]+)" width="300".*?class="title_pic" />'
	matches = re.compile(patron,re.DOTALL).findall(data)
	if len(matches)>0:
		thumbnail = matches[0]
	
	# Argumento - texto del post
	patron = '<div id="download_detail">(.*?)</div>'
	matches = re.compile(patron,re.DOTALL).findall(data)
	if len(matches)>0:
		plot = scrapertools.htmlclean(matches[0])
		plot = plot.replace("\r\n"," ")
		plot = plot.replace("\r"," ")
		plot = plot.replace("\n"," ")
		plot = plot.strip()

	# ------------------------------------------------------------------------------------
	# Busca los enlaces a los videos
	# ------------------------------------------------------------------------------------
	listavideos = servertools.findvideos(data)

	i = 1

	for video in listavideos:
		try:
			fulltitle = unicode( title.strip() + " (%d) " + video[0], "utf-8" ).encode("iso-8859-1")
		except:
			fulltitle = title.strip() + " (%d) " + video[0]
		fulltitle = fulltitle % i
		i = i + 1
		videourl = video[1]
		server = video[2]
		#logger.info("videotitle="+urllib.quote_plus( videotitle ))
		#logger.info("plot="+urllib.quote_plus( plot ))
		#plot = ""
		#logger.info("title="+urllib.quote_plus( title ))

		xbmctools.addnewvideo( CHANNELNAME , "play" , category , server , fulltitle , videourl , thumbnail , plot )
	# ------------------------------------------------------------------------------------

	# ------------------------------------------------------------------------------------
	# AÒade la opciÛn "AÒadir todos los vÌdeos a la lista de descarga"
	# ------------------------------------------------------------------------------------
	xbmctools.addnewvideo( CHANNELNAME , "addalltodownloadlist" , title , "" , "(AÒadir todos los vÌdeos a la lista de descarga)" , url , thumbnail , plot )
	
	# 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:hmemar,项目名称:xbmc-tvalacarta,代码行数:60,代码来源:mcanime.py


示例5: homedetail

def homedetail(params, url, category):
    logger.info("[mcanime.py] homedetail")

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

    # ------------------------------------------------------------------------------------
    # Busca los enlaces a los videos
    # ------------------------------------------------------------------------------------
    listavideos = servertools.findvideos(extradata)

    for video in listavideos:
        videotitle = video[0]
        url = video[1]
        server = video[2]
        xbmctools.addnewvideo(
            CHANNELNAME, "play", category, server, title.strip() + " - " + videotitle, url, thumbnail, plot
        )
        # ------------------------------------------------------------------------------------

        # 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:jorik041,项目名称:pelisalacarta-personal-fork,代码行数:26,代码来源:mcanime.py


示例6: mirrors

def mirrors(params,url,category):
	logger.info("[capitancinema.py] mirrors")

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

	# Descarga la página
	data = scrapertools.cachePage(url)
	patronvideos  = '<li><strong>DISPONIBLE EN EL FORO</strong>[^<]+<a href="([^"]+)"'
	matches = re.compile(patronvideos,re.DOTALL).findall(data)
	if len(matches)>0:
		url = matches[0]
		data = scrapertools.cachePage(url)

		# ------------------------------------------------------------------------------------
		# Busca los enlaces a los videos
		# ------------------------------------------------------------------------------------
		listavideos = servertools.findvideos(data)

		for video in listavideos:
			videotitle = video[0]
			url = video[1]
			server = video[2]
			xbmctools.addnewvideo( CHANNELNAME , "play" , category , server , title.strip() + " - " + videotitle , url , thumbnail , plot )
		# ------------------------------------------------------------------------------------

	# 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,代码行数:31,代码来源:capitancinema.py


示例7: detail

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

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

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

	# ------------------------------------------------------------------------------------
	# Busca los enlaces a los videos
	# ------------------------------------------------------------------------------------
	listavideos = servertools.findvideos(data)

	for video in listavideos:
		videotitle = video[0]
		url = video[1]
		server = video[2]
		xbmctools.addnewvideo( CHANNELNAME , "play" , category , server , title.strip() + " - " + videotitle , url , thumbnail , plot )
	# ------------------------------------------------------------------------------------

	# 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,代码行数:27,代码来源:vertelenovelasonline.py


示例8: detail

def detail(params,url,category):
	logger.info("[descargapelis.py] detail")

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

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

	patron = '<table width="100%" cellpadding="0" cellspacing="0">[^<]+?'
	patron +='<tr>[^<]+?<td align="center"><img src="(.+?)".+?'
	patron +='<td align="justify" valign="top" class="texto_peli"><b>Sinopsis de (.+?):</b>(.+?)<br />'
	matches = re.compile(patron,re.DOTALL).findall(data)
	if len(matches)>0:
		if DEBUG:
			scrapertools.printMatches(matches)
			#xbmc.output('test')

	listavideos = servertools.findvideos(data)
	thumbnail=matches[0][0]
	plot=matches[0][2]
	title=matches[0][1]
	for video in listavideos:
		xbmctools.addnewvideo( CHANNELNAME , "play" , CHANNELNAME , video[2] , title + " (" + video[2] + ")" , video[1] , thumbnail, plot )

	# 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:hmemar,项目名称:xbmc-tvalacarta,代码行数:31,代码来源:descargapelis.py


示例9: detail

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

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

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

	patron = '<div id="blogitem">[^<]+<p>([^<]+)</p>'
	matches = re.compile(patron,re.DOTALL).findall(data)
	if len(matches)>0:
		plot = matches[0]

	listavideos = servertools.findvideos(data)
	
	for video in listavideos:
		xbmctools.addnewvideo( CHANNELNAME , "play" , CHANNELNAME , video[2] , title + " (" + video[2] + ")" , video[1] , thumbnail, plot )

	# 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,代码行数:25,代码来源:tumejortv.py


示例10: listvideosTVmirror

def listvideosTVmirror(params,url,category):
	logger.info("[dospuntocerovision.py] listvideosTVmirror")
	title = urllib.unquote_plus( params.get("title") )
	thumbnail = urllib.unquote_plus( params.get("thumbnail") )

	# Descarga la p�gina
	data = scrapertools.cachePage(url)
	# ------------------------------------------------------------------------------------
	# Busca los enlaces a los videos
	# ------------------------------------------------------------------------------------
	listavideos = servertools.findvideos(data)
	
	for video in listavideos:
		#logger.info("")
		if video[2] == "tu.tv":
			url = urllib.unquote_plus(servertools.findurl(video[1],video[2]))
			xbmctools.addnewvideo( CHANNELNAME , "detail" , category , "Directo" , title +" - "+video[0], url, thumbnail , "" )
		else:
			xbmctools.addnewvideo( CHANNELNAME , "detail" , 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,代码行数:29,代码来源:dospuntocerovision.py


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


示例12: detail

def detail(params,url,category):
	logger.info("[sevillista.py] detail")

	# Recupera los parámetros
	title = urllib.unquote_plus( params.get("title") )
	thumbnail = urllib.unquote_plus( params.get("thumbnail") )
	plot = urllib.unquote_plus( params.get("plot") )

	# Descarga la página de detalle, y busca el iframe
	data = scrapertools.cachePage(url)
	patron = '<iframe marginwidth="0" marginheight="0" src="([^"]+)"'
	matches = re.compile(patron,re.DOTALL).findall(data)
	if len(matches)>0:
		# Descarga el iframe
		url = matches[0]
		data = scrapertools.cachePage(url)
		
		# Busca vídeos no megavideo (playlist externa)
		patron = '<param name="flashvars" value=".amp.skin=.amp.plugins.captions.amp.file.([^\&]+)\&'
		matches = re.compile(patron,re.DOTALL).findall(data)
		if len(matches)>0:
			# Descarga la playlist
			url = matches[0]
			if url.endswith(".xml"):
				data2 = scrapertools.cachePage(url)
				# Busca los vídeos
				#<title>Parte 1</title>
				#<annotation>Castellano</annotation>
				#<location>http://video.ak.facebook.com/cfs-ak-ash1/27673/000/219/106288556079917_23239.mp4</location>
				patron  = '<title>([^<]+)</title>[^>]*'
				patron += '<annotation>([^<]+)</annotation>[^>]*'
				patron += '<location>([^<]+)</location>'
				matches = re.compile(patron,re.DOTALL).findall(data2)
				
				for match in matches:
					scrapedtitle = title + " " + match[0]+" "+match[1]+" [Directo]"
					scrapedurl = urlparse.urljoin(url,match[2])
					scrapedthumbnail = thumbnail
					scrapedplot = plot
					if (DEBUG): logger.info("title=["+scrapedtitle+"], url=["+scrapedurl+"], thumbnail=["+scrapedthumbnail+"]")
					xbmctools.addnewvideo( CHANNELNAME , "play" , category , "Directo" , scrapedtitle , scrapedurl , scrapedthumbnail , scrapedplot )
			else:
				xbmctools.addnewvideo( CHANNELNAME , "play" , category , "Directo" , title + " [Directo]" , url , thumbnail , plot )
	
	# ------------------------------------------------------------------------------------
	# Busca los enlaces a los videos conocidos en el iframe
	# ------------------------------------------------------------------------------------
	listavideos = servertools.findvideos(data)

	for video in listavideos:
		videotitle = video[0]
		url = video[1]
		server = video[2]
		xbmctools.addnewvideo( CHANNELNAME , "play" , category , server , title.strip() + " - " + videotitle , url , thumbnail , plot )
	# ------------------------------------------------------------------------------------

	# Label (top-right)...
	xbmcplugin.setPluginCategory( handle=pluginhandle, category=category )
	xbmcplugin.addSortMethod( handle=pluginhandle, sortMethod=xbmcplugin.SORT_METHOD_NONE )
	xbmcplugin.endOfDirectory( handle=pluginhandle, succeeded=True )
开发者ID:jorik041,项目名称:pelisalacarta-personal-fork,代码行数:60,代码来源:sevillista.py


示例13: detail

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

	title = params.get("title")
	thumbnail = params.get("thumbnail")
	xbmc.output("[cineblog01.py] title="+title)
	xbmc.output("[cineblog01.py] thumbnail="+thumbnail)

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

	# ------------------------------------------------------------------------------------
	# Busca los enlaces a los videos
	# ------------------------------------------------------------------------------------
	listavideos = servertools.findvideos(data)

	for video in listavideos:
		xbmctools.addvideo( CHANNELNAME , "Megavideo - "+video[0] , video[1] , category , video[2] )
	# ------------------------------------------------------------------------------------

	# 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,代码行数:29,代码来源:cineblog01.py


示例14: detail

def detail(params,url,category):
	logger.info("[edumanmovies.py] detail")

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

	# Descarga la página
	data = scrapertools.cachePage(url)
	#logger.info(data)
	#<iframe name="frame" marginwidth="0" marginheight="0" src="/p.php?f=43&#038;n=negrologoxd" scrolling="no" frameborder="0"

	# ------------------------------------------------------------------------------------
	# Busca los enlaces a los videos
	# ------------------------------------------------------------------------------------
	listavideos = servertools.findvideos(data)

	for video in listavideos:
		videotitle = video[0]
		url = video[1]
		server = video[2]
		xbmctools.addnewvideo( CHANNELNAME , "play" , category , server , title.strip() + " - " + videotitle , url , thumbnail , plot )
	# ------------------------------------------------------------------------------------

	# 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,代码来源:edumanmovies.py


示例15: detail

def detail(params,url,category):
	logger.info("[divxonline.py] detail")
	title=''
	thumbnail=''
	plot=''

	try:
		title = urllib.unquote_plus( params.get("title") )
		thumbnail = urllib.unquote_plus( params.get("thumbnail") )
		plot = urllib.unquote_plus( params.get("plot") )
	except:
		pass
	# Descarga la página
	data = scrapertools.cachePage(url)
	#logger.info(data)

	# ------------------------------------------------------------------------------------
	# Busca los enlaces a los videos
	# ------------------------------------------------------------------------------------
	
	data=decryptinks(data);
	listavideos = servertools.findvideos(data)

	for video in listavideos:
		videotitle = video[0]
		url = video[1]
		server = video[2]
		xbmctools.addnewvideo( CHANNELNAME , "play" , category , server , title.strip() + " - " + videotitle , url , thumbnail , plot )
	# ------------------------------------------------------------------------------------

	# 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:hmemar,项目名称:xbmc-tvalacarta,代码行数:34,代码来源:divxonline.py


示例16: listvideos

def listvideos(params,url,category):
	logger.info("[letmewatchthis.py] listvideos")

	title = urllib.unquote_plus( params.get("title") )
	thumbnail = urllib.unquote_plus( params.get("thumbnail") )
	plot = urllib.unquote_plus( params.get("plot") )
	url = url.replace(" ","%20")
	logger.info("url="+url)

	# ------------------------------------------------------------------------------------
	# Descarga la página
	# ------------------------------------------------------------------------------------
	data = scrapertools.cachePage(url)
	#logger.info(data)
	listavideos = servertools.findvideos(data)
	
	for video in listavideos:
		videotitle = video[0]
		scrapedurl = video[1]
		server = video[2]
		xbmctools.addnewvideo( CHANNELNAME , "play" , category , server , title.strip()+" "+videotitle , scrapedurl , thumbnail , plot )

	# 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:jorik041,项目名称:pelisalacarta-personal-fork,代码行数:26,代码来源:letmewatchthis.py


示例17: detail

def detail(params, url, category):
    logger.info("[documentalesatonline.py] detail")

    title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8")
    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
    # ------------------------------------------------------------------------------------
    listavideos = servertools.findvideos(data)

    for video in listavideos:
        xbmctools.addvideo(CHANNELNAME, "Megavideo - " + video[0], video[1], category, video[2])
        # ------------------------------------------------------------------------------------

        # 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,代码行数:28,代码来源:documentalesatonline.py


示例18: addalltodownloadlist

def addalltodownloadlist(params,url,category):
	logger.info("[mcanime.py] addalltodownloadlist")

	title = urllib.unquote_plus( params.get("category") )
	thumbnail = urllib.unquote_plus( params.get("thumbnail") )
	plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" )

	# Pide el tÌtulo de la serie como "prefijo"
	keyboard = xbmc.Keyboard(downloadtools.limpia_nombre_excepto_1(title))
	keyboard.doModal()
	if (keyboard.isConfirmed()):
		title = keyboard.getText()
	else:
		return

	# Descarga la p·gina
	data = scrapertools.cachePage(url)
	#logger.info(data)

	# ------------------------------------------------------------------------------------
	# Busca los enlaces a los videos
	# ------------------------------------------------------------------------------------
	listavideos = servertools.findvideos(data)

	# Di·logo de progreso
	pDialog = xbmcgui.DialogProgress()
	ret = pDialog.create('pelisalacarta', 'AÒadiendo vÌdeos a la lista de descargas')
	pDialog.update(0, 'VÌdeo...')
	totalepisodes = len(listavideos)

	i = 1

	for video in listavideos:
		try:
			fulltitle = unicode( title.strip() + " (%d) " + video[0], "utf-8" ).encode("iso-8859-1")
		except:
			fulltitle = title.strip() + " (%d) " + video[0]
		fulltitle = fulltitle % i
		i = i + 1
		url = video[1]
		server = video[2]

		# AÒade el enlace a la lista de descargas
		descargadoslist.savebookmark(fulltitle,url,thumbnail,server,plot)
		
		pDialog.update(i*100/totalepisodes, 'VÌdeo...',fulltitle)
		if (pDialog.iscanceled()):
			pDialog.close()
			return

	# ------------------------------------------------------------------------------------
	pDialog.close()

	advertencia = xbmcgui.Dialog()
	resultado = advertencia.ok('VÌdeos en lista de descargas' , 'Se han aÒadido todos los vÌdeos' , 'a la lista de descargas')

	# 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:hmemar,项目名称:xbmc-tvalacarta,代码行数:60,代码来源:mcanime.py


示例19: detail

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

	if xbmctools.getPluginSetting("forceview")=="true":
		xbmc.executebuiltin("Container.SetViewMode(50)") #full list

	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)

	# ------------------------------------------------------------------------------------
	# 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=pluginhandle, category=category )
		
	# Disable sorting...
	xbmcplugin.addSortMethod( handle=pluginhandle, sortMethod=xbmcplugin.SORT_METHOD_NONE )

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


示例20: findvideos

def findvideos(item):
	logger.info("[tumejortv.py] findvideos")

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

	patron = '<div id="blogitem">[^<]+<p>([^<]+)</p>'
	matches = re.compile(patron,re.DOTALL).findall(data)
	if len(matches)>0:
		plot = matches[0]

	listavideos = servertools.findvideos(data)
	
	itemlist = []
	for video in listavideos:
		scrapedtitle = item.title + " (" + video[2] + ")"
		scrapedurl = video[1]
		scrapedthumbnail = item.thumbnail
		scrapedplot = item.plot
		server = video[2]
		itemlist.append( Item(channel=CHANNELNAME, action="play" , title=scrapedtitle , url=scrapedurl, thumbnail=scrapedthumbnail, plot=scrapedplot, server=server, folder=False))

	return itemlist
开发者ID:hmemar,项目名称:xbmc-tvalacarta,代码行数:25,代码来源:tumejortv.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python service.get_backend_core_proxy函数代码示例发布时间:2022-05-27
下一篇:
Python session.Session类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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