From a23a7970d436275cd8f0326ae7dd8161d94afc1c Mon Sep 17 00:00:00 2001 From: Alfa-beto <30815244+Alfa-beto@users.noreply.github.com> Date: Fri, 22 Mar 2019 15:55:28 -0300 Subject: [PATCH] Correcciones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CineCalidad: Corrección por cambio de estructura - InkaPelis: Corrección por cambio de estructura - InkaSerie: Corrección por cambio de estructura - SeriesMetro: Corrección por cambio de estructura --- plugin.video.alfa/channels/autoplay.py | 9 +- plugin.video.alfa/channels/cinecalidad.py | 43 +++- plugin.video.alfa/channels/community.json | 33 +++ plugin.video.alfa/channels/community.py | 299 ++++++++++++++++++++++ plugin.video.alfa/channels/inkapelis.py | 11 +- plugin.video.alfa/channels/inkaseries.py | 18 +- plugin.video.alfa/channels/seriesmetro.py | 5 +- 7 files changed, 386 insertions(+), 32 deletions(-) create mode 100644 plugin.video.alfa/channels/community.json create mode 100644 plugin.video.alfa/channels/community.py diff --git a/plugin.video.alfa/channels/autoplay.py b/plugin.video.alfa/channels/autoplay.py index 79c764b7..bbc142ab 100644 --- a/plugin.video.alfa/channels/autoplay.py +++ b/plugin.video.alfa/channels/autoplay.py @@ -143,7 +143,7 @@ def start(itemlist, item): # 2: Solo servidores # 3: Solo calidades # 4: No ordenar - if (settings_node['custom_servers'] and settings_node['custom_quality']) or get_setting('autoplay'): + if (settings_node['custom_servers'] and settings_node['custom_quality']): priority = settings_node['priority'] # 0: Servidores y calidades o 1: Calidades y servidores elif settings_node['custom_servers']: priority = 2 # Solo servidores @@ -254,7 +254,10 @@ def start(itemlist, item): autoplay_list.sort(key=lambda orden: orden['indice_quality']) # Se prepara el plan b, en caso de estar activo se agregan los elementos no favoritos al final - plan_b = settings_node['plan_b'] + try: + plan_b = settings_node['plan_b'] + except: + plan_b = True text_b = '' if plan_b: autoplay_list.extend(autoplay_b) @@ -321,7 +324,7 @@ def start(itemlist, item): platformtools.play_video(videoitem, autoplay=True) except: pass - + sleep(3) try: if platformtools.is_playing(): PLAYED = True diff --git a/plugin.video.alfa/channels/cinecalidad.py b/plugin.video.alfa/channels/cinecalidad.py index 2c11d1ad..63474b63 100644 --- a/plugin.video.alfa/channels/cinecalidad.py +++ b/plugin.video.alfa/channels/cinecalidad.py @@ -311,6 +311,34 @@ def findvideos(item): 'Mega': '', 'MediaFire': ''} dec_value = scrapertools.find_single_match(data, 'String\.fromCharCode\(parseInt\(str\[i\]\)-(\d+)\)') + + torrent_link = scrapertools.find_single_match(data, 'Últimas Películas Agregadas y Actualizadas", 1)[1] - entradas = scrapertools.find_multiple_matches(data2, '
(.*?)
') else: entradas = scrapertools.find_multiple_matches(data, '
(.*?)
') @@ -381,6 +381,7 @@ def findvideos(item): # Descarga la pagina data = httptools.downloadpage(item.url).data + data = re.sub("\n", "", data) sinopsis = scrapertools.find_single_match(data, '

Sinopsis

.*?>(.*?)

') item.infoLabels["plot"] = scrapertools.htmlclean(sinopsis) # Busca en tmdb si no se ha hecho antes @@ -409,8 +410,8 @@ def findvideos(item): if server == "Ul": server = "Uploaded" title = "%s [%s][%s]" % (server, idioma, calidad) - itemlist.append(Item(channel=item.channel, action="play", title=title, url=url, language=idioma, quality=calidad, - server=server, infoLabels=item.infoLabels)) + itemlist.append(Item(channel=item.channel, action="play", title=title, url=url, language=idioma, + quality=calidad, server=server, infoLabels=item.infoLabels)) patron = 'id="(embed[0-9]*)".*?
(.*?)<.*?src="([^"]+)"' matches = scrapertools.find_multiple_matches(data, patron) @@ -420,8 +421,8 @@ def findvideos(item): title = "Directo" idioma = scrapertools.find_single_match(data, 'href="#%s".*?>([^<]+)<' % id_embed) title = "%s [%s][%s]" % (title.capitalize(), idioma, calidad) - itemlist.append(Item(channel=item.channel, action="play", title=title, url=url, language=idioma, quality=calidad, - server=server)) + itemlist.append(Item(channel=item.channel, action="play", title=title, url=url, language=idioma, + quality=calidad, server=server)) # Requerido para FilterTools itemlist = filtertools.get_links(itemlist, item, list_language) diff --git a/plugin.video.alfa/channels/inkaseries.py b/plugin.video.alfa/channels/inkaseries.py index 3c9613ab..e3438791 100644 --- a/plugin.video.alfa/channels/inkaseries.py +++ b/plugin.video.alfa/channels/inkaseries.py @@ -25,7 +25,7 @@ list_servers = ['openload', 'gamovideo', 'streamplay', 'flashx', 'streamito', 's def get_source(url): logger.info() data = httptools.downloadpage(url).data - data = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", data) + data = re.sub(r'\n|\r|\t| |
|\s{2,}', "", data) return data def mainlist(item): @@ -51,8 +51,8 @@ def list_all(item): itemlist = [] data = get_source(item.url) - data1 = scrapertools.find_single_match(data, '
') - patron = '
') + patron = '') + next_page = scrapertools.find_single_match(data, '
  • ') if next_page != '': itemlist.append(Item(channel=item.channel, action="list_all", title='Siguiente >>>', url=next_page, thumbnail='https://s16.postimg.cc/9okdu7hhx/siguiente.png')) @@ -83,7 +83,7 @@ def seasons(item): data = get_source(item.url) - patron = ' Temporada (\d+) ' + patron = 'Temporada (\d+)' matches = re.compile(patron, re.DOTALL).findall(data) infoLabels = item.infoLabels @@ -118,9 +118,9 @@ def episodesxseason(item): data = get_source(item.url) if item.extra1 != 'library': - patron = '.*?' % item.contentSeasonNumber + patron = '.*?' matches = re.compile(patron, re.DOTALL).findall(data) infoLabels = item.infoLabels @@ -148,7 +148,7 @@ def genres(item): itemlist = [] norep = [] data = get_source(item.url) - patron = ']+)>(.*?).*?>(.*?)' + patron = '([^<]).*?>(.*?)' matches = re.compile(patron, re.DOTALL).findall(data) for scrapedurl, scrapedtitle, cantidad in matches: @@ -167,7 +167,7 @@ def findvideos(item): itemlist = [] data = get_source(item.url) - patron = '.*?(.*?).*?' + patron = '.*?(.*?).*?' matches = re.compile(patron, re.DOTALL).findall(data) for url, language in matches: diff --git a/plugin.video.alfa/channels/seriesmetro.py b/plugin.video.alfa/channels/seriesmetro.py index 34ceb06f..be79f3cf 100644 --- a/plugin.video.alfa/channels/seriesmetro.py +++ b/plugin.video.alfa/channels/seriesmetro.py @@ -29,6 +29,7 @@ def get_source(url): logger.info() data = httptools.downloadpage(url).data data = re.sub(r'\n|\r|\t| |
    |\s{2,}', "", data) + logger.debug(data) return data def mainlist(item): @@ -59,10 +60,10 @@ def list_all(item): itemlist = [] data = get_source(item.url) - patron = '
    .*?data-lazy-src="([^"]+)"' + patron = '
    ([^<]+)' matches = re.compile(patron, re.DOTALL).findall(data) - for scrapedurl, scrapedtitle, scrapedthumbnail in matches: + for scrapedurl, scrapedthumbnail, scrapedtitle in matches: url = scrapedurl scrapedtitle = scrapedtitle.lower().replace('enlace permanente a', '').capitalize() contentSerieName = scrapedtitle