From 90e42146efd05f526a65039a7a18aec96579ba93 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Fri, 25 Aug 2017 16:11:54 -0500 Subject: [PATCH 1/2] Update cinetux.py --- plugin.video.alfa/channels/cinetux.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/plugin.video.alfa/channels/cinetux.py b/plugin.video.alfa/channels/cinetux.py index 348cdaf9..7f732c30 100644 --- a/plugin.video.alfa/channels/cinetux.py +++ b/plugin.video.alfa/channels/cinetux.py @@ -314,15 +314,11 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): url = scrapertools.find_single_match(bloque1, patron) if "goo.gl" in url: url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "") - if "www.cinetux.me" in url: - server = scrapertools.find_single_match(url, "player/(.*?)\.") - else: - server = servertools.get_server_from_url(url) - matches.append([url, server, "", language.strip(), t_tipo]) + matches.append([url, "", "", language.strip(), t_tipo]) 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 += '.*?title="([^\.]+)' patron += '.*?src.*?src="[^>]+"?/>([^<]+)' patron += '.*?src="[^>]+"?/>([^<]+)' patron += '.*?/span>([^<]+)' @@ -336,7 +332,7 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): scrapedtipo = match[4] if t_tipo.upper() not in scrapedtipo.upper(): continue - title = " Mirror en " + scrapedserver.split(".")[0] + " (" + scrapedlanguage + ")" + title = " Mirror en %s (" + scrapedlanguage + ")" if len(scrapedcalidad.strip()) > 0: title += " (Calidad " + scrapedcalidad.strip() + ")" @@ -357,6 +353,7 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): title = "Mostrar enlaces filtrados en %s" % ", ".join(filtrados) lista_enlaces.append(item.clone(title=title, action="findvideos", url=item.url, text_color=color3, filtro=True)) + lista_enlaces = servertools.get_servers_itemlist(lista_enlaces, lambda i: i.title % i.server.capitalize()) return lista_enlaces @@ -368,7 +365,6 @@ def play(item): data = httptools.downloadpage(item.url, headers={'Referer': item.extra}).data.replace("\\", "") id = scrapertools.find_single_match(data, 'img src="[^#]+#(.*?)"') item.url = "https://youtube.googleapis.com/embed/?status=ok&hl=es&allow_embed=1&ps=docs&partnerid=30&hd=1&autoplay=0&cc_load_policy=1&showinfo=0&docid=" + id - itemlist = servertools.find_video_items(data=item.url) elif "links" in item.url or "www.cinetux.me" in item.url: data = httptools.downloadpage(item.url).data scrapedurl = scrapertools.find_single_match(data, ' Date: Fri, 25 Aug 2017 16:13:59 -0500 Subject: [PATCH 2/2] Update vidoza.py --- plugin.video.alfa/servers/vidoza.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugin.video.alfa/servers/vidoza.py b/plugin.video.alfa/servers/vidoza.py index 88bca7f8..f3f61036 100755 --- a/plugin.video.alfa/servers/vidoza.py +++ b/plugin.video.alfa/servers/vidoza.py @@ -7,11 +7,10 @@ from platformcode import logger def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) - data = httptools.downloadpage(page_url).data if "Page not found" in data: - return False, "[vidoza] El archivo no existe o ha sido borrado" - elif "Video is processing now" in data: + return False, "[vidoza] El archivo no existe o ha sido borrado" + elif "processing" in data: return False, "[vidoza] El vídeo se está procesando" return True, "" @@ -19,9 +18,7 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("(page_url='%s')" % page_url) - data = httptools.downloadpage(page_url).data - video_urls = [] matches = scrapertools.find_multiple_matches(data, 'file\s*:\s*"([^"]+)"\s*,\s*label:"([^"]+)"') for media_url, calidad in matches: