From 89de0194bac19940d8aef82e8ee77787fe654cac Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 8 Sep 2017 17:38:34 -0300 Subject: [PATCH] Ajustes y reparaciones de canales --- plugin.video.alfa/channels/peliculasrey.py | 22 +++--- plugin.video.alfa/channels/pelis24.py | 2 +- plugin.video.alfa/channels/peliscity.py | 42 +++++++---- plugin.video.alfa/channels/peliscon.py | 21 +++--- plugin.video.alfa/channels/pelisgratis.py | 70 ++++++------------ plugin.video.alfa/channels/pelisipad.json | 3 +- plugin.video.alfa/channels/pelisipad.py | 32 ++++---- .../Default/media/Shortcut/button-fo.png | Bin .../skins/Default/media/Shortcut/close.png | Bin .../media/Shortcut/dialog-bg-solid-white.png | Bin .../media/Shortcut/dialog-bg-solid.png | Bin .../skins/Default/media/Shortcut/logo.png | Bin .../skins/Default/media/Shortcut/white.png | Bin .../skins/Default/media/Shortcut/white70.png | Bin 14 files changed, 91 insertions(+), 101 deletions(-) mode change 100644 => 100755 plugin.video.alfa/resources/skins/Default/media/Shortcut/button-fo.png mode change 100644 => 100755 plugin.video.alfa/resources/skins/Default/media/Shortcut/close.png mode change 100644 => 100755 plugin.video.alfa/resources/skins/Default/media/Shortcut/dialog-bg-solid-white.png mode change 100644 => 100755 plugin.video.alfa/resources/skins/Default/media/Shortcut/dialog-bg-solid.png mode change 100644 => 100755 plugin.video.alfa/resources/skins/Default/media/Shortcut/logo.png mode change 100644 => 100755 plugin.video.alfa/resources/skins/Default/media/Shortcut/white.png mode change 100644 => 100755 plugin.video.alfa/resources/skins/Default/media/Shortcut/white70.png diff --git a/plugin.video.alfa/channels/peliculasrey.py b/plugin.video.alfa/channels/peliculasrey.py index 66dbf1e3..6d3dec95 100755 --- a/plugin.video.alfa/channels/peliculasrey.py +++ b/plugin.video.alfa/channels/peliculasrey.py @@ -172,11 +172,11 @@ def findvideos(item): itemlist = [] itemtemp = [] - for scrapedurl, nombre_servidor, idioma, calidad in matches: - idioma = idioma.strip() - calidad = calidad.strip() - if "youapihd" in nombre_servidor.lower(): - nombre_servidor = "gvideo" + for scrapedurl, server_name, language, quality in matches: + language = language.strip() + quality = quality.strip() + if "youapihd" in server_name.lower(): + server_name = "gvideo" if "pelismundo" in scrapedurl: data = httptools.downloadpage(scrapedurl, add_referer = True).data patron = 'sources.*?}],' @@ -193,8 +193,10 @@ def findvideos(item): fulltitle = item.title, server = "directo", thumbnail = item.thumbnail, - title = "Ver en " + nombre_servidor + " (" + idioma + ") (Calidad " + videoitem[0] + ")", - url = videoitem[1] + title = server_name + " (" + language + ") (Calidad " + videoitem[0] + ")", + url = videoitem[1], + language = language, + quality = videoitem[0] )) else: itemlist.append(Item(channel=item.channel, @@ -202,10 +204,12 @@ def findvideos(item): extra = "", fulltitle = item.title, server = "", - title = "Ver en " + nombre_servidor + " (" + idioma + ") (Calidad " + calidad + ")", + title = server_name + " (" + language + ") (Calidad " + quality + ")", thumbnail = item.thumbnail, url = scrapedurl, - folder = False + folder = False, + language = language, + quality = quality )) itemlist = servertools.get_servers_itemlist(itemlist) return itemlist diff --git a/plugin.video.alfa/channels/pelis24.py b/plugin.video.alfa/channels/pelis24.py index 2de77d7b..fb1416ba 100644 --- a/plugin.video.alfa/channels/pelis24.py +++ b/plugin.video.alfa/channels/pelis24.py @@ -150,7 +150,7 @@ def peliculas(item): title = "%s (%s)" % (contentTitle, quality) itemlist.append( Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=thumbnail, - contentQuality=quality, contentTitle=contentTitle, infoLabels = {'year':year})) + quality=quality, contentTitle=contentTitle, infoLabels = {'year':year})) if item.title != 'Versión original': tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) diff --git a/plugin.video.alfa/channels/peliscity.py b/plugin.video.alfa/channels/peliscity.py index 75873f52..dcc1a1c3 100755 --- a/plugin.video.alfa/channels/peliscity.py +++ b/plugin.video.alfa/channels/peliscity.py @@ -77,25 +77,31 @@ def agregadas(item): itemlist = [] data = scrapertools.cache_page(item.url) - logger.info("data=" + data) + data = re.sub(r'\n|\r|\t|\s{2}| |"', "", data) - patron = 'class=\'reflectMe\' src="([^"]+).*?class="infor".*?href="([^"]+).*?

(.*?)<.*?class="sinopsis">(.*?)<' # url + patron = scrapertools.find_multiple_matches (data,'.*?Duración') - matches = re.compile(patron, re.DOTALL).findall(data) + for element in patron: + info = scrapertools.find_single_match(element, + "calidad>(.*?)<.*?ahref=(.*?)>.*?'reflectMe' src=(.*?)\/>.*?

