当前位置: 首页>>代码示例>>Python>>正文


Python servertools.find_video_items函数代码示例

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


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

示例1: play

def play(item):
    logger.info("pelisalacarta.channels.boxingclub play")
    itemlist = []
    if "pokeryou" in item.url:
        data = scrapertools.cachePage(item.url)
        docid = scrapertools.find_single_match(data, 'docid=([^&]+)&')
        url = "https://docs.google.com/get_video_info?docid=%s&eurl=%s&authuser=" % (docid, item.url)
        data = scrapertools.cachePage(url).decode('unicode-escape')
        data = urllib.unquote(data)
        url = scrapertools.find_single_match(data, 'fmt_stream_map.*?(https.*?),')
        video_url = url.decode('unicode-escape')
        itemlist.append( Item(channel=__channel__ , action="play" , server="directo", title=item.title, url=video_url, thumbnail=item.thumbnail, folder=False))
    elif "mmatd.com" in item.url:
        data = scrapertools.cachePage(item.url)
        video_url = scrapertools.find_single_match(data, 'file: "([^"]+)"')
        itemlist.append( Item(channel=__channel__ , action="play" , server="directo", title=item.title, url=video_url, thumbnail=item.thumbnail, folder=False))
    elif "mmaversus" in item.url:
        data = scrapertools.cachePage(item.url)
        url_redirect = scrapertools.find_single_match(data, '<a href="(http://bestinmma[^"]+)"')
        data = scrapertools.cachePage(url_redirect)
        video_itemlist = servertools.find_video_items(data=data)
        for video_item in video_itemlist:
            itemlist.append( Item(channel=__channel__ , action="play" , server=video_item.server, title=video_item.title, url=video_item.url, thumbnail=item.thumbnail, fanart=item.fanart, folder=False))       
    elif "prowrestlingreports" in item.url:
        headers.append(['Referer',item.referer])
        data = scrapertools.cachePage(item.url, headers=headers)
        logger.info(data)
        url = scrapertools.find_single_match(data, '<iframe src="([^"]+)"')
        itemlist.append( Item(channel=__channel__ , action="play" , server=item.server, title=item.title, url=url, thumbnail=item.thumbnail, fanart=item.fanart, folder=False))             
    else:
        video_itemlist = servertools.find_video_items(data=item.url)
        for video_item in video_itemlist:
            itemlist.append( Item(channel=__channel__ , action="play" , server=video_item.server, title=video_item.title, url=video_item.url, thumbnail=item.thumbnail, fanart=item.fanart, folder=False))       
    
    return itemlist
开发者ID:Jmlaguna89,项目名称:miNuevoRepo,代码行数:35,代码来源:boxingclub.py

示例2: findvid

def findvid(item):
    logger.info("streamondemand.channels.animesubita findvideos")

    headers.append(['Referer', item.url])

    # Descarga la pagina
    data = scrapertools.cache_page(item.url, headers=headers)

    patron = 'return\s*gnarty_player\((\d+)\);'
    matches = re.compile(patron, re.DOTALL).findall(data)
    url = host + 'wp-admin/admin-ajax.php'
    html = []
    for vid in matches:
        html.append(scrapertools.cache_page(url, post='action=loadPlayer&id=' + vid, headers=headers))

    html = ''.join(html)

    itemlist = servertools.find_video_items(data=html)

    if len(itemlist) == 0:
        itemlist = servertools.find_video_items(data=data)

    for videoitem in itemlist:
        videoitem.title = item.title + videoitem.title
        videoitem.fulltitle = item.fulltitle
        videoitem.thumbnail = item.thumbnail
        videoitem.show = item.show
        videoitem.plot = item.plot
        videoitem.channel = __channel__

    return itemlist
开发者ID:Albrt2901,项目名称:plugin.video.streamondemand,代码行数:31,代码来源:animesubita.py

