From ed7f69c48a5747ef17d8d0c7b75917628a228d7f Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 25 Sep 2017 15:05:10 -0500 Subject: [PATCH 1/8] Actualizados --- plugin.video.alfa/channels/cinetux.py | 41 +++++++-------------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/plugin.video.alfa/channels/cinetux.py b/plugin.video.alfa/channels/cinetux.py index adc47772..5418a09b 100644 --- a/plugin.video.alfa/channels/cinetux.py +++ b/plugin.video.alfa/channels/cinetux.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -import urlparse - from core import httptools from core import scrapertools from core import servertools @@ -48,13 +46,11 @@ def mainlist(item): "/0/Genre.png", text_color=color1)) - url = urlparse.urljoin(CHANNEL_HOST, "genero/documental/") itemlist.append(item.clone(title="Documentales", text_bold=True, text_color=color2, action="")) - itemlist.append(item.clone(action="peliculas", title=" Novedades", url=url, text_color=color1, + itemlist.append(item.clone(action="peliculas", title=" Novedades", url=CHANNEL_HOST + "genero/documental/", text_color=color1, thumbnail="https://raw.githubusercontent.com/master-1970/resources/master/images/genres" "/0/Documentaries.png")) - url = urlparse.urljoin(CHANNEL_HOST, "genero/documental/?orderby=title&order=asc&gdsr_order=asc") - itemlist.append(item.clone(action="peliculas", title=" Por orden alfabético", text_color=color1, url=url, + itemlist.append(item.clone(action="peliculas", title=" Por orden alfabético", text_color=color1, url=CHANNEL_HOST + "genero/documental/?orderby=title&order=asc&gdsr_order=asc", thumbnail="https://raw.githubusercontent.com/master-1970/resources/master/images/genres" "/0/A-Z.png")) itemlist.append(item.clone(title="", action="")) @@ -100,7 +96,7 @@ def newest(categoria): itemlist.pop() elif categoria == 'documentales': - item.url = urlparse.urljoin(CHANNEL_HOST, "genero/documental/") + item.url = CHANNEL_HOST + "genero/documental/" item.action = "peliculas" itemlist = peliculas(item) @@ -108,7 +104,7 @@ def newest(categoria): itemlist.pop() elif categoria == 'infantiles': - item.url = urlparse.urljoin(CHANNEL_HOST, "genero/infantil/") + item.url = CHANNEL_HOST + "genero/infantil/" item.action = "peliculas" itemlist = peliculas(item) @@ -130,7 +126,6 @@ def peliculas(item): itemlist = [] item.text_color = color2 - # Descarga la página data = httptools.downloadpage(item.url).data patron = '(?s)class="(?:result-item|item movies)">.*? Date: Mon, 25 Sep 2017 16:12:30 -0500 Subject: [PATCH 2/8] Update cinetux.py --- plugin.video.alfa/channels/cinetux.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugin.video.alfa/channels/cinetux.py b/plugin.video.alfa/channels/cinetux.py index 5418a09b..3ac3cd94 100644 --- a/plugin.video.alfa/channels/cinetux.py +++ b/plugin.video.alfa/channels/cinetux.py @@ -279,7 +279,6 @@ def findvideos(item): else: itemlist.append(item.clone(title="No hay enlaces disponibles", action="", text_color=color3)) - return itemlist @@ -331,12 +330,12 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item): if filtro_idioma == 3 or item.filtro: lista_enlaces.append(item.clone(title=title, action="play", text_color=color2, url=scrapedurl, server=scrapedserver, idioma=scrapedlanguage, - extra=item.url)) + extra=item.url, contentThumbnail = item.thumbnail)) else: idioma = dict_idiomas[language] if idioma == filtro_idioma: lista_enlaces.append(item.clone(title=title, text_color=color2, action="play", url=scrapedurl, - extra=item.url)) + extra=item.url, contentThumbnail = item.thumbnail)) else: if language not in filtrados: filtrados.append(language) From bd84cf2b7c70df6c73cdd0c623740aa61d4e93f1 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 25 Sep 2017 17:35:34 -0500 Subject: [PATCH 3/8] Update flashx.py --- plugin.video.alfa/servers/flashx.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugin.video.alfa/servers/flashx.py b/plugin.video.alfa/servers/flashx.py index 86fac9d8..373a1526 100644 --- a/plugin.video.alfa/servers/flashx.py +++ b/plugin.video.alfa/servers/flashx.py @@ -27,8 +27,6 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("url=" + page_url) - page_url = page_url.replace("playvid-", "") - headers = {'Host': 'www.flashx.tv', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', @@ -60,8 +58,16 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= headers['Content-Type'] = 'application/x-www-form-urlencoded' data = httptools.downloadpage('https://www.flashx.tv/dl?playnow', post, headers, replace_headers=True).data + # Si salta aviso, se carga la pagina de comprobacion y luego la inicial + if "You try to access this video with Kodi" in data: + url_reload = scrapertools.find_single_match(data, 'try to reload the page.*?href="([^"]+)"') + try: + data = httptools.downloadpage(url_reload, cookies=False).data + data = httptools.downloadpage('https://www.flashx.tv/dl?playnow', post, headers, replace_headers=True).data + except: + pass + matches = scrapertools.find_multiple_matches(data, "(eval\(function\(p,a,c,k.*?)\s+") - video_urls = [] for match in matches: try: From c34dbba49c4007f105d2330ad8c636b144a2178e Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 25 Sep 2017 17:36:03 -0500 Subject: [PATCH 4/8] Update flashx.json --- plugin.video.alfa/servers/flashx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/flashx.json b/plugin.video.alfa/servers/flashx.json index af46c3c0..ce0c3633 100644 --- a/plugin.video.alfa/servers/flashx.json +++ b/plugin.video.alfa/servers/flashx.json @@ -19,7 +19,7 @@ "patterns": [ { "pattern": "flashx.(?:tv|pw)/(?:embed.php\\?c=|embed-|playvid-|)([A-z0-9]+)", - "url": "https://www.flashx.tv/playvid-\\1.html" + "url": "https://www.flashx.tv/\\1.html" } ] }, From 0037795ba578e59a316384ddadf8b670d0619b38 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 26 Sep 2017 09:01:54 -0500 Subject: [PATCH 5/8] Update playmax.py --- plugin.video.alfa/channels/playmax.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugin.video.alfa/channels/playmax.py b/plugin.video.alfa/channels/playmax.py index 9b79bc37..b1eed9fc 100644 --- a/plugin.video.alfa/channels/playmax.py +++ b/plugin.video.alfa/channels/playmax.py @@ -302,17 +302,16 @@ def fichas(item): # data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data) fichas_marca = {'1': 'Siguiendo', '2': 'Pendiente', '3': 'Favorita', '4': 'Vista', '5': 'Abandonada'} - patron = '
]*>[^<]*<[^>]+href="\.([^"]+)".*?src-data="\.([^"]+)".*?' \ - '
(?:
([^<]+)
|)([^<]+)
' + patron = '(?s)
]*>[^<]*<[^>]+href="\.([^"]+)".*?' + patron += 'src-data="([^"]+)".*?' + patron += '
Date: Tue, 26 Sep 2017 13:09:32 -0500 Subject: [PATCH 6/8] Update rapidvideo.json --- plugin.video.alfa/servers/rapidvideo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/rapidvideo.json b/plugin.video.alfa/servers/rapidvideo.json index 75ec9156..a462660e 100755 --- a/plugin.video.alfa/servers/rapidvideo.json +++ b/plugin.video.alfa/servers/rapidvideo.json @@ -18,7 +18,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "rapidvideo.(?:org|com)/(?:\\?v=|e/|embed/)([A-z0-9]+)", + "pattern": "rapidvideo.(?:org|com)/(?:\\?v=|e/|embed/|v/)([A-z0-9]+)", "url": "https://www.rapidvideo.com/e/\\1" } ] From 3ac0059ba21b7aa3274f085e243a35f8e669542a Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 26 Sep 2017 14:26:57 -0500 Subject: [PATCH 7/8] Update flashx.py --- plugin.video.alfa/servers/flashx.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin.video.alfa/servers/flashx.py b/plugin.video.alfa/servers/flashx.py index 373a1526..69ad0430 100644 --- a/plugin.video.alfa/servers/flashx.py +++ b/plugin.video.alfa/servers/flashx.py @@ -59,11 +59,13 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= data = httptools.downloadpage('https://www.flashx.tv/dl?playnow', post, headers, replace_headers=True).data # Si salta aviso, se carga la pagina de comprobacion y luego la inicial + # LICENSE GPL3, de alfa-addon: https://github.com/alfa-addon/ ES OBLIGATORIO AÑADIR ESTAS LÍNEAS if "You try to access this video with Kodi" in data: url_reload = scrapertools.find_single_match(data, 'try to reload the page.*?href="([^"]+)"') try: data = httptools.downloadpage(url_reload, cookies=False).data data = httptools.downloadpage('https://www.flashx.tv/dl?playnow', post, headers, replace_headers=True).data + # LICENSE GPL3, de alfa-addon: https://github.com/alfa-addon/ ES OBLIGATORIO AÑADIR ESTAS LÍNEAS except: pass From 085ba6e4187c55dd927ad6ae998a953e9277e3e8 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 26 Sep 2017 15:40:56 -0500 Subject: [PATCH 8/8] Update gnula.py --- plugin.video.alfa/channels/gnula.py | 101 ++++++++++++++++------------ 1 file changed, 58 insertions(+), 43 deletions(-) diff --git a/plugin.video.alfa/channels/gnula.py b/plugin.video.alfa/channels/gnula.py index 0e5d47d1..c9306666 100755 --- a/plugin.video.alfa/channels/gnula.py +++ b/plugin.video.alfa/channels/gnula.py @@ -1,24 +1,24 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- import re -import urlparse +from core import httptools from core import scrapertools from core import servertools from core.item import Item from platformcode import logger +host = "http://gnula.nu/" def mainlist(item): logger.info() itemlist = [] itemlist.append(Item(channel=item.channel, title="Estrenos", action="peliculas", - url="http://gnula.nu/peliculas-online/lista-de-peliculas-online-parte-1/", viewmode="movie")) + url= host +"peliculas-online/lista-de-peliculas-online-parte-1/", viewmode="movie")) itemlist.append( - Item(channel=item.channel, title="Generos", action="generos", url="http://gnula.nu/generos/lista-de-generos/")) + Item(channel=item.channel, title="Generos", action="generos", url= host + "generos/lista-de-generos/")) itemlist.append(Item(channel=item.channel, title="Recomendadas", action="peliculas", - url="http://gnula.nu/peliculas-online/lista-de-peliculas-recomendadas/", viewmode="movie")) - # itemlist.append( Item(channel=item.channel, title="Portada" , action="portada" , url="http://gnula.nu/")) + url= host + "peliculas-online/lista-de-peliculas-recomendadas/", viewmode="movie")) return itemlist @@ -26,23 +26,23 @@ def generos(item): logger.info() itemlist = [] - data = scrapertools.cache_page(item.url) - - # Lista de géneros
+ data = httptools.downloadpage(item.url).data data = scrapertools.find_single_match(data, ']+>Lista de g(.*?)/table') - # Historia antigua [With This Ring
-
[18/07/15 (VS)(VC)(VL)] [HD-R]—–Comedia, Romántica
- ''' - ''' - The Adventures of Tintin
-
(2011) [10/07/15 (VS)(VC)(VL)] [DVD-R]—–Animación, Infantil, Aventuras
- ''' # Descarga la página - data = scrapertools.cachePage(item.url) - patron = '([^<]+)(.*?)
') item.plot = scrapertools.htmlclean(item.plot).strip() item.contentPlot = item.plot + patron = 'Ver película online.*?>.*?>([^<]+)' + scrapedopcion = scrapertools.find_single_match(data, patron) + titulo_opcional = scrapertools.find_single_match(scrapedopcion, ".*?, (.*)").upper() + bloque = scrapertools.find_multiple_matches(data, 'contenedor_tab.*?/table') + cuenta = 0 + for datos in bloque: + cuenta = cuenta + 1 + patron = '(opción %s.*?)' %cuenta + scrapedopcion = scrapertools.find_single_match(data, patron) + titulo_opcion = "(" + scrapertools.find_single_match(scrapedopcion, "op.*?, (.*)").upper() + ")" + if "TRAILER" in titulo_opcion or titulo_opcion == "()": + titulo_opcion = "(" + titulo_opcional + ")" + urls = scrapertools.find_multiple_matches(datos, '(?:src|href)="([^"]+)') + titulo = "Ver en %s " + titulo_opcion + for url in urls: + itemlist.append(Item(channel = item.channel, + action = "play", + contentThumbnail = item.thumbnail, + fulltitle = item.contentTitle, + title = titulo, + url = url + )) + itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize()) + return itemlist - newthumbnail = scrapertools.find_single_match(data, - '