diff --git a/plugin.video.alfa/channels/maxipelis24.py b/plugin.video.alfa/channels/maxipelis24.py index 456cd828..525f8f84 100644 --- a/plugin.video.alfa/channels/maxipelis24.py +++ b/plugin.video.alfa/channels/maxipelis24.py @@ -4,6 +4,7 @@ import re import urlparse import urllib +from core import tmdb from core import servertools from core import httptools from core import scrapertools @@ -11,7 +12,7 @@ from core.item import Item from platformcode import config, logger from channelselector import get_thumb -host="http://maxipelis24.com" +host = "http://maxipelis24.com" def mainlist(item): @@ -19,11 +20,11 @@ def mainlist(item): itemlist = [] - itemlist.append(Item(channel=item.channel, title="peliculas", action="movies", url=host, thumbnail=get_thumb('movies', auto=True))) - itemlist.append(Item(channel=item.channel, action="category", title="Año de Estreno", url=host, cat='year', thumbnail=get_thumb('year', auto=True))) - itemlist.append(Item(channel=item.channel, action="category", title="Géneros", url=host, cat='genre', thumbnail=get_thumb('genres', auto=True))) - itemlist.append(Item(channel=item.channel, action="category", title="Calidad", url=host, cat='quality', thumbnail=get_thumb("quality", auto=True))) - itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=host+"?s=", thumbnail=get_thumb("search", auto=True))) + itemlist.append(Item(channel = item.channel, title = "peliculas", action = "movies", url = host, thumbnail = get_thumb('movies', auto = True))) + itemlist.append(Item(channel = item.channel, action = "category", title = "Año de Estreno", url = host, cat = 'year', thumbnail = get_thumb('year', auto = True))) + itemlist.append(Item(channel = item.channel, action = "category", title = "Géneros", url = host, cat = 'genre', thumbnail = get_thumb('genres', auto = True))) + itemlist.append(Item(channel = item.channel, action = "category", title = "Calidad", url = host, cat = 'quality', thumbnail = get_thumb("quality", auto = True))) + itemlist.append(Item(channel = item.channel, title = "Buscar", action = "search", url = host + "?s=", thumbnail = get_thumb("search", auto = True))) return itemlist @@ -51,8 +52,8 @@ def category(item): patron = 'li>([^<]+)<' matches = re.compile(patron, re.DOTALL).findall(data) - for scrapedurl , scrapedtitle in matches: - itemlist.append(Item(channel=item.channel, action='movies', title=scrapedtitle, url=scrapedurl, type='cat', first=0)) + for scrapedurl, scrapedtitle in matches: + itemlist.append(Item(channel = item.channel, action = 'movies', title =scrapedtitle, url = scrapedurl, type = 'cat', first = 0)) return itemlist def movies(item): @@ -70,56 +71,60 @@ def movies(item): matches = re.compile(patron, re.DOTALL).findall(data) for scrapedurl, img, scrapedtitle, ranking, resto, year, quality in matches: + scrapedtitle = re.sub(r'\d{4}|[()]','', scrapedtitle) plot = scrapertools.htmlclean(resto).strip() - title = '%s [COLOR yellow](%s)[/COLOR] [COLOR red][%s][/COLOR]'% (scrapedtitle, ranking, quality) - itemlist.append(Item(channel=item.channel, - title=title, - url=scrapedurl, - action="findvideos", - plot=plot, - thumbnail=img, + title = ' %s [COLOR yellow](%s)[/COLOR] [COLOR red][%s][/COLOR]' % (scrapedtitle, ranking, quality) + itemlist.append(Item(channel = item.channel, + title = title, + url = scrapedurl, + action = "findvideos", + plot = plot, + thumbnail = img, contentTitle = scrapedtitle, contentType = "movie", - quality=quality)) + quality = quality, + infoLabels = {'year': year})) + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb = True) #Paginacion - next_page = '
Siguiente<' - matches = re.compile(next_page, re.DOTALL).findall(data) + matches = re.compile('
Siguiente<', re.DOTALL).findall(data) if matches: url = urlparse.urljoin(item.url, matches[0]) - itemlist.append(Item(channel=item.channel, action = "movies", title = "Página siguiente >>",url = url)) + itemlist.append(Item(channel = item.channel, action = "movies", title = "Página siguiente >>", url = url)) return itemlist def findvideos(item): logger.info() - itemlist=[] + itemlist = [] data = httptools.downloadpage(item.url).data - data = scrapertools.get_match(data, '
(.*?)
') - # Busca los enlaces a los videos listavideos = servertools.findvideos(data) - for video in listavideos: videotitle = scrapertools.unescape(video[0]) url = video[1] server = video[2] - - itemlist.append(Item(channel=item.channel, action="play", server=server, title=videotitle, url=url, - thumbnail=item.thumbnail, plot=item.plot, fulltitle=item.title, folder=False)) - + itemlist.append(Item(channel = item.channel, + action = "play", + server = server, + title = videotitle, + url = url, + thumbnail = item.thumbnail, + plot = item.plot, + contentTitle = item.contentTitle, + infoLabels = item.infoLabels, + folder = False)) # Opción "Añadir esta película a la biblioteca de KODI" if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': - itemlist.append( - Item(channel=item.channel, - title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', - url=item.url, - action="add_pelicula_to_library", - extra="findvideos", - contentTitle=item.contentTitle, - thumbnail=item.thumbnail - )) + itemlist.append(Item(channel = item.channel, + title = '[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', + url = item.url, + action = "add_pelicula_to_library", + extra = "findvideos", + contentTitle = item.contentTitle, + thumbnail = item.thumbnail + )) return itemlist diff --git a/plugin.video.alfa/channels/pelisplanet.json b/plugin.video.alfa/channels/pelisplanet.json index c9621d7a..623a3350 100644 --- a/plugin.video.alfa/channels/pelisplanet.json +++ b/plugin.video.alfa/channels/pelisplanet.json @@ -9,7 +9,6 @@ "banner": "https://raw.githubusercontent.com/Inter95/tvguia/master/thumbnails/pelisplanetbaner.png", "categories": [ "movie", - "tvshow", "direct", "vos" ], diff --git a/plugin.video.alfa/channels/pelisplanet.py b/plugin.video.alfa/channels/pelisplanet.py index 0d76adc7..cb489206 100644 --- a/plugin.video.alfa/channels/pelisplanet.py +++ b/plugin.video.alfa/channels/pelisplanet.py @@ -57,15 +57,15 @@ def mainlist(item): viewcontent='movies', thumbnail=thumbnail % 'generos', viewmode="movie_with_plot", url=host + 'generos/')) - itemlist.append(Item(channel=item.channel, title="Filtrar por Idiomas", + itemlist.append(Item(channel=item.channel, title="[COLOR yellow][Filtrar por Idiomas][/COLOR]", fanart=fanart_host, folder=False, text_color=color3, text_blod=True, thumbnail=thumbnail % 'idiomas')) - itemlist.append(item.clone(title="Castellano", action="peliculas", text_blod=True, + itemlist.append(item.clone(title=" Castellano", action="peliculas", text_blod=True, viewcontent='movies', thumbnail=thumbnail % 'castellano', viewmode="movie_with_plot", url=host + 'idioma/castellano/')) - itemlist.append(item.clone(title="Latino", action="peliculas", text_blod=True, + itemlist.append(item.clone(title=" Latino", action="peliculas", text_blod=True, viewcontent='movies', thumbnail=thumbnail % 'latino', viewmode="movie_with_plot", url=host + 'idioma/latino/')) @@ -173,15 +173,16 @@ def peliculas(item): data = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}| ", "", data) patron_todas = '
(.*?)