示例3: findvideos

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

    # Descarga la pagina
    data = scrapertools.cache_page(item.url)

    itemlist = servertools.find_video_items(data=data)

    patron = '<iframe style="border: 0;" src="([^"]+)" width="[^"]*" height="[^"]*" scrolling="[^"]*" allowfullscreen="[^"]*"></iframe>'
    url = scrapertools.find_single_match(data, patron)
    if url:
        headers.append(['Referer', item.url])
        data = scrapertools.cache_page(url, headers=headers)
        html = []
        for num in scrapertools.find_multiple_matches(data, 'id="mlink_(\d+)"'):
            html.append(scrapertools.cache_page(url + '?host=%s' % num, headers=headers))

        itemlist.extend(servertools.find_video_items(data=''.join(html)))

    for videoitem in itemlist:
        videoitem.title = item.title + videoitem.title
        videoitem.fulltitle = item.fulltitle
        videoitem.thumbnail = item.thumbnail
        videoitem.show = item.show
        videoitem.plot = item.plot
        videoitem.channel = __channel__

    return itemlist
开发者ID:Zanzibar82,项目名称:plugin.video.streamondemand-1,代码行数:28,代码来源:italiafilm.py

示例4: findvideos

def findvideos(item):
    logger.info("pelisalacarta.channels.fullmatches findvideos")
    itemlist = []
    if item.extra == "":
        data = scrapertools.cachePage(item.url)
        data = scrapertools.decodeHtmlentities(data)
        acp = "&acp_pid="+scrapertools.find_single_match(data,'<input id="acp_post".*?value="([^"]+)"/>')
        acp_shortcode = "&acp_shortcode="+scrapertools.find_single_match(data,'<input id="acp_shortcode".*?value="([^"]+)"/>')
        matches = scrapertools.find_multiple_matches(data, 'id="item.*?"><a href="([^"]+)"><div.*?>(.*?)</div>')
        if len (matches) > 1:
            for scrapedurl, scrapedtitle in matches:
                scrapedtitle = scrapedtitle \
                            .replace("HL ", "Resumen ").replace("Extended","Extendido") \
                            .replace("1st half ", "1ª parte ").replace("2nd half ","2ª parte ") \
                            .replace("Pre-Match", "Pre-partido").replace("Post-Match","Post-Partido")
                post = "acp_currpage=" + scrapedurl.replace("#","") + acp + acp_shortcode + "&action=pp_with_ajax"
                itemlist.append(Item(channel=__channel__, title=scrapedtitle, url=item.url, action="findvideos", thumbnail=item.thumbnail, extra=post, folder=True))
        else:
            itemlist = servertools.find_video_items(data=data)
            for item in itemlist:
                item.channel = __channel__
    else:
        post = item.extra
        data = scrapertools.cachePage("http://www.fullmatchesandshows.com/wp-admin/admin-ajax.php", post=post)
        itemlist = servertools.find_video_items(data=data)
        for item in itemlist:
            item.channel = __channel__

    return itemlist
开发者ID:Jmlaguna89,项目名称:miNuevoRepo,代码行数:29,代码来源:fullmatches.py

示例5: play

def play(item):
    logger.info("pelisalacarta.bricocine findvideos")
    media_url = scrapertools.get_header_from_response(item.url,header_to_get="location")
    itemlist = servertools.find_video_items(data=media_url)
    
    if len(itemlist) == 0:
    
    
       itemlist = servertools.find_video_items(data=item.url)
       data = scrapertools.cache_page(item.url)
    
    
    
    listavideos = servertools.findvideos(data)
    
    for video in listavideos:
        videotitle = item.title
        url =item.url
        server = video[2]
        
        
    
    
   

    return itemlist
开发者ID:divadres,项目名称:pelisalacarta,代码行数:26,代码来源:moviesultimate.py

示例6: findvideos

def findvideos(item):
  #show = item.title.replace("Añadir esta serie a la biblioteca de XBMC","")
  #logger.info("[megaspain.py] findvideos show "+ show)
  itemlist=[]
  data = scrapertools.cache_page(item.url)
   
  if 'thank_you_button'in data:
    item.url = item.url.replace("php?topic=","php?action=thankyou;topic=")
    item.url = item.url + item.plot
    data = scrapertools.cache_page(item.url)
		
  if 'MegaSpain' in data:
    patronimage = '<div class="inner" id="msg_\d{1,9}".*?<img src="([^"]+)".*?mega.co.nz/\#\![A-Za-z0-9\-\_]+\![A-Za-z0-9\-\_]+'
    matches = re.compile(patronimage,re.DOTALL).findall(data)
    if len(matches)>0:
      thumbnail = matches[0]
      thumbnail = scrapertools.htmlclean(thumbnail)
      thumbnail = unicode( thumbnail, "iso-8859-1" , errors="replace" ).encode("utf-8")
      item.thumbnail = thumbnail
 
    patronplot = '<div class="inner" id="msg_\d{1,9}".*?<img src="[^"]+"[^/]+/>(.*?)lgf_facebook_share'
    matches = re.compile(patronplot,re.DOTALL).findall(data)
    if len(matches)>0:
     plot = matches[0]
     title = item.title
     plot = re.sub('&nbsp;', '', plot)
     plot = re.sub('\s\s', '', plot)
     plot = scrapertools.htmlclean(plot)
     item.plot = ""
   
    from servers import servertools
    itemlist.extend(servertools.find_video_items(data=data))
    for videoitem in itemlist:
     videoitem.channel=__channel__
     videoitem.action="play"
     videoitem.folder=False
     videoitem.thumbnail=item.thumbnail
     videoitem.plot = item.plot
     

     videoitem.title = "["+videoitem.server+videoitem.title + " " + item.title
     #videoitem.show = show
   # if config.get_platform().startswith("xbmc") or config.get_platform().startswith("boxee"):
   #    itemlist.append( Item(channel=item.channel, title=show + " Añadir esta serie a la biblioteca de XBMC", url=item.url, action="add_serie_to_library", extra="findvideos") )
    return itemlist   
  else:
    item.thumbnail = ""
    item.plot = ""
    from servers import servertools
    itemlist.extend(servertools.find_video_items(data=data))
    for videoitem in itemlist:
     videoitem.channel=__channel__
     videoitem.action="play"
     videoitem.folder=False
     videoitem.thumbnail=item.thumbnail
     videoitem.plot = item.plot
     videoitem.title = "["+videoitem.server+videoitem.title + " " + item.title
    return itemlist  
开发者ID:divadrbcn,项目名称:pelisalacarta-divadr,代码行数:58,代码来源:megaspain.py

示例7: play

def play(item):
    logger.info("pelisalacarta.seriesmu play")

    media_url = scrapertools.get_header_from_response(item.url, header_to_get="Location")
    itemlist = servertools.find_video_items(data=media_url)

    if len(itemlist) == 0:
        itemlist = servertools.find_video_items(data=item.url)

    return itemlist
开发者ID:superioq26,项目名称:pelisalacarta,代码行数:10,代码来源:seriesmu.py

示例8: findvideos

def findvideos(item):
  show = item.title.replace("Añadir esta serie a la biblioteca de XBMC","")
  logger.info("[megahd.py] findvideos show "+ show)
  logger.info("[megahd.py] findvideos"+item.url)
  data = scrapertools.cache_page(item.url)

  itemlist=[]
	
  if '?action=thankyou;'+item.plot in data:
    item.plot = item.plot.replace("msg=","?action=thankyou;msg=")
    item.url = item.url + item.plot
    data = scrapertools.cache_page(item.url)

  logger.info("data="+data)
		
  if 'MegaHD' in data:
    patronimage = '<div class="inner" id="msg_\d{1,9}".*?<img src="([^"]+)".*?mega.co.nz/\#\![A-Za-z0-9\-\_]+\![A-Za-z0-9\-\_]+'
    matches = re.compile(patronimage,re.DOTALL).findall(data)
    if len(matches)>0:
      thumbnail = matches[0]
      thumbnail = scrapertools.htmlclean(thumbnail)
      thumbnail = unicode( thumbnail, "iso-8859-1" , errors="replace" ).encode("utf-8")
      item.thumbnail = thumbnail
   
    from servers import servertools
    itemlist.extend(servertools.find_video_items(data=data))
    for videoitem in itemlist:
     videoitem.channel=__channel__
     videoitem.action="play"
     videoitem.folder=False
     videoitem.thumbnail=item.thumbnail
     #videoitem.plot = item.plot
     videoitem.title = "["+videoitem.server+videoitem.title + " " + item.title
     videoitem.show = show
    if config.get_platform().startswith("xbmc") or config.get_platform().startswith("boxee"):
       itemlist.append( Item(channel=item.channel, title="Añadir esta serie a la biblioteca de XBMC", url=item.url, action="add_serie_to_library", extra="findvideos") )
    return itemlist   
  else:
    item.thumbnail = ""
    item.plot = ""
    from servers import servertools
    itemlist.extend(servertools.find_video_items(data=data))
    for videoitem in itemlist:
     videoitem.channel=__channel__
     videoitem.action="play"
     videoitem.folder=False
     videoitem.thumbnail=item.thumbnail
     #videoitem.plot = item.plot
     videoitem.title = "["+videoitem.server+videoitem.title + " " + item.title
    return itemlist  
