Example #1
0
def findvideos(item):
    logger.info("[cinetux.py] findvideos")
    itemlist=[]

    # Busca el argumento
    data = anti_cloudflare(item.url)
    logger.info("data="+data)

    item.plot = scrapertools.find_single_match(data,'<td><span class="info">Sinops[^<]+</span>([^<]+)</td>')
    item.plot = scrapertools.htmlclean(item.plot)
    item.contentPlot = item.plot

    patron  = '<tr class="tabletr">[^<]+'
    patron += '<td class="opcion-td"><img[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="server-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="idioma-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="fuente-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="link-td">(.*?)</td>'
    matches = re.compile(patron,re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for scrapedtitle,scrapedserver,scrapedlanguage,scrapedquality,scrapedlink in matches:
        title = "Ver "+scrapedtitle+" en "+scrapedserver+" ("+scrapedlanguage+") ("+scrapedquality+")"
        url = scrapedlink
        thumbnail = servertools.guess_server_thumbnail(scrapedserver)
        plot = ""
        itemlist.append( Item(channel=__channel__, action="play", title=title , fulltitle=item.fulltitle, url=url , thumbnail=thumbnail , plot=plot , fanart="http://pelisalacarta.mimediacenter.info/fanart/cinetux.jpg" , parentContent=item , folder=False) )

    patron  = '<tr class="tabletr">[^<]+'
    patron += '<td class="episode-server[^>]+><img[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="episode-server-img[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="episode-lang[^>]+>([^>]+)</td>[^<]+'
    patron += '<td align="center">([^<]+)</td>[^<]+'
    patron += '<td(.*?)</td>'
    matches = re.compile(patron,re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for scrapedtitle,scrapedserver,scrapedlanguage,scrapedquality,scrapedlink in matches:
        title = "Ver "+scrapedtitle+" en "+scrapedserver+" ("+scrapedlanguage+") ("+scrapedquality+")"
        url = scrapedlink
        thumbnail = servertools.guess_server_thumbnail(scrapedserver)
        plot = ""
        itemlist.append( Item(channel=__channel__, action="play", title=title , fulltitle=item.fulltitle+" ["+scrapedlanguage+"]["+scrapedquality+"]", url=url , thumbnail=thumbnail , plot=plot , parentContent=item , folder=False) )

    if len(itemlist)==0:
        itemlist = servertools.find_video_items(item=item,data=data)
        i=1
        for videoitem in itemlist:
            videoitem.title = "Ver Opción %d en %s" % (i,videoitem.server)
            videoitem.fulltitle = item.fulltitle
            videoitem.channel=channel=__channel__

    return itemlist
Example #2
0
def findvideos(item):
    logger.info("[cinetux.py] findvideos")
    itemlist=[]

    # Busca el argumento
    data = scrapertools.cache_page(item.url)
    logger.info("data="+data)

    item.plot = scrapertools.find_single_match(data,'<td><span class="info">Sinops[^<]+</span>([^<]+)</td>')
    item.plot = scrapertools.htmlclean(item.plot)
    item.contentPlot = item.plot

    '''
    <tr class="tabletr">
    <td class="episode-server" align="left"><img src="http://www.cinetux.org/imagenes/veronline.png" alt="" width="22" height="22" />Opción 01</td>
    <td class="episode-server-img" align="center">PutLocker</td>
    <td class="episode-lang" align="center">Español</td>
    <td align="center">DVD-SCR</td>
    <td class="center" align="center"><a rel="nofollow" target="_blank" class="myButtonLink" href="http://www.putlocker.com/file/BADCD9ACA395E318"></a></td>
    <td align="center">Anónimo</td>
    </tr>
    '''
    patron  = '<tr class="tabletr">[^<]+'
    patron += '<td class="opcion-td"><img[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="server-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="idioma-td[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="calidad-td[^<]+</td>[^<]+'
    patron += '<td class="fuente-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="link-td">(.*?)</td>'
    matches = re.compile(patron,re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for scrapedtitle,scrapedserver,scrapedlanguage,scrapedquality,scrapedlink in matches:
        title = "Ver "+scrapedtitle+" en "+scrapedserver+" ("+scrapedlanguage+") ("+scrapedquality+")"
        url = scrapedlink
        thumbnail = servertools.guess_server_thumbnail(scrapedserver)
        plot = ""
        itemlist.append( Item(channel=__channel__, action="play", title=title , fulltitle=item.fulltitle+" ["+scrapedlanguage+"]["+scrapedquality+"]", url=url , thumbnail=thumbnail , plot=plot , fanart="http://pelisalacarta.mimediacenter.info/fanart/cinetux.jpg" , parentContent=item, folder=False) )

    patron  = '<tr class="tabletr">[^<]+'
    patron += '<td class="opcion-td"><img[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="server-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="idioma-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="fuente-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="link-td">(.*?)</td>'
    matches = re.compile(patron,re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for scrapedtitle,scrapedserver,scrapedlanguage,scrapedquality,scrapedlink in matches:
        title = "Ver "+scrapedtitle+" en "+scrapedserver+" ("+scrapedlanguage+") ("+scrapedquality+")"
        url = scrapedlink
        thumbnail = servertools.guess_server_thumbnail(scrapedserver)
        plot = ""
        itemlist.append( Item(channel=__channel__, action="play", title=title , fulltitle=item.fulltitle, url=url , thumbnail=thumbnail , plot=plot , fanart="http://pelisalacarta.mimediacenter.info/fanart/cinetux.jpg" , parentContent=item , folder=False) )

    patron  = '<tr class="tabletr">[^<]+'
    patron += '<td class="episode-server[^>]+><img[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="episode-server-img[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="episode-lang[^>]+>([^>]+)</td>[^<]+'
    patron += '<td align="center">([^<]+)</td>[^<]+'
    patron += '<td(.*?)</td>'
    matches = re.compile(patron,re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for scrapedtitle,scrapedserver,scrapedlanguage,scrapedquality,scrapedlink in matches:
        title = "Ver "+scrapedtitle+" en "+scrapedserver+" ("+scrapedlanguage+") ("+scrapedquality+")"
        url = scrapedlink
        thumbnail = servertools.guess_server_thumbnail(scrapedserver)
        plot = ""
        itemlist.append( Item(channel=__channel__, action="play", title=title , fulltitle=item.fulltitle+" ["+scrapedlanguage+"]["+scrapedquality+"]", url=url , thumbnail=thumbnail , plot=plot , parentContent=item , folder=False) )

    if len(itemlist)==0:
        itemlist = servertools.find_video_items(item=item,data=data)
        i=1
        for videoitem in itemlist:
            videoitem.title = "Ver Opción %d en %s" % (i,videoitem.server)
            videoitem.fulltitle = item.fulltitle
            videoitem.channel=channel=__channel__

    return itemlist
Example #3
0
def findvideos(item):
    logger.info("pelisalacarta.yaske findvideos url="+item.url)

    # Descarga la página
    data = scrapertools.cache_page(item.url,headers=HEADER)

    item.plot = scrapertools.find_single_match(data,'<meta name="sinopsis" content="([^"]+)"')
    item.plot = scrapertools.htmlclean(item.plot)
    item.contentPlot = item.plot

    # Extrae las entradas
    '''
    <tr bgcolor="">
    <td height="32" align="center"><a class="btn btn-mini enlace_link" style="text-decoration:none;" rel="nofollow" target="_blank" title="Ver..." href="http://www.yaske.net/es/reproductor/pelicula/2141/44446/"><i class="icon-play"></i><b>&nbsp; Opcion &nbsp; 04</b></a></td>
    <td align="left"><img src="http://www.google.com/s2/favicons?domain=played.to"/>played</td>
    <td align="center"><img src="http://www.yaske.net/theme/01/data/images/flags/la_la.png" width="21">Lat.</td>
    <td align="center" class="center"><span title="" style="text-transform:capitalize;">hd real 720</span></td>
    <td align="center"><div class="star_rating" title="HD REAL 720 ( 5 de 5 )">
    <ul class="star"><li class="curr" style="width: 100%;"></li></ul>
    </div>
    </td> <td align="center" class="center">2553</td> </tr>
    '''

    patron  = '<tr bgcolor=(.*?)</tr>'
    matches = re.compile(patron,re.DOTALL).findall(data)

    itemlist = []

    #n = 1
    for tr in matches:
        logger.info("tr="+tr)
        try:
            title = scrapertools.get_match(tr,'<b>([^<]+)</b>')
            server = scrapertools.get_match(tr,'"http\://www.google.com/s2/favicons\?domain\=([^"]+)"')

            # <td align="center"><img src="http://www.yaske.net/theme/01/data/images/flags/la_la.png" width="19">Lat.</td>
            idioma = scrapertools.get_match(tr,'<img src="http://www.yaske.[a-z]+/theme/01/data/images/flags/([a-z_]+).png"[^>]+>[^<]*<')
            subtitulos = scrapertools.get_match(tr,'<img src="http://www.yaske.[a-z]+/theme/01/data/images/flags/[^"]+"[^>]+>([^<]*)<')
            calidad = scrapertools.get_match(tr,'<td align="center" class="center"[^<]+<span title="[^"]*" style="text-transform.capitalize.">([^<]+)</span></td>')
            
            #<a [....] href="http://api.ysk.pe/noref/?u=< URL Vídeo >">
            url = scrapertools.get_match(tr,'<a.*?href="([^"]+)"')

            # Para extraer netutv se necesita en la actualidad pasar por varias páginas con lo que relentiza mucho la carga.
            # De momento mostrará "No hay nada que reproducir"
            '''
            if "/netu/tv/" in url:
                import base64
                ###################################################
                # Añadido 17-09-14
                ###################################################
                try: data = scrapertools.cache_page(url,headers=getSetCookie(url1))
                except: data = scrapertools.cache_page(url)
                ###################################################
                match_b64_1 = 'base64,([^"]+)"'
                b64_1 = scrapertools.get_match(data, match_b64_1)
                utf8_1 = base64.decodestring(b64_1)
                match_b64_inv = "='([^']+)';"
                b64_inv = scrapertools.get_match(utf8_1, match_b64_inv)
                b64_2 = b64_inv[::-1]
                utf8_2 = base64.decodestring(b64_2).replace("%","\\").decode('unicode-escape')
                id_video = scrapertools.get_match(utf8_2,'<input name="vid" id="text" value="([^"]+)">')
                url = "http://netu.tv/watch_video.php?v="+id_video
            '''

            title = title.replace("&nbsp;","")

            if "es_es" in idioma:
                scrapedtitle = title + " en "+server.strip()+" [ESP]["+calidad+"]"
            elif "la_la" in idioma:
                scrapedtitle = title + " en "+server.strip()+" [LAT]["+calidad+"]"
            elif "en_es" in idioma:
                scrapedtitle = title + " en "+server.strip()+" [SUB]["+calidad+"]"
            elif "en_en" in idioma:
                scrapedtitle = title + " en "+server.strip()+" [ENG]["+calidad+"]"
            else:
                scrapedtitle = title + " en "+server.strip()+" ["+idioma+" / "+subtitulos+"]["+calidad+"]"
            scrapedtitle = scrapertools.entityunescape(scrapedtitle)
            scrapedtitle = scrapedtitle.strip()

            scrapedurl = url

            scrapedthumbnail = servertools.guess_server_thumbnail(scrapedtitle)

            logger.info("server="+server+", scrapedurl="+scrapedurl)
            if scrapedurl.startswith("http"):
                itemlist.append( Item(channel=__channel__, action="play", title=scrapedtitle , url=scrapedurl , thumbnail=scrapedthumbnail , folder=False, parentContent=item) )
        except:
            import traceback
            logger.info("Excepcion: "+traceback.format_exc())

    return itemlist
Example #4
0
def findvideos(item):
    logger.info("pelisalacarta.channels.divxatope findvideos")
    itemlist = []

    # Descarga la pagina
    item.url = item.url.replace("divxatope.com/descargar/",
                                "divxatope.com/ver-online/")
    '''
    <div class="box1"><img src='http://www.divxatope.com/uploads/images/gestores/thumbs/1411605666_nowvideo.jpg' width='33' height='33'></div>
    <div class="box2">nowvideo</div>
    <div class="box3">Español Castel</div>
    <div class="box4">DVD-Screene</div>
    <div class="box5"><a href="http://www.nowvideo.ch/video/affd21b283421" rel="nofollow" target="_blank">Ver Online</a></div>
    '''
    # Descarga la pagina
    data = scrapertools.cachePage(item.url)

    item.plot = scrapertools.find_single_match(
        data, '<div class="post-entry" style="height:300px;">(.*?)</div>')
    item.plot = scrapertools.htmlclean(item.plot).strip()
    item.contentPlot = item.plot

    link = scrapertools.find_single_match(
        data, 'href="http://tumejorserie.*?link=([^"]+)"')
    if link != "":
        link = "http://www.divxatope.com/" + link
        logger.info("pelisalacarta.channels.divxatope torrent=" + link)
        itemlist.append(
            Item(channel=__channel__,
                 action="play",
                 server="torrent",
                 title="Vídeo en torrent",
                 fulltitle=item.title,
                 url=link,
                 thumbnail=servertools.guess_server_thumbnail("torrent"),
                 plot=item.plot,
                 folder=False,
                 parentContent=item))

    patron = "<div class=\"box1\"[^<]+<img[^<]+</div[^<]+"
    patron += '<div class="box2">([^<]+)</div[^<]+'
    patron += '<div class="box3">([^<]+)</div[^<]+'
    patron += '<div class="box4">([^<]+)</div[^<]+'
    patron += '<div class="box5">(.*?)</div[^<]+'
    patron += '<div class="box6">([^<]+)<'
    matches = re.compile(patron, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)

    itemlist_ver = []
    itemlist_descargar = []

    for servername, idioma, calidad, scrapedurl, comentarios in matches:
        title = "Mirror en " + servername + " (" + calidad + ")" + " (" + idioma + ")"
        if comentarios.strip() != "":
            title = title + " (" + comentarios.strip() + ")"
        url = urlparse.urljoin(item.url, scrapedurl)
        thumbnail = servertools.guess_server_thumbnail(title)
        plot = ""
        if (DEBUG):
            logger.info("title=[" + title + "], url=[" + url +
                        "], thumbnail=[" + thumbnail + "]")
        new_item = Item(channel=__channel__,
                        action="extract_url",
                        title=title,
                        fulltitle=title,
                        url=url,
                        thumbnail=thumbnail,
                        plot=plot,
                        folder=True,
                        parentContent=item)
        if comentarios.startswith("Ver en"):
            itemlist_ver.append(new_item)
        else:
            itemlist_descargar.append(new_item)

    for new_item in itemlist_ver:
        itemlist.append(new_item)

    for new_item in itemlist_descargar:
        itemlist.append(new_item)

    if len(itemlist) == 0:
        itemlist = servertools.find_video_items(item=item, data=data)
        for videoitem in itemlist:
            videoitem.title = "Enlace encontrado en " + videoitem.server + " (" + scrapertools.get_filename_from_url(
                videoitem.url) + ")"
            videoitem.fulltitle = item.fulltitle
            videoitem.thumbnail = item.thumbnail
            videoitem.channel = __channel__

    return itemlist
Example #5
0
def findvideos(item):
    logger.info("pelisalacarta.yaske findvideos url=" + item.url)

    # Descarga la página
    data = scrapertools.cache_page(item.url, headers=HEADER)

    item.plot = scrapertools.find_single_match(
        data, '<meta name="sinopsis" content="([^"]+)"')
    item.plot = scrapertools.htmlclean(item.plot)
    item.contentPlot = item.plot

    # Extrae las entradas
    '''
    <tr bgcolor="">
    <td height="32" align="center"><a class="btn btn-mini enlace_link" style="text-decoration:none;" rel="nofollow" target="_blank" title="Ver..." href="http://www.yaske.net/es/reproductor/pelicula/2141/44446/"><i class="icon-play"></i><b>&nbsp; Opcion &nbsp; 04</b></a></td>
    <td align="left"><img src="http://www.google.com/s2/favicons?domain=played.to"/>played</td>
    <td align="center"><img src="http://www.yaske.net/theme/01/data/images/flags/la_la.png" width="21">Lat.</td>
    <td align="center" class="center"><span title="" style="text-transform:capitalize;">hd real 720</span></td>
    <td align="center"><div class="star_rating" title="HD REAL 720 ( 5 de 5 )">
    <ul class="star"><li class="curr" style="width: 100%;"></li></ul>
    </div>
    </td> <td align="center" class="center">2553</td> </tr>
    '''

    patron = '<tr bgcolor=(.*?)</tr>'
    matches = re.compile(patron, re.DOTALL).findall(data)

    itemlist = []

    #n = 1
    for tr in matches:
        logger.info("tr=" + tr)
        try:
            title = scrapertools.get_match(tr, '<b>([^<]+)</b>')
            server = scrapertools.get_match(
                tr, '"http\://www.google.com/s2/favicons\?domain\=([^"]+)"')

            # <td align="center"><img src="http://www.yaske.net/theme/01/data/images/flags/la_la.png" width="19">Lat.</td>
            idioma = scrapertools.get_match(
                tr,
                '<img src="http://www.yaske.[a-z]+/theme/01/data/images/flags/([a-z_]+).png"[^>]+>[^<]*<'
            )
            subtitulos = scrapertools.get_match(
                tr,
                '<img src="http://www.yaske.[a-z]+/theme/01/data/images/flags/[^"]+"[^>]+>([^<]*)<'
            )
            calidad = scrapertools.get_match(
                tr,
                '<td align="center" class="center"[^<]+<span title="[^"]*" style="text-transform.capitalize.">([^<]+)</span></td>'
            )

            #<a [....] href="http://api.ysk.pe/noref/?u=< URL Vídeo >">
            url = scrapertools.get_match(tr, '<a.*?href="([^"]+)"')

            # Para extraer netutv se necesita en la actualidad pasar por varias páginas con lo que relentiza mucho la carga.
            # De momento mostrará "No hay nada que reproducir"
            '''
            if "/netu/tv/" in url:
                import base64
                ###################################################
                # Añadido 17-09-14
                ###################################################
                try: data = scrapertools.cache_page(url,headers=getSetCookie(url1))
                except: data = scrapertools.cache_page(url)
                ###################################################
                match_b64_1 = 'base64,([^"]+)"'
                b64_1 = scrapertools.get_match(data, match_b64_1)
                utf8_1 = base64.decodestring(b64_1)
                match_b64_inv = "='([^']+)';"
                b64_inv = scrapertools.get_match(utf8_1, match_b64_inv)
                b64_2 = b64_inv[::-1]
                utf8_2 = base64.decodestring(b64_2).replace("%","\\").decode('unicode-escape')
                id_video = scrapertools.get_match(utf8_2,'<input name="vid" id="text" value="([^"]+)">')
                url = "http://netu.tv/watch_video.php?v="+id_video
            '''

            title = title.replace("&nbsp;", "")

            if "es_es" in idioma:
                scrapedtitle = title + " en " + server.strip(
                ) + " [ESP][" + calidad + "]"
            elif "la_la" in idioma:
                scrapedtitle = title + " en " + server.strip(
                ) + " [LAT][" + calidad + "]"
            elif "en_es" in idioma:
                scrapedtitle = title + " en " + server.strip(
                ) + " [SUB][" + calidad + "]"
            elif "en_en" in idioma:
                scrapedtitle = title + " en " + server.strip(
                ) + " [ENG][" + calidad + "]"
            else:
                scrapedtitle = title + " en " + server.strip(
                ) + " [" + idioma + " / " + subtitulos + "][" + calidad + "]"
            scrapedtitle = scrapertools.entityunescape(scrapedtitle)
            scrapedtitle = scrapedtitle.strip()

            scrapedurl = url

            scrapedthumbnail = servertools.guess_server_thumbnail(scrapedtitle)

            logger.info("server=" + server + ", scrapedurl=" + scrapedurl)
            if scrapedurl.startswith("http"):
                itemlist.append(
                    Item(channel=__channel__,
                         action="play",
                         title=scrapedtitle,
                         url=scrapedurl,
                         thumbnail=scrapedthumbnail,
                         folder=False,
                         parentContent=item))
        except:
            import traceback
            logger.info("Excepcion: " + traceback.format_exc())

    return itemlist
Example #6
0
def findvideos(item):
    logger.info("[cinetux.py] findvideos")
    itemlist = []

    # Busca el argumento
    data = scrapertools.cache_page(item.url)
    logger.info("data=" + data)

    item.plot = scrapertools.find_single_match(
        data, '<td><span class="info">Sinops[^<]+</span>([^<]+)</td>')
    item.plot = scrapertools.htmlclean(item.plot)
    item.contentPlot = item.plot
    '''
    <tr class="tabletr">
    <td class="episode-server" align="left"><img src="http://www.cinetux.org/imagenes/veronline.png" alt="" width="22" height="22" />Opción 01</td>
    <td class="episode-server-img" align="center">PutLocker</td>
    <td class="episode-lang" align="center">Español</td>
    <td align="center">DVD-SCR</td>
    <td class="center" align="center"><a rel="nofollow" target="_blank" class="myButtonLink" href="http://www.putlocker.com/file/BADCD9ACA395E318"></a></td>
    <td align="center">Anónimo</td>
    </tr>
    '''
    patron = '<tr class="tabletr">[^<]+'
    patron += '<td class="opcion-td"><img[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="server-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="idioma-td[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="calidad-td[^<]+</td>[^<]+'
    patron += '<td class="fuente-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="link-td">(.*?)</td>'
    matches = re.compile(patron, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for scrapedtitle, scrapedserver, scrapedlanguage, scrapedquality, scrapedlink in matches:
        title = "Ver " + scrapedtitle + " en " + scrapedserver + " (" + scrapedlanguage + ") (" + scrapedquality + ")"
        url = scrapedlink
        thumbnail = servertools.guess_server_thumbnail(scrapedserver)
        plot = ""
        itemlist.append(
            Item(channel=__channel__,
                 action="play",
                 title=title,
                 fulltitle=item.fulltitle + " [" + scrapedlanguage + "][" +
                 scrapedquality + "]",
                 url=url,
                 thumbnail=thumbnail,
                 plot=plot,
                 fanart=
                 "http://pelisalacarta.mimediacenter.info/fanart/cinetux.jpg",
                 parentContent=item,
                 folder=False))

    patron = '<tr class="tabletr">[^<]+'
    patron += '<td class="opcion-td"><img[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="server-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="idioma-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="fuente-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="link-td">(.*?)</td>'
    matches = re.compile(patron, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for scrapedtitle, scrapedserver, scrapedlanguage, scrapedquality, scrapedlink in matches:
        title = "Ver " + scrapedtitle + " en " + scrapedserver + " (" + scrapedlanguage + ") (" + scrapedquality + ")"
        url = scrapedlink
        thumbnail = servertools.guess_server_thumbnail(scrapedserver)
        plot = ""
        itemlist.append(
            Item(channel=__channel__,
                 action="play",
                 title=title,
                 fulltitle=item.fulltitle,
                 url=url,
                 thumbnail=thumbnail,
                 plot=plot,
                 fanart=
                 "http://pelisalacarta.mimediacenter.info/fanart/cinetux.jpg",
                 parentContent=item,
                 folder=False))

    patron = '<tr class="tabletr">[^<]+'
    patron += '<td class="episode-server[^>]+><img[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="episode-server-img[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="episode-lang[^>]+>([^>]+)</td>[^<]+'
    patron += '<td align="center">([^<]+)</td>[^<]+'
    patron += '<td(.*?)</td>'
    matches = re.compile(patron, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for scrapedtitle, scrapedserver, scrapedlanguage, scrapedquality, scrapedlink in matches:
        title = "Ver " + scrapedtitle + " en " + scrapedserver + " (" + scrapedlanguage + ") (" + scrapedquality + ")"
        url = scrapedlink
        thumbnail = servertools.guess_server_thumbnail(scrapedserver)
        plot = ""
        itemlist.append(
            Item(channel=__channel__,
                 action="play",
                 title=title,
                 fulltitle=item.fulltitle + " [" + scrapedlanguage + "][" +
                 scrapedquality + "]",
                 url=url,
                 thumbnail=thumbnail,
                 plot=plot,
                 parentContent=item,
                 folder=False))

    if len(itemlist) == 0:
        itemlist = servertools.find_video_items(item=item, data=data)
        i = 1
        for videoitem in itemlist:
            videoitem.title = "Ver Opción %d en %s" % (i, videoitem.server)
            videoitem.fulltitle = item.fulltitle
            videoitem.channel = channel = __channel__

    return itemlist
Example #7
0
def findvideos(item):
    logger.info("pelisalacarta.channels.divxatope findvideos")
    itemlist = []

    # Descarga la pagina
    item.url = item.url.replace("divxatope.com/descargar/", "divxatope.com/ver-online/")

    """
    <div class="box1"><img src='http://www.divxatope.com/uploads/images/gestores/thumbs/1411605666_nowvideo.jpg' width='33' height='33'></div>
    <div class="box2">nowvideo</div>
    <div class="box3">Español Castel</div>
    <div class="box4">DVD-Screene</div>
    <div class="box5"><a href="http://www.nowvideo.ch/video/affd21b283421" rel="nofollow" target="_blank">Ver Online</a></div>
    """
    # Descarga la pagina
    data = scrapertools.cachePage(item.url)

    item.plot = scrapertools.find_single_match(data, '<div class="post-entry" style="height:300px;">(.*?)</div>')
    item.plot = scrapertools.htmlclean(item.plot).strip()
    item.contentPlot = item.plot

    link = scrapertools.find_single_match(data, 'href="http://tumejorserie.*?link=([^"]+)"')
    if link != "":
        link = "http://www.divxatope.com/" + link
        logger.info("pelisalacarta.channels.divxatope torrent=" + link)
        itemlist.append(
            Item(
                channel=__channel__,
                action="play",
                server="torrent",
                title="Vídeo en torrent",
                fulltitle=item.title,
                url=link,
                thumbnail=servertools.guess_server_thumbnail("torrent"),
                plot=item.plot,
                folder=False,
                parentContent=item,
            )
        )

    patron = '<div class="box1"[^<]+<img[^<]+</div[^<]+'
    patron += '<div class="box2">([^<]+)</div[^<]+'
    patron += '<div class="box3">([^<]+)</div[^<]+'
    patron += '<div class="box4">([^<]+)</div[^<]+'
    patron += '<div class="box5">(.*?)</div[^<]+'
    patron += '<div class="box6">([^<]+)<'
    matches = re.compile(patron, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)

    itemlist_ver = []
    itemlist_descargar = []

    for servername, idioma, calidad, scrapedurl, comentarios in matches:
        title = "Mirror en " + servername + " (" + calidad + ")" + " (" + idioma + ")"
        if comentarios.strip() != "":
            title = title + " (" + comentarios.strip() + ")"
        url = urlparse.urljoin(item.url, scrapedurl)
        thumbnail = servertools.guess_server_thumbnail(title)
        plot = ""
        if DEBUG:
            logger.info("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]")
        new_item = Item(
            channel=__channel__,
            action="extract_url",
            title=title,
            fulltitle=title,
            url=url,
            thumbnail=thumbnail,
            plot=plot,
            folder=True,
            parentContent=item,
        )
        if comentarios.startswith("Ver en"):
            itemlist_ver.append(new_item)
        else:
            itemlist_descargar.append(new_item)

    for new_item in itemlist_ver:
        itemlist.append(new_item)

    for new_item in itemlist_descargar:
        itemlist.append(new_item)

    if len(itemlist) == 0:
        itemlist = servertools.find_video_items(item=item, data=data)
        for videoitem in itemlist:
            videoitem.title = (
                "Enlace encontrado en "
                + videoitem.server
                + " ("
                + scrapertools.get_filename_from_url(videoitem.url)
                + ")"
            )
            videoitem.fulltitle = item.fulltitle
            videoitem.thumbnail = item.thumbnail
            videoitem.channel = __channel__

    return itemlist
Example #8
0
def findvideos(item):
    logger.info("[cinetux.py] findvideos")
    itemlist = []

    # Busca el argumento
    data = anti_cloudflare(item.url)
    logger.info("data=" + data)

    item.plot = scrapertools.find_single_match(
        data, '<td><span class="info">Sinops[^<]+</span>([^<]+)</td>')
    item.plot = scrapertools.htmlclean(item.plot)
    item.contentPlot = item.plot

    patron = '<tr class="tabletr">[^<]+'
    patron += '<td class="opcion-td"><img[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="server-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="idioma-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="fuente-td[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="link-td">(.*?)</td>'
    matches = re.compile(patron, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for scrapedtitle, scrapedserver, scrapedlanguage, scrapedquality, scrapedlink in matches:
        title = "Ver " + scrapedtitle + " en " + scrapedserver + " (" + scrapedlanguage + ") (" + scrapedquality + ")"
        url = scrapedlink
        thumbnail = servertools.guess_server_thumbnail(scrapedserver)
        plot = ""
        itemlist.append(
            Item(channel=__channel__,
                 action="play",
                 title=title,
                 fulltitle=item.fulltitle,
                 url=url,
                 thumbnail=thumbnail,
                 plot=plot,
                 fanart=
                 "http://pelisalacarta.mimediacenter.info/fanart/cinetux.jpg",
                 parentContent=item,
                 folder=False))

    patron = '<tr class="tabletr">[^<]+'
    patron += '<td class="episode-server[^>]+><img[^>]+>([^>]+)</td>[^<]+'
    patron += '<td class="episode-server-img[^>]+>([^<]+)</td>[^<]+'
    patron += '<td class="episode-lang[^>]+>([^>]+)</td>[^<]+'
    patron += '<td align="center">([^<]+)</td>[^<]+'
    patron += '<td(.*?)</td>'
    matches = re.compile(patron, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)
    for scrapedtitle, scrapedserver, scrapedlanguage, scrapedquality, scrapedlink in matches:
        title = "Ver " + scrapedtitle + " en " + scrapedserver + " (" + scrapedlanguage + ") (" + scrapedquality + ")"
        url = scrapedlink
        thumbnail = servertools.guess_server_thumbnail(scrapedserver)
        plot = ""
        itemlist.append(
            Item(channel=__channel__,
                 action="play",
                 title=title,
                 fulltitle=item.fulltitle + " [" + scrapedlanguage + "][" +
                 scrapedquality + "]",
                 url=url,
                 thumbnail=thumbnail,
                 plot=plot,
                 parentContent=item,
                 folder=False))

    if len(itemlist) == 0:
        itemlist = servertools.find_video_items(item=item, data=data)
        i = 1
        for videoitem in itemlist:
            videoitem.title = "Ver Opción %d en %s" % (i, videoitem.server)
            videoitem.fulltitle = item.fulltitle
            videoitem.channel = channel = __channel__

    return itemlist