diff --git a/plugin.video.alfa/channels/allpeliculas.py b/plugin.video.alfa/channels/allpeliculas.py index e1ea6e57..6f4ca9e1 100644 --- a/plugin.video.alfa/channels/allpeliculas.py +++ b/plugin.video.alfa/channels/allpeliculas.py @@ -35,12 +35,62 @@ def mainlist(item): url= host + "movies/newmovies?page=1", extra1 = 0)) itemlist.append(item.clone(title="Por genero", action="generos", fanart="http://i.imgur.com/c3HS8kj.png", url= host + "movies/getGanres")) + itemlist.append(item.clone(title="Colecciones", action="colecciones", fanart="http://i.imgur.com/c3HS8kj.png", + url= host)) itemlist.append(item.clone(title="", action="")) itemlist.append(item.clone(title="Buscar...", action="search")) return itemlist +def colecciones(item): + logger.info() + itemlist = [] + + data = httptools.downloadpage(item.url).data + patron = 'href="(/peliculas[^"]+).*?' + patron += 'title_geo">([^<]+).*?' + patron += 'title_eng">([^<]+).*?' + patron += 'src="([^"]+)' + matches = scrapertools.find_multiple_matches(data, patron) + for scrapedurl, scrapedtitle, scrapedcantidad, scrapedthumbnail in matches: + if scrapedtitle == "LGTB" and config.get_setting("adult_mode") == 0: + continue + title = scrapedtitle.capitalize() + " (" + scrapedcantidad + ")" + itemlist.append(Item(channel = item.channel, + action = "listado_colecciones", + thumbnail = host + scrapedthumbnail, + title = title, + url = host + scrapedurl + )) + return itemlist + + +def listado_colecciones(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + data_url = scrapertools.find_single_match(data, "data_url: '([^']+)") + post = "page=1" + data = httptools.downloadpage(host + data_url, post=post).data + patron = 'a href="(/peli[^"]+).*?' + patron += 'src="([^"]+).*?' + patron += 'class="c_fichas_title">([^<]+).*?' + patron += 'Año:.*?href="">([^<]+)' + matches = scrapertools.find_multiple_matches(data, patron) + for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear in matches: + item.infoLabels['year'] = scrapedyear + itemlist.append(item.clone(channel = item.channel, + action = "findvideos", + contentTitle = scrapedtitle, + thumbnail = scrapedthumbnail, + title = scrapedtitle, + url = host + scrapedurl + )) + tmdb.set_infoLabels(itemlist) + return itemlist + + def generos(item): logger.info() itemlist = [] @@ -61,6 +111,9 @@ def findvideos(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data + if "Próximamente" in data: + itemlist.append(Item(channel = item.channel, title = "Próximamente")) + return itemlist patron = 'data-link="([^"]+).*?' patron += '>([^<]+)' matches = scrapertools.find_multiple_matches(data, patron) @@ -137,7 +190,7 @@ def lista(item): def search(item, texto): logger.info() if texto != "": - texto = texto.replace(" ", "+") + texto = texto.replace(" ", "%20") item.url = host + "/movies/search/" + texto item.extra = "busqueda" try: diff --git a/plugin.video.alfa/channels/animeflv_ru.py b/plugin.video.alfa/channels/animeflv_ru.py index e7a0df38..d85b12c0 100755 --- a/plugin.video.alfa/channels/animeflv_ru.py +++ b/plugin.video.alfa/channels/animeflv_ru.py @@ -162,27 +162,20 @@ def novedades_anime(item): def listado(item): logger.info() - data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data) - # logger.debug("datito %s" % data) - url_pagination = scrapertools.find_single_match(data, '
  • .*?
  • [\s]
  • ') - data = scrapertools.find_single_match(data, '
    (.*?)
    (.*?).+?' '
    (.*?)
    .+?class="full">(.*?)

    ', re.DOTALL).findall(data) - itemlist = [] - for thumbnail, url, title, genres, plot in matches: title = clean_title(title) url = urlparse.urljoin(HOST, url) thumbnail = urlparse.urljoin(HOST, thumbnail) - new_item = Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail, fulltitle=title, plot=plot) @@ -192,28 +185,22 @@ def listado(item): else: new_item.show = title new_item.context = renumbertools.context(item) - itemlist.append(new_item) - if url_pagination: url = urlparse.urljoin(HOST, url_pagination) title = ">> Pagina Siguiente" itemlist.append(Item(channel=item.channel, action="listado", title=title, url=url)) - return itemlist def episodios(item): logger.info() itemlist = [] - data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data) - if item.plot == "": item.plot = scrapertools.find_single_match(data, 'Description[^>]+>

    (.*?)

    ') - data = scrapertools.find_single_match(data, '
    (.*?)
    ') matches = re.compile(']+>(.+?)') + patron = '
  • (.*?)') + + patron = '(.*?)') + patron = '
  • \s*([^<]+)\s*') + show = re.sub(r"(?i) Ova| Especiales| \(Pelicula[s]*\)| \(Película[s]*\)| Sub| Español| Peliculas| Audio| Latino", "", show) + + if not item.infoLabels["plot"]: + item.infoLabels["plot"] = scrapertools.find_single_match(data, '
    .*?

    (.*?)

    ') + + bloque = scrapertools.find_single_match(data, 'ul class="lista"(.*?)') + matches = scrapertools.find_multiple_matches(bloque, '
  • .*?

    (.*?)

    ') + + bloque = scrapertools.find_single_match(data, 'ul class="lista"(.*?)') + matches = scrapertools.find_multiple_matches(bloque, '
  • .*?\s*(.*?)(.*?)') + patron = '
  • (.*?)') + patron = '
  • ' + matches = scrapertools.find_multiple_matches(data, patron) + for title, server in matches: + if title == "Vizard": + continue + title = "%s - %s" % (title, item.title) + post = "host=%s&id=%s" % (server, id) + itemlist.append(item.clone(action="play", url="http://server-2-stream.animemovil.com/V2/", title=title, + post=post)) + + downl = scrapertools.find_single_match(data, '
    .*?(.*?)") - titulo = "Peliculas (%s)" % total + titulo = "Peliculas" itemlist.append(item.clone(title=titulo, text_color=color2, action="", text_bold=True)) itemlist.append(item.clone(action="peliculas", title=" Novedades", url=CHANNEL_HOST + "pelicula", thumbnail="https://raw.githubusercontent.com/master-1970/resources/master/images/genres" @@ -283,7 +283,7 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): if type == "descarga": t_tipo = "Descargar" data = data.replace("\n", "") if type == "online": - patron = '(?is)class="playex.*?visualizaciones' + patron = '(?is)class="playex.*?sheader' bloque1 = scrapertools.find_single_match(data, patron) patron = '(?is)#(option-[^"]+).*?png">([^<]+)' match = scrapertools.find_multiple_matches(data, patron) @@ -303,7 +303,7 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): bloque2 = scrapertools.find_single_match(data, '(?s)box_links.*?dt_social_single') bloque2 = bloque2.replace("\t", "").replace("\r", "") patron = '(?s)optn" href="([^"]+)' - patron += '.*?title="([^\.]+)' + patron += '.*?alt="([^\.]+)' patron += '.*?src.*?src="[^>]+"?/>([^<]+)' patron += '.*?src="[^>]+"?/>([^<]+)' patron += '.*?/span>([^<]+)' diff --git a/plugin.video.alfa/channels/estrenosgo.py b/plugin.video.alfa/channels/estrenosgo.py index 58fdddad..c087cc9c 100644 --- a/plugin.video.alfa/channels/estrenosgo.py +++ b/plugin.video.alfa/channels/estrenosgo.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- import re from channelselector import get_thumb @@ -53,8 +53,7 @@ def listado(item): patron += 'Categoria:\s*([^&]+)»\s*([^<]+).*?' patron += '
    (.*?)
    ' - matches = re.compile(patron, re.DOTALL).findall(data) - + matches = scrapertools.find_multiple_matches(data, patron) for thumbnail, title, cat_padres, cat_hijos, opciones in matches: # logger.debug(thumbnail + "\n" + title + "\n" + cat_padres + "\n" + cat_hijos + "\n" + opciones) # Obtenemos el año del titulo y eliminamos lo q sobre @@ -70,7 +69,7 @@ def listado(item): thumbnail = HOST + thumbnail[:-5] + 'b' + thumbnail[-4:] # Buscamos opcion de ver online - patron = '
    (eval\(function\(p,a,c,k,e,d.*?)