开发者ID:CarlosCondor,项目名称:pelisalacarta-xbmc-plus,代码行数:50,代码来源:megahd.py

示例9: findvid_serie

def findvid_serie(item):
    logger.info("pelisalacarta.filmstream findvideos")

    itemlist = []

    ## Descarga la página
    data = scrapertools.cache_page(item.url)
    data = scrapertools.decodeHtmlentities(data)

    patron1 = '<p style="text-align: center;">(.*?)(<a href="[^"]+" target="_blank">([^<]+)</a>.+?)</p>'
    matches1 = re.compile(patron1).findall(data)
    for titulo1, data, titulo2 in matches1:
        ## Extrae las entradas
        titulo1 = re.sub(r'<[^>]*>', '', titulo1)
        scrapedtitle = titulo2 if titulo1 == "" else titulo1
        li = servertools.find_video_items(data=data)

        for videoitem in li:
            videoitem.title = scrapedtitle + videoitem.title
            videoitem.fulltitle = item.fulltitle
            videoitem.thumbnail = item.thumbnail
            videoitem.show = item.show
            videoitem.plot = item.plot
            videoitem.channel = __channel__

        itemlist.extend(li)

    return itemlist
开发者ID:umbvitt,项目名称:pelisalacartait,代码行数:28,代码来源:filmstream.py

示例10: play

def play(item):
    logger.info("[cineblog01.py] play")

    data = scrapertools.cache_page(item.url)

    print "##############################################################"
    if "go.php" in item.url:
        data = scrapertools.get_match(data, 'window.location.href = "([^"]+)";')
        print "##### play go.php data ##\n%s\n##" % data
    elif "/link/" in item.url:
        from lib.jsbeautifier.unpackers import packer

        try:
            data = scrapertools.get_match(data, "(eval.function.p,a,c,k,e,.*?)</script>")
            data = packer.unpack(data)
            print "##### play /link/ unpack ##\n%s\n##" % data
        except IndexError:
            print "##### The content is yet unpacked"

        data = scrapertools.get_match(data, 'var link(?:\s)?=(?:\s)?"([^"]+)";')
        print "##### play /link/ data ##\n%s\n##" % data
    else:
        data = item.url
        print "##### play else data ##\n%s\n##" % data
    print "##############################################################"

    itemlist = servertools.find_video_items(data=data)

    for videoitem in itemlist:
        videoitem.title = item.show
        videoitem.fulltitle = item.fulltitle
        videoitem.thumbnail = item.thumbnail
        videoitem.channel = __channel__

    return itemlist
开发者ID:dentaku65,项目名称:plugin.video.italyalacarta,代码行数:35,代码来源:cineblog01.py

示例11: play

def play(item):
    logger.info("[filmenoi.py] play")
    itemlist=[]

    if item.server=="linkbucks":
        logger.info("Es linkbucks")
        
        # Averigua el enlace
        from servers import linkbucks
        location = linkbucks.get_long_url(item.url)
        logger.info("location="+location)
        
        # Extrae la URL de saltar el anuncio en adf.ly
        if location.startswith("http://adf"):
            # Averigua el enlace
            from servers import adfly
            location = adfly.get_long_url(location)
            logger.info("location="+location)

        from servers import servertools
        itemlist=servertools.find_video_items(data=location)
        for videoitem in itemlist:
            videoitem.channel=__channel__
            videoitem.folder=False

    else:
        itemlist.append(item)

    return itemlist
