Página 2 de 3

Re: Javascript emulator?

Publicado: 22 Ago 2015, 23:03
por robalo
zanzibar1982 escribió:was able to fix all the issues. Has anybody seen robalo? :)
He estado fuera (pequeña vacaciones de 7 días) lo puse en un post anterior en este hilo.

He leido algo con el movil en los tiempos de espera en las compras de mi jefa :) Aún me queda mucho que leer además de probar la nueva versión con skin y normal.

Re: Javascript emulator?

Publicado: 23 Ago 2015, 00:55
por zanzibar1982
Welcome back, robalo!

hope you enjoyed your vacation :)

Re: Javascript emulator?

Publicado: 23 Ago 2015, 08:27
por jesus
robalo escribió:
zanzibar1982 escribió:was able to fix all the issues. Has anybody seen robalo? :)
He estado fuera (pequeña vacaciones de 7 días) lo puse en un post anterior en este hilo.

He leido algo con el movil en los tiempos de espera en las compras de mi jefa :) Aún me queda mucho que leer además de probar la nueva versión con skin y normal.
Sí, yo ya tengo habilidad en empujar el carro con una mano y leer con la otra :)

Bienvenido de vuelta.

Re: Javascript emulator?

Publicado: 24 Ago 2015, 12:08
por robalo
jesus escribió:Sí, yo ya tengo habilidad en empujar el carro con una mano y leer con la otra :)
:lol: Yo lo hago rescostao sobre el el carro empujando con los codos para usar las dos manos :lol:

He leido los post con más tranquilidad y se está mezclando dos canales. Creo que es mejor una cada vez.

En el caso de itafilm.tv, por lo que probé, necesitamos pasarle la cookie '_ddn_intercept_2_' para que entregue el set-cookie con 'PHPSESSID' que es lo que se escribirá en el archivo cookies.dat

Código: Seleccionar todo

.itafilm.tv	TRUE	/	FALSE		PHPSESSID	scvsv63.....
Y sobre los thumbnail que necesita pasarle cookies a kodi se puede probar hacerlo de la misma forma que hace para las url de vídeo que debe resover kodi. El formato sería:
url + "|Cookie=" + cookie

No lo he probado aún, esta tarde intentaré ver este tema

Re: Javascript emulator?

Publicado: 24 Ago 2015, 23:14
por robalo
Pues parece que también es válido para los thumbnail

función peliculas del archivo itastreaming.py del repositorio de DrZ3r0 https://github.com/Dr-Zer0/pelisalacart ... reaming.py

Código: Seleccionar todo

def peliculas(item):
    logger.info("pelisalacarta.itastreaming peliculas")
    itemlist = []

    # Descarga la pagina
    data = anti_cloudflare(item.url)

    ## ------------------------------------------------
    cookies = ""
    matches = re.compile( '(.itastreaming.co.*?)\n', re.DOTALL ).findall( config.get_cookie_data() )
    for cookie in matches:
        name = cookie.split( '\t' )[5]
        value = cookie.split( '\t' )[6]
        cookies+= name + "=" + value + ";"
    headers.append( ['Cookie',cookies[:-1]] )
    import urllib
    _headers = urllib.urlencode( dict( headers ) )
    ## ------------------------------------------------

    # Extrae las entradas (carpetas)
    patron = '<div class="item">\s*<a href="([^"]+)" title="([^"]+)">\s*<div class="img">\s*<img src="([^"]+)"'
    matches = re.compile(patron, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)

    for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
        scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
        html = scrapertools.cache_page(scrapedurl, headers=headers)
        start = html.find('<div class="post-content">')
        end = html.find('</div>', start)
        scrapedplot = html[start:end]
        scrapedplot = re.sub(r'<[^>]*>', '', scrapedplot)

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

        ## ------------------------------------------------
        scrapedthumbnail+= "|" + _headers
        ## ------------------------------------------------

        itemlist.append(
            Item(channel=__channel__,
                 action="findvid",
                 title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
                 url=scrapedurl,
                 viewmode="movie_with_plot",
                 thumbnail=scrapedthumbnail,
                 plot=scrapedplot,
                 folder=True))

    # Extrae el paginador
    patronvideos = "class=previouspostslink' href='([^']+)'>Seguente &rsaquo;"
    matches = re.compile(patronvideos, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)

    if len(matches) > 0:
        scrapedurl = urlparse.urljoin(item.url, matches[0])
        itemlist.append(
            Item(channel=__channel__,
                 action="peliculas",
                 title="[COLOR orange]Successivo >>[/COLOR]",
                 url=scrapedurl,
                 thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png",
                 folder=True))

    return itemlist