(.*?)" + "<\/h2>.*?sinopsis>(.*?)<\/div>.*?Año:<\/span>(.*?)<\/li>") + quality = info[0] + url = info[1] + thumbnail = info[2] + title = info[3] + plot = info[4] + year = info[5].strip() - for thumbnail, url, title, sinopsis in matches: - url = urlparse.urljoin(item.url, url) - thumbnail = urlparse.urljoin(url, thumbnail) - itemlist.append(Item(channel=item.channel, action="findvideos", title=title + " ", fulltitle=title, url=url, - thumbnail=thumbnail, show=title, plot=sinopsis)) + itemlist.append(Item(channel=item.channel, title=title, url=url, action='findvideos',thumbnail=thumbnail, + plot=plot, + quality=quality, infoLabels={'year':year})) # Paginación try: - patron = 'tima">.*?href="([^"]+)" >.*?href=(.*?) >([^(.*?)') + '
.*?src="(.*?)" alt=.*?href="(.*?)">.*?' + '

(.*?)<\/h4>.*?img\/flags\/(.*?)\.png.*?imdb.*?(.*?)>') - for url, thumb, title, idioma, year in patron: + for thumb, url, title, language, year in patron: titulo = title title = re.sub(r"!|¡", "", title) title = title.replace("Autosia", "Autopsia") title = re.sub(r"’|PRE-Estreno", "'", title) new_item = item.clone(action="findvideos", title="[COLOR aqua]" + titulo + "[/COLOR]", url=url, - fulltitle=title, contentTitle=title, contentType="movie", extra=year, library=True) - new_item.infoLabels['year'] = year + fulltitle=title, contentTitle=title, contentType="movie", extra=year, library=True, + language= language, infoLabels={'year':year}) itemlist.append(new_item) - else: patron = scrapertools.find_multiple_matches(data, - '
([^(.*?)') + '
.*?src="(.*?)" alt=.*?href="(.*?)">.*?' + '

(.*?)<\/h4>.*?(.*?)<') - for url, thumb, title, year in patron: + for thumb, url, title, year in patron: titulo = title.strip() title = re.sub(r"\d+x.*", "", title) new_item = item.clone(action="findtemporadas", title="[COLOR aqua]" + titulo + "[/COLOR]", url=url, thumbnail=thumb, fulltitle=title, contentTitle=title, show=title, - contentType="tvshow", library=True) - new_item.infoLabels['year'] = year + contentType="tvshow", library=True, infoLabels={'year':year}) itemlist.append(new_item) ## Paginación @@ -282,7 +281,6 @@ def findtemporadas(item): check_temp = "yes" data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) - if len(item.extra.split("|")): if len(item.extra.split("|")) >= 4: fanart = item.extra.split("|")[2] @@ -423,6 +421,7 @@ def findvideos(item): new_item.infoLabels['episode'] = item.epi new_item.infoLabels['season'] = item.temp itemlist.append(new_item) + itemlist = servertools.get_servers_itemlist(itemlist) else: title = "[COLOR darkcyan][B]Ver capítulo [/B][/COLOR]" + "[COLOR red][B]" + capitulo + "[/B][/COLOR]" + " " + "[COLOR darkred]" + server + " ( " + idioma + " )" + "[/COLOR]" itemlist.append(Item(channel=item.channel, title=title, url=url, action="play", fanart=fanart, diff --git a/plugin.video.alfa/channels/pelisgratis.py b/plugin.video.alfa/channels/pelisgratis.py index f53df573..c415d561 100755 --- a/plugin.video.alfa/channels/pelisgratis.py +++ b/plugin.video.alfa/channels/pelisgratis.py @@ -6,6 +6,7 @@ from core import httptools from core import scrapertools from core import servertools from core import tmdb +from core import jsontools from core.item import Item from platformcode import config, logger @@ -217,56 +218,29 @@ def findvideos(item): duplicados = [] data = get_source(item.url) - data = data.replace('amp;', '') - data_page = data - - patron = 'class=TPlayerTb id=(.*?)><iframe width="560" height="315" src="(.*?)"' + patron = '
.*?
(.*?)<\/center>' % option) - if language == 'Castellano': - language = 'Español' - if language in audio: - id_audio = audio[language] - else: - id_audio = language - if 'redirect' in video_page or 'yourplayer' in video_page: - data = get_source('http:%s' % video_page) - - patron = 'label:(.*?),.*?file:(.*?)&app.*?}' - matches = re.compile(patron, re.DOTALL).findall(data) - for video_url in matches: - - url = video_url[1] - url = url.replace('\/', '/') - title = item.contentTitle + ' [%s][%s]' % (video_url[0], id_audio) - server = 'directo' - if url not in duplicados: - itemlist.append(item.clone(action='play', - title=title, - url=url, - server=server - )) - duplicados.append(url) - else: - if video_page not in duplicados: - itemlist.extend(servertools.find_video_items(data=video_page)) - duplicados.append(video_page) - - for video_item in itemlist: - if video_item.server != 'directo': - video_item.channel = item.channel - video_item.quality = item.quality - video_item.title = item.contentTitle + ' [%s][%s]' % (video_item.server, id_audio) - - if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': - itemlist.append(item.clone(title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', - url=item.url, - action="add_pelicula_to_library", - extra="findvideos", - contentTitle=item.contentTitle - )) + for opt, urls_page in matches: + language = scrapertools.find_single_match (data,'data-TPlayerNv=%s>Opción .*?' + '<\/strong><\/span>.*?(.*?)<\/span'%opt) + data = httptools.downloadpage(urls_page).data + servers = scrapertools.find_multiple_matches(data,'