开发者ID:divadrbcn,项目名称:pelisalacarta-divadr,代码行数:29,代码来源:filmenoi.py

示例12: findvideos

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

    itemlist=[]
    data = get_main_page(item.url)

    if item.extra!="":
        data = scrapertools.get_match(data,'<div id="'+item.extra+'"(.*?)</div>')
        logger.info("data="+data)

    itemlist = servertools.find_video_items(data=data)

    for videoitem in itemlist:
        videoitem.channel = __channel__
        videoitem.thumbnail = item.thumbnail
        videoitem.fulltitle = item.title
        videoitem.title = "Ver en ["+videoitem.server+"]"
    
    patron = "(http\://adf.ly/[A-Z0-9a-z]+)"
    matches = re.compile(patron,re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for url in matches:
        itemlist.append( Item(channel=__channel__, action="play", title="Enlace adf.ly" , url=url , folder=False) )

    return itemlist
开发者ID:jorik041,项目名称:pelisalacarta-personal-fork,代码行数:25,代码来源:tucinecom.py

示例13: play

def play(item):
    logger.info("pelisalacarta.bricocine findvideos")

    itemlist = servertools.find_video_items(data=item.url)
    data = scrapertools.cache_page(item.url)

    listavideos = servertools.findvideos(data)

    for video in listavideos:
        videotitle = scrapertools.unescape(video[0])
        url = item.url
        server = video[2]

        # xbmctools.addnewvideo( __channel__ , "play" , category , server ,  , url , thumbnail , plot )
        itemlist.append(
            Item(
                channel=__channel__,
                action="play",
                server=server,
                title="Trailer - " + videotitle,
                url=url,
                thumbnail=item.thumbnail,
                plot=item.plot,
                fulltitle=item.title,
                fanart="http://s23.postimg.org/84vkeq863/movietrailers.jpg",
                folder=False,
            )
        )

    return itemlist
开发者ID:leothecoldness,项目名称:pelisalacarta,代码行数:30,代码来源:peliculasdk.py

示例14: findvideos

def findvideos(item):
    from servers import servertools
    return servertools.find_video_items(item=item, channel=item.channel)

#return MessageContainer("Empty", "There aren't any speakers whose name starts with " + char)
#return ObjectContainer(header="Empty", message="There aren't any items")
#oc.add(SearchDirectoryObject(identifier='com.plexapp.plugins.amt', title='Search Trailers', prompt='Search for movie trailer', term=L('Trailers')))
开发者ID:superioq26,项目名称:pelisalacarta,代码行数:7,代码来源:__init__.py

示例15: test

def test():
    bien = True
    
    # mainlist
    mainlist_items = mainlist(Item())
    
    # Comprueba que todas las opciones por categorias tengan algo (excepto los buscadores)
    for mainlist_item in mainlist_items:
        if mainlist_item.action.startswith("menu"):
            exec "itemlist = "+mainlist_item.action+"(mainlist_item)"
            
            # Lee la primera categoría sólo
            exec "itemlist2 ="+itemlist[0].action+"(itemlist[0])"
            if len(itemlist2)==0:
                return false

    # Comprueba si alguno de los vídeos de "Novedades" devuelve mirrors
    for mainlist_item in mainlist_items:
        if mainlist_item.action=="peliculas" or mainlist_item.action=="listserie":
            exec "itemlist = "+mainlist_item.action+"(mainlist_item)"
    
            bien = False
            for episodio_item in itemlist:
                from servers import servertools
                mirrors = servertools.find_video_items(item=episodio_item)
                if len(mirrors)>0:
                    bien = True
                    break

    return bien
开发者ID:CarlosCondor,项目名称:pelisalacarta-xbmc-plus,代码行数:30,代码来源:cineblog01.py


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