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