Re: Javascript emulator?

Publicado: 25 Ago 2015, 00:07
por zanzibar1982
robalo escribió:Pues parece que también es válido para los thumbnail

función peliculas del archivo itastreaming.py del repositorio de DrZ3r0 https://github.com/Dr-Zer0/pelisalacart ... reaming.py

Código: Seleccionar todo

def peliculas(item):
    logger.info("pelisalacarta.itastreaming peliculas")
    itemlist = []

    # Descarga la pagina
    data = anti_cloudflare(item.url)

    ## ------------------------------------------------
    cookies = ""
    matches = re.compile( '(.itastreaming.co.*?)\n', re.DOTALL ).findall( config.get_cookie_data() )
    for cookie in matches:
        name = cookie.split( '\t' )[5]
        value = cookie.split( '\t' )[6]
        cookies+= name + "=" + value + ";"
    headers.append( ['Cookie',cookies[:-1]] )
    import urllib
    _headers = urllib.urlencode( dict( headers ) )
    ## ------------------------------------------------

    # Extrae las entradas (carpetas)
    patron = '<div class="item">\s*<a href="([^"]+)" title="([^"]+)">\s*<div class="img">\s*<img src="([^"]+)"'
    matches = re.compile(patron, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)

    for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
        scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
        html = scrapertools.cache_page(scrapedurl, headers=headers)
        start = html.find('<div class="post-content">')
        end = html.find('</div>', start)
        scrapedplot = html[start:end]
        scrapedplot = re.sub(r'<[^>]*>', '', scrapedplot)

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

        ## ------------------------------------------------
        scrapedthumbnail+= "|" + _headers
        ## ------------------------------------------------

        itemlist.append(
            Item(channel=__channel__,
                 action="findvid",
                 title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
                 url=scrapedurl,
                 viewmode="movie_with_plot",
                 thumbnail=scrapedthumbnail,
                 plot=scrapedplot,
                 folder=True))

    # Extrae el paginador
    patronvideos = "class=previouspostslink' href='([^']+)'>Seguente &rsaquo;"
    matches = re.compile(patronvideos, re.DOTALL).findall(data)
    scrapertools.printMatches(matches)

    if len(matches) > 0:
        scrapedurl = urlparse.urljoin(item.url, matches[0])
        itemlist.append(
            Item(channel=__channel__,
                 action="peliculas",
                 title="[COLOR orange]Successivo >>[/COLOR]",
                 url=scrapedurl,
                 thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png",
                 folder=True))

    return itemlist

Yep, this definitely works, robalo. :) updating on github now

Don't play too much with your mobile device when driving, I still need you guys alive :D

EDIT:

robalo, for some reasons the channel sketch you posted in first page

works now. Here is how I modified it, could you check why I'm getting

only the first episodes of series?

Código: Seleccionar todo

# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canale per itafilmtv
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
# Info tradotte per aiutare chi volesse cimentarsi 
#------------------------------------------------------------

# Si definiscono le librerie che si useranno per far funzionare il canale
import urlparse,urllib2,urllib,re
import os, sys

from core import scrapertools
from core import logger
from core import config
from core.item import Item
from servers import servertools

# Informazioni sul canale
__channel__ = "itafilmtv"
__category__ = "F,S"
__type__ = "generic"
__title__ = "ITA Film TV"
__language__ = "IT"

# Si definisce la pagina principale del sito su cui si lavora
host = "http://www.itafilm.tv"
# Si definiscono gli headers, richiesti da alcuni siti per accedervi
headers = [
    ['Host','www.itafilm.tv'],
    ['User-Agent','Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0'],
    ['Accept-Encoding','gzip, deflate'],
    ['Cookie','_ddn_intercept_2_=b33473ad0b70b320a9f7546e213a396a']
]

def isGeneric():
    return True
# Struttura del menù principale del canale
def mainlist( item ):
    logger.info( "[itafilmtv.py] mainlist" )

    itemlist = []

    itemlist.append( Item( channel=__channel__, action="film", title="[COLOR azure]Home[/COLOR]", url=host ) )
    itemlist.append( Item( channel=__channel__, action="genere", title="[COLOR azure]Film Per Genere[/COLOR]", url=host ) )
    itemlist.append( Item( channel=__channel__, action="serietv", title="[COLOR azure]Serie TV[/COLOR]", url="http://www.itafilm.tv/telefilm-serie-tv-streaming/" ) )
    itemlist.append( Item( channel=__channel__, action="search", title="[COLOR orange]Cerca...[/COLOR]", url=host ) )

    return itemlist

# Chiamando una funzione "search", il launcher chiede un testo da inserire e lo agiunge come parametro
def search( item, texto ):
    logger.info( "[itafilmtv.py] " + item.url + " search " + texto )

    item.url = "http://www.itafilm.tv/index.php?story="+texto+"&do=search&subaction=search"

    try:
        return film( item )

    # Si aggiunge una eccezione, per non interrompere la ricerca globale se un canale fallisce per qualche motivo
    except:
        import sys
        for line in sys.exc_info():
            logger.error( "%s" % line )
        return []

def film( item ):
    logger.info( "[itafilmtv.py] mainlist" )

    itemlist = []

    # Scarica l'HTML della pagina
    data = scrapertools.cache_page( item.url, headers=headers )

    # Ne estrae i dati
    patron = '<div class="main-news">.*?'
    patron += '<div class="main-news-image"[^<]+'
    patron += '<a href="([^"]+)">'
    patron += '<img src="([^"]+)" '
    patron += 'alt="([^"]+)"'

    matches = re.compile( patron, re.DOTALL ).findall( data )
    # Si definiscono i "matches" individuati nei patron, rispettivamente:
    for scrapedurl, scrapedthumbnail, scrapedtitle in matches:

        scrapedtitle = scrapertools.decodeHtmlentities( scrapedtitle )

        itemlist.append( Item( channel=__channel__, action="trova_video" , title=scrapedtitle, url=scrapedurl, thumbnail=urlparse.urljoin( host, scrapedthumbnail ), fulltitle=scrapedtitle, show=scrapedtitle ) )

    # Si individua l'url per indirizzare alla pagina successiva
    next_page = scrapertools.find_single_match( data, '<span>\d+</span> <a href="([^"]+)">' )
    if next_page != "":
        itemlist.append( Item( channel=__channel__, action="film" , title="[COLOR orange]Successivo >>>[/COLOR]" , url=next_page ) )

    return itemlist

def genere(item):
    logger.info("[itafilmtv.py] genere")
    itemlist = []

    data = scrapertools.cachePage(item.url, headers=headers )
    logger.info("data="+data)

    data = scrapertools.find_single_match(data,'<div class="menu2">(.*?)<div class="left-wrap">')
    logger.info("data="+data)

    patron  = '<a href="(.*?)">(.*?)</a>'
    matches = re.compile(patron,re.DOTALL).findall(data)
    scrapertools.printMatches(matches)

    for scrapedurl,scrapedtitle in matches: 
        itemlist.append( Item(channel=__channel__, action="film", title="[COLOR azure]"+scrapedtitle+"[/COLOR]", url=host+scrapedurl, folder=True))

    return itemlist

def serietv( item ):
    logger.info( "[itafilmtv.py] mainlist" )

    itemlist = []

    # Scarica l'HTML della pagina
    data = scrapertools.cache_page( item.url, headers=headers )

    # Ne estrae i dati
    patron = '<div class="main-news">.*?'
    patron += '<div class="main-news-image"[^<]+'
    patron += '<a href="([^"]+)">'
    patron += '<img src="([^"]+)" '
    patron += 'alt="([^"]+)"'

    matches = re.compile( patron, re.DOTALL ).findall( data )
    # Si definiscono i "matches" individuati nei patron, rispettivamente:
    for scrapedurl, scrapedthumbnail, scrapedtitle in matches:

        scrapedtitle = scrapertools.decodeHtmlentities( scrapedtitle )

        itemlist.append( Item( channel=__channel__, action="trova_ep_serie" , title=scrapedtitle, url=scrapedurl, thumbnail=urlparse.urljoin( host, scrapedthumbnail ), fulltitle=scrapedtitle, show=scrapedtitle ) )

    # Si individua l'url per indirizzare il canale alla pagina successiva del sito
    next_page = scrapertools.find_single_match( data, '<span>\d+</span> <a href="([^"]+)">' )
    if next_page != "":
        itemlist.append( Item( channel=__channel__, action="film" , title="[COLOR orange]Successivo >>>[/COLOR]" , url=next_page ) )

    return itemlist

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

    itemlist = []

    data = scrapertools.cache_page( item.url, headers=headers )

    sources = scrapertools.get_match( data, '(<noindex> <div class="video-player-plugin">.*?</noindex>)')

    patron = 'src="([^"]+)"'

    matches = re.compile( patron, re.DOTALL ).findall( sources )

    for scrapedurl in matches:

        server = scrapedurl.split( '/' )[2].split( '.' )
        if len(server) == 3: server = server[1]
        else: server = server[0]

        title = "[" + server + "] " + item.fulltitle

        itemlist.append( Item( channel=__channel__, action="play" , title=title, url=scrapedurl, thumbnail=item.thumbnail, fulltitle=item.fulltitle, show=item.show, folder=False ) )

    return itemlist

def trova_ep_serie(item):
    logger.info("[itafilmtv.py] trova_ep_serie")

    itemlist = []

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

    patron1 = '<!--colorstart:#009900--><span style="color:#009900">(.+?)<div style="clear: both;height: 1px;"></div>'
    matches1 = re.compile(patron1, re.DOTALL).findall(data)
    for match1 in matches1:
        for data in match1.split('<br/>'):
            ## Extrae las entradas
            scrapedtitle = data.split('<a ')[0]
            scrapedtitle = re.sub(r'<[^>]*>', '', scrapedtitle)
            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

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

    ## Serve soltanto l'url
    data = item.url

    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

Re: Javascript emulator?

Publicado: 25 Ago 2015, 14:27
por DrZ3r0
Thanks Robalo,
I didn't know that was possible to concatenate the headers to the url with '|' character.
Bye

Re: Javascript emulator?

Publicado: 25 Ago 2015, 19:39
por robalo
@DrZ3r0:
You're welcome, it's a pleasure. To Kodi, not always, it is difficult to find the information that suits our needs. :)

@zanzibar:
Te paso algo funcional con lo que, quizás, te marque una línea de trabajo.

'itafilm.tv' tiene separados los enlaces a los servidores audio italiano y los subtitulado. Tienes un ejemplo en la serie 'Scorpion': 1x01:1x22->sub ITA, 1x01:1x13->ITA. Tendrás que ver si te merece la pena arreglarlo para que muestren 'sub ITA' o 'ITA'.

Es posible que el último episodio cause error de script. El motivo es que filtra los enlaces 'ads.ad-center.com'. Son cosas que tendrás que mirar y arreglar.

Código: Seleccionar todo

# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para itafilmtv
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os, sys

from core import scrapertools
from core import logger
from core import config
from core.item import Item
from servers import servertools

__channel__ = "itafilmtv"
__category__ = "F,S"
__type__ = "generic"
__title__ = "ITA Film TV"
__language__ = "IT"

host = "http://www.itafilm.tv"

headers = [
    ['Host','www.itafilm.tv'],
    ['User-Agent','Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0'],
    ['Accept-Encoding','gzip, deflate'],
    ['Cookie','_ddn_intercept_2_=b33473ad0b70b320a9f7546e213a396a']
]

def isGeneric():
    return True

def mainlist( item ):
    logger.info( "[itafilmtv.py] mainlist" )

    itemlist = []

    itemlist.append( Item( channel=__channel__, action="fichas", title="Home", url=host ) )
    itemlist.append( Item( channel=__channel__, action="fichas", title="Serie TV", url=host + "/telefilm-serie-tv-streaming/" ) )
    itemlist.append( Item( channel=__channel__, action="search", title="Buscar...", url=host ) )

    return itemlist

## Al llamarse "search" la función, el launcher pide un texto a buscar y lo añade como parámetro
def search( item, texto ):
    logger.info( "[itafilmtv.py] " + item.url + " search " + texto )

    item.url+= "/?do=search&subaction=search&story=" + texto

    try:
        return fichas( item )

    ## Se captura la excepción, para no interrumpir al buscador global si un canal falla
    except:
        import sys
        for line in sys.exc_info():
            logger.error( "%s" % line )
        return []

def fichas( item ):
    logger.info( "[itafilmtv.py] fichas" )

    itemlist = []

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

    action = "_findvideos"
    if "serie-tv" in item.url: action = "episodios"

    ## Extrae las datos
    patron = '<div class="main-news">.*?'
    patron+= '<div class="main-news-image"[^<]+'
    patron += '<a href="([^"]+)">'
    patron += '<img src="([^"]+)" '
    patron += 'alt="([^"]+)"'

    matches = re.compile( patron, re.DOTALL ).findall( data )

    for scrapedurl, scrapedthumbnail, scrapedtitle in matches:

        scrapedtitle = scrapertools.decodeHtmlentities( scrapedtitle )

        itemlist.append( Item( channel=__channel__, action=action, title=scrapedtitle, url=scrapedurl, thumbnail=urlparse.urljoin( host, scrapedthumbnail ), fulltitle=scrapedtitle, show=scrapedtitle ) )

    ## Paginación
    next_page = scrapertools.find_single_match( data, '<span>\d+</span> <a href="([^"]+)">' )
    if next_page != "":
        itemlist.append( Item( channel=__channel__, action="fichas" , title=">> Página siguiente" , url=next_page ) )

    return itemlist

def episodios( item ):
    logger.info( "[itafilmtv.py] episodios" )

    itemlist = []

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

    plot = scrapertools.htmlclean(
        scrapertools.get_match( data, '<div class="main-news-text main-news-text2">(.*?)</div>' )
    ).strip()

    ## Extrae las datos
    patron = '<br />(\d+x\d+).*?href="//ads.ad-center.com/[^<]+</a>(.*?)<a href="//ads.ad-center.com/[^<]+</a>'

    matches = re.compile( patron, re.DOTALL ).findall( data )

    for scrapedepisode, scrapedurls in matches:

        title = scrapedepisode + " - " + item.show
        scrapedurls = scrapedurls.replace( "playreplay", "moevideo" )

        matches_urls = re.compile( 'href="([^"]+)"', re.DOTALL ).findall( scrapedurls )
        urls = ""
        for url in matches_urls:
            urls+= url + "|"

        itemlist.append( Item( channel=__channel__, action="findvideos", title=title, url=urls[:-1], thumbnail=item.thumbnail, plot=plot, fulltitle=item.fulltitle, show=item.show ) )

    return itemlist

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

    itemlist = []

    ## Extrae las datos
    if "|" not in item.url:
        ## Descarga la página
        data = scrapertools.cache_page( item.url, headers=headers )

        sources = scrapertools.get_match( data, '(<noindex> <div class="video-player-plugin">.*?</noindex>)')

        patron = 'src="([^"]+)"'
        matches = re.compile( patron, re.DOTALL ).findall( sources )
    else:
        matches = item.url.split( '|' )

    for scrapedurl in matches:

        server = scrapedurl.split( '/' )[2].split( '.' )
        if len(server) == 3: server = server[1]
        else: server = server[0]

        title = "[" + server + "] " + item.fulltitle

        itemlist.append( Item( channel=__channel__, action="play" , title=title, url=scrapedurl, thumbnail=item.thumbnail, fulltitle=item.fulltitle, show=item.show, folder=False ) )

    return itemlist

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

    ## Sólo es necesario la url
    data = item.url

    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

Re: Javascript emulator?

Publicado: 26 Ago 2015, 02:39
por zanzibar1982
@zanzibar:
Te paso algo funcional con lo que, quizás, te marque una línea de trabajo.

'itafilm.tv' tiene separados los enlaces a los servidores audio italiano y los subtitulado. Tienes un ejemplo en la serie 'Scorpion': 1x01:1x22->sub ITA, 1x01:1x13->ITA. Tendrás que ver si te merece la pena arreglarlo para que muestren 'sub ITA' o 'ITA'.
TY robalo,

I think they put a fake last episode of tv shows to let people think that on their site they have fresh contents

earlier than any other, so they trick people and get more clicks for that ads service :)

It's going to be fine like that, if it's not possible to have an exception that removes ads link from scraped list.

Re: Javascript emulator?

Publicado: 26 Ago 2015, 08:15
por robalo
Buenos días

He arreglado la función 'episodios' para que no muestre los últimos enlaces que sólo contienen publicidad y añade '(sub ITA)' o '(ITA)' a los enlaces.

Creo que con esto ya puedes personalizar mejor el canal.

Función episodios

Código: Seleccionar todo

def episodios( item ):
    logger.info( "[itafilmtv.py] episodios" )

    itemlist = []

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

    plot = scrapertools.htmlclean(
        scrapertools.get_match( data, '<div class="main-news-text main-news-text2">(.*?)</div>' )
    ).strip()

    ## Extrae las datos - Episodios
    patron = '<br />(\d+x\d+).*?href="//ads.ad-center.com/[^<]+</a>(.*?)<a href="//ads.ad-center.com/[^<]+</a>'
    matches = re.compile( patron, re.DOTALL ).findall( data )

    ## Extrae las datos - sub ITA/ITA
    patron = '<b>.*?STAGIONE.*?(sub|ITA).*?</b>'
    lang = re.compile( patron, re.IGNORECASE ).findall( data )

    lang_index = 0
    for scrapedepisode, scrapedurls in matches:

        if int( scrapertools.get_match( scrapedepisode, '\d+x(\d+)' ) ) == 1:
            lang_title = lang[lang_index]
            if lang_title.lower() == "sub": lang_title+= " ITA"
            lang_index+= 1

        title = scrapedepisode + " - " + item.show + " (" + lang_title + ")"
        scrapedurls = scrapedurls.replace( "playreplay", "moevideo" )

        matches_urls = re.compile( 'href="([^"]+)"', re.DOTALL ).findall( scrapedurls )
        urls = ""
        for url in matches_urls:
            urls+= url + "|"

        if urls != "":
            itemlist.append( Item( channel=__channel__, action="findvideos", title=title, url=urls[:-1], thumbnail=item.thumbnail, plot=plot, fulltitle=item.fulltitle, show=item.show ) )

    return itemlist