From 5a2d65bfbfab8fda1fd999219a9447a0294e1004 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Fri, 4 Aug 2017 09:20:46 -0500 Subject: [PATCH 01/26] vidlox: Nuevo server Nuevo server --- plugin.video.alfa/servers/vidlox.json | 49 +++++++++++++++++++++++++++ plugin.video.alfa/servers/vidlox.py | 32 +++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 plugin.video.alfa/servers/vidlox.json create mode 100644 plugin.video.alfa/servers/vidlox.py diff --git a/plugin.video.alfa/servers/vidlox.json b/plugin.video.alfa/servers/vidlox.json new file mode 100644 index 00000000..5f4fbcc7 --- /dev/null +++ b/plugin.video.alfa/servers/vidlox.json @@ -0,0 +1,49 @@ +{ + "active": true, + "changes": [ + { + "date": "03/08/2017", + "description": "Versión inicial" + } + ], + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "https://vidlox.tv/embed-.*?.html", + "url": "\\1" + } + ] + }, + "free": true, + "id": "vidlox", + "name": "vidlox", + "settings": [ + { + "default": false, + "enabled": true, + "id": "black_list", + "label": "Incluir en lista negra", + "type": "bool", + "visible": true + }, + { + "default": 0, + "enabled": true, + "id": "favorites_servers_list", + "label": "Incluir en lista de favoritos", + "lvalues": [ + "No", + "1", + "2", + "3", + "4", + "5" + ], + "type": "list", + "visible": false + } + ], + "thumbnail": "https://s1.postimg.org/wathgtvin/logo-vidlox1.png", + "version": 1 +} \ No newline at end of file diff --git a/plugin.video.alfa/servers/vidlox.py b/plugin.video.alfa/servers/vidlox.py new file mode 100644 index 00000000..087abcc2 --- /dev/null +++ b/plugin.video.alfa/servers/vidlox.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Alfa addon - KODI Plugin +# Conector para vidlox +# https://github.com/alfa-addon +# ------------------------------------------------------------ + +from core import httptools +from core import logger +from core import scrapertools + + +def test_video_exists(page_url): + logger.info("(page_url='%s')" % page_url) + data = httptools.downloadpage(page_url).data + if "borrado" in data: + return False, "[vidlox] El fichero ha sido borrado" + + return True, "" + + +def get_video_url(page_url, user="", password="", video_password=""): + logger.info("(page_url='%s')" % page_url) + video_urls = [] + data = httptools.downloadpage(page_url).data + bloque = scrapertools.find_single_match(data, 'sources:.\[.*?]') + matches = scrapertools.find_multiple_matches(bloque, '(http.*?)"') + for videourl in matches: + extension = extension = scrapertools.get_filename_from_url(videourl)[-4:] + video_urls.append(["%s [vidlox]" %extension, videourl]) + + return video_urls From 4a41c6a528c0e53c44b3a35f31b5983e60323209 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Fri, 4 Aug 2017 09:23:19 -0500 Subject: [PATCH 02/26] Update cinetux.py --- plugin.video.alfa/channels/cinetux.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugin.video.alfa/channels/cinetux.py b/plugin.video.alfa/channels/cinetux.py index afe793c5..be54cd12 100644 --- a/plugin.video.alfa/channels/cinetux.py +++ b/plugin.video.alfa/channels/cinetux.py @@ -372,13 +372,10 @@ def play(item): 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, 4 Aug 2017 12:09:32 -0500 Subject: [PATCH 03/26] put in order the episodes starting from 1x01 in matches[::-1]: set episodes in order --- plugin.video.alfa/channels/metaserie.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/metaserie.py b/plugin.video.alfa/channels/metaserie.py index 8008c81b..192266cf 100644 --- a/plugin.video.alfa/channels/metaserie.py +++ b/plugin.video.alfa/channels/metaserie.py @@ -174,7 +174,7 @@ def episodiosxtemp(item): patron = '

([^<]+).*?td>' matches = re.compile(patron, re.DOTALL).findall(data) - for scrapedurl, scrapedtitle in matches: + for scrapedurl, scrapedtitle in matches[::-1]: url = scrapedurl contentEpisodeNumber = re.findall(r'.*?x([^\/]+)\/', url) title = scrapedtitle From 8ff6aecba4ca35a3c02b313a9fea16becfe05778 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Fri, 4 Aug 2017 12:31:12 -0500 Subject: [PATCH 04/26] Update vidlox.json --- plugin.video.alfa/servers/vidlox.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/servers/vidlox.json b/plugin.video.alfa/servers/vidlox.json index 5f4fbcc7..f3d1e845 100644 --- a/plugin.video.alfa/servers/vidlox.json +++ b/plugin.video.alfa/servers/vidlox.json @@ -10,7 +10,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "https://vidlox.tv/embed-.*?.html", + "pattern": "(https://vidlox.tv/embed-.*?.html)", "url": "\\1" } ] @@ -46,4 +46,4 @@ ], "thumbnail": "https://s1.postimg.org/wathgtvin/logo-vidlox1.png", "version": 1 -} \ No newline at end of file +} From c331a224d30ea5f92a96ca07b90d33397cb38181 Mon Sep 17 00:00:00 2001 From: j2331223 Date: Fri, 4 Aug 2017 23:06:43 +0200 Subject: [PATCH 05/26] =?UTF-8?q?Fix=20PlayMax:=20B=C3=BAsqueda=20y=20epis?= =?UTF-8?q?odios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.video.alfa/channels/playmax.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/channels/playmax.py b/plugin.video.alfa/channels/playmax.py index 0deb6df6..5fa6c834 100644 --- a/plugin.video.alfa/channels/playmax.py +++ b/plugin.video.alfa/channels/playmax.py @@ -142,6 +142,7 @@ def busqueda(item): data = xml2dict(data) for f in data["Data"]["Fichas"]["Ficha"]: + f["Title"] = f["Title"].replace("", "") title = "%s (%s)" % (f["Title"], f["Year"]) infolab = {'year': f["Year"]} thumbnail = f["Poster"] @@ -299,7 +300,7 @@ 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 = '
(?:
([^<]+)
|)([^<]+)
' matches = scrapertools.find_multiple_matches(data, patron) @@ -776,7 +777,7 @@ def acciones_cuenta(item): for category, contenido in matches: itemlist.append(item.clone(action="", title=category, text_color=color3)) - patron = '
.*?href="\.([^"]+)".*?src="\.([^"]+)".*?serie="([^"]*)".*?' \ + patron = '
]*>[^<]*<[^>]+href="\.([^"]+)".*?src="\.([^"]+)".*?serie="([^"]*)".*?' \ '
(?:
([^<]+)
|)([^<]+)
' entradas = scrapertools.find_multiple_matches(contenido, patron) for scrapedurl, scrapedthumbnail, serie, episodio, scrapedtitle in entradas: From a590f29f1cfe622c8efe7222fe7f623f495ab62e Mon Sep 17 00:00:00 2001 From: j2331223 Date: Fri, 4 Aug 2017 23:16:47 +0200 Subject: [PATCH 06/26] Recover -data --- plugin.video.alfa/channels/playmax.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/channels/playmax.py b/plugin.video.alfa/channels/playmax.py index 5fa6c834..6b705e94 100644 --- a/plugin.video.alfa/channels/playmax.py +++ b/plugin.video.alfa/channels/playmax.py @@ -300,7 +300,7 @@ 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="\.([^"]+)".*?' \ + patron = '
]*>[^<]*<[^>]+href="\.([^"]+)".*?src-data="\.([^"]+)".*?' \ '
(?:
([^<]+)
|)([^<]+)
' matches = scrapertools.find_multiple_matches(data, patron) @@ -984,4 +984,4 @@ def xml2dict(xmldata): return_dict[tag] = value - return return_dict \ No newline at end of file + return return_dict From b9abd375af854fd40aa9b640ac3af7297d88beb1 Mon Sep 17 00:00:00 2001 From: alfa-addon Date: Fri, 4 Aug 2017 19:56:54 -0400 Subject: [PATCH 07/26] no mostraba 1 unico resultado --- plugin.video.alfa/channels/playmax.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/plugin.video.alfa/channels/playmax.py b/plugin.video.alfa/channels/playmax.py index 6b705e94..b1416ca8 100644 --- a/plugin.video.alfa/channels/playmax.py +++ b/plugin.video.alfa/channels/playmax.py @@ -4,7 +4,6 @@ import re from core import config from core import httptools -from core import jsontools as json from core import logger from core import scrapertools from core import tmdb @@ -124,6 +123,7 @@ def mainlist(item): def search(item, texto): logger.info() + texto = texto.replace(" ", "%20") item.url = "%s/buscar.php?apikey=%s&sid=%s&buscar=%s&modo=[fichas]&start=0" % (host, apikey, sid, texto) try: return busqueda(item) @@ -140,8 +140,12 @@ def busqueda(item): data = httptools.downloadpage(item.url).data data = xml2dict(data) + if type(data["Data"]["Fichas"]["Ficha"]) == dict: + searched_data = [data["Data"]["Fichas"]["Ficha"]] + else: + searched_data = data["Data"]["Fichas"]["Ficha"] - for f in data["Data"]["Fichas"]["Ficha"]: + for f in searched_data: f["Title"] = f["Title"].replace("", "") title = "%s (%s)" % (f["Title"], f["Year"]) infolab = {'year': f["Year"]} @@ -158,14 +162,13 @@ def busqueda(item): else: tipo = "movie" show = "" - itemlist.append(Item(channel=item.channel, action=action, title=title, url=url, text_color=color2, contentTitle=f["Title"], show=show, contentType=tipo, infoLabels=infolab, thumbnail=thumbnail)) if __modo_grafico__: tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__) - + # total = int(data.get("Data", {}).get("totalResultsFichas"), "0") total = int(data["Data"]["totalResultsFichas"]) actualpage = int(scrapertools.find_single_match(item.url, "start=(\d+)")) if actualpage + 20 < total: @@ -220,7 +223,7 @@ def newest(categoria): except: import sys for line in sys.exc_info(): - logger.error("{0}".format(line)) + logger.error("%s" %line) return [] return itemlist @@ -941,17 +944,9 @@ def xml2dict(xmldata): Un diccionario construido a partir de los campos del XML. """ - from core import filetools import sys parse = globals().get(sys._getframe().f_code.co_name) - # if xmldata is None and file is None: - # raise Exception("No hay nada que convertir!") - # elif xmldata is None: - # if not filetools.exists(file): - # raise Exception("El archivo no existe!") - # xmldata = open(file, "rb").read() - matches = re.compile("<(?P[^>]+)>[\n]*[\s]*[\t]*(?P.*?)[\n]*[\s]*[\t]*<\/(?P=tag)\s*>", re.DOTALL).findall(xmldata) From 38085f9acb615ce698025e0c51c407f0f54bd4f5 Mon Sep 17 00:00:00 2001 From: alfa-addon Date: Fri, 4 Aug 2017 20:05:47 -0400 Subject: [PATCH 08/26] fix mostrar 1 solo resultado --- plugin.video.alfa/channels/playmax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/playmax.py b/plugin.video.alfa/channels/playmax.py index b1416ca8..64c6e5db 100644 --- a/plugin.video.alfa/channels/playmax.py +++ b/plugin.video.alfa/channels/playmax.py @@ -168,7 +168,7 @@ def busqueda(item): if __modo_grafico__: tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__) - # total = int(data.get("Data", {}).get("totalResultsFichas"), "0") + total = int(data["Data"]["totalResultsFichas"]) actualpage = int(scrapertools.find_single_match(item.url, "start=(\d+)")) if actualpage + 20 < total: From f41b73d0514492e6f6a70681bba33d26415bfd04 Mon Sep 17 00:00:00 2001 From: alfa-addon Date: Fri, 4 Aug 2017 20:06:51 -0400 Subject: [PATCH 09/26] fixes menores --- plugin.video.alfa/channels/anitoonstv.py | 3 +-- plugin.video.alfa/channels/cartoonlatino.py | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) mode change 100755 => 100644 plugin.video.alfa/channels/anitoonstv.py mode change 100755 => 100644 plugin.video.alfa/channels/cartoonlatino.py diff --git a/plugin.video.alfa/channels/anitoonstv.py b/plugin.video.alfa/channels/anitoonstv.py old mode 100755 new mode 100644 index 3fbfdd73..b13ea9f4 --- a/plugin.video.alfa/channels/anitoonstv.py +++ b/plugin.video.alfa/channels/anitoonstv.py @@ -3,7 +3,6 @@ import re from channels import renumbertools -from channelselector import get_thumb from core import config from core import httptools from core import logger @@ -17,7 +16,7 @@ host = "http://www.anitoonstv.com" def mainlist(item): logger.info() - thumb_series = get_thumb("thumb_channels_tvshow.png") + thumb_series = config.get_thumb("thumb_channels_tvshow.png") itemlist = list() diff --git a/plugin.video.alfa/channels/cartoonlatino.py b/plugin.video.alfa/channels/cartoonlatino.py old mode 100755 new mode 100644 index 4f28dd32..8731a83a --- a/plugin.video.alfa/channels/cartoonlatino.py +++ b/plugin.video.alfa/channels/cartoonlatino.py @@ -3,7 +3,6 @@ import re from channels import renumbertools -from channelselector import get_thumb from core import config from core import httptools from core import logger @@ -18,8 +17,8 @@ host = "http://www.cartoon-latino.com/" def mainlist(item): logger.info() - thumb_series = get_thumb("thumb_channels_tvshow.png") - thumb_series_az = get_thumb("thumb_channels_tvshow_az.png") + thumb_series = config.get_thumb("thumb_channels_tvshow.png") + thumb_series_az = config.get_thumb("thumb_channels_tvshow_az.png") itemlist = list() From b6714e7f7a6d438d5fc06fa5745db890083adf2a Mon Sep 17 00:00:00 2001 From: alfa-addon Date: Fri, 4 Aug 2017 20:10:31 -0400 Subject: [PATCH 10/26] =?UTF-8?q?fix=20secci=C3=B3n=20de=20series?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.video.alfa/channels/allpeliculas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 plugin.video.alfa/channels/allpeliculas.py diff --git a/plugin.video.alfa/channels/allpeliculas.py b/plugin.video.alfa/channels/allpeliculas.py old mode 100755 new mode 100644 index 3dd0fff2..71c40b70 --- a/plugin.video.alfa/channels/allpeliculas.py +++ b/plugin.video.alfa/channels/allpeliculas.py @@ -402,7 +402,7 @@ def findvideostv(item): idioma = IDIOMAS.get(idiomas_videos.get(language)) titulo = "%s [" + idioma + "] (" + calidad_videos.get(quality) + ")" - itemlist.append(item.clone(action="play", title=titulo, url=url, contentType="episode", server=server)) + itemlist.append(item.clone(action="play", title=titulo, url=url, contentType="episode")) # Enlace Descarga patron = ' Date: Sat, 5 Aug 2017 08:59:07 -0500 Subject: [PATCH 12/26] Update fastplay.py --- plugin.video.alfa/servers/fastplay.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin.video.alfa/servers/fastplay.py b/plugin.video.alfa/servers/fastplay.py index 709b9fa6..d01bc6fc 100755 --- a/plugin.video.alfa/servers/fastplay.py +++ b/plugin.video.alfa/servers/fastplay.py @@ -12,9 +12,8 @@ def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) data = httptools.downloadpage(page_url).data - if "Object not found" in data: + if "Object not found" in data or "longer exists on our servers" in data: return False, "[Fastplay] El archivo no existe o ha sido borrado" - return True, "" From 34c35d4472a5c6935e3fa4f9b3bad23ab6045f07 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Sat, 5 Aug 2017 09:59:11 -0500 Subject: [PATCH 13/26] allcalidad: actualizado actualizado --- plugin.video.alfa/channels/allcalidad.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/channels/allcalidad.py b/plugin.video.alfa/channels/allcalidad.py index fa8ca804..8875adbb 100755 --- a/plugin.video.alfa/channels/allcalidad.py +++ b/plugin.video.alfa/channels/allcalidad.py @@ -116,7 +116,7 @@ def findvideos(item): data = httptools.downloadpage(item.url).data patron = '(?s)fmi(.*?)thead' bloque = scrapertools.find_single_match(data, patron) - match = scrapertools.find_multiple_matches(bloque, '(?is)iframe .*?src="([^"]+)') + match = scrapertools.find_multiple_matches(bloque, '(?is)(?:iframe|script) .*?src="([^"]+)') for url in match: server = servertools.get_server_from_url(url) titulo = "Ver en: " + server @@ -139,7 +139,7 @@ def findvideos(item): itemlist.append(Item(channel = item.channel)) itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="", text_color="magenta")) - # Opción "Añadir esta película a la biblioteca de XBMC" + # Opción "Añadir esta película a la biblioteca de KODI" if item.extra != "library": if config.get_videolibrary_support(): itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green", From caab79bb554da524a0c3841ff692d1ff668fdb20 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Sat, 5 Aug 2017 12:52:51 -0500 Subject: [PATCH 14/26] Update allcalidad.json --- plugin.video.alfa/channels/allcalidad.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/channels/allcalidad.json b/plugin.video.alfa/channels/allcalidad.json index 0804f221..30a42828 100755 --- a/plugin.video.alfa/channels/allcalidad.json +++ b/plugin.video.alfa/channels/allcalidad.json @@ -5,7 +5,7 @@ "adult": false, "language": "es", "thumbnail": "https://s22.postimg.org/irnlwuizh/allcalidad1.png", - "bannermenu": "https://s22.postimg.org/9y1athlep/allcalidad2.png", + "banner": "https://s22.postimg.org/9y1athlep/allcalidad2.png", "version": 1, "changes": [ { @@ -43,4 +43,4 @@ "visible": true } ] -} \ No newline at end of file +} From 01debb3c5c2f65409a34f9f8e759a257358328a4 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Sat, 5 Aug 2017 12:53:29 -0500 Subject: [PATCH 15/26] Update vernovelasonline.json --- plugin.video.alfa/channels/vernovelasonline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/vernovelasonline.json b/plugin.video.alfa/channels/vernovelasonline.json index 72c26165..617a9a61 100644 --- a/plugin.video.alfa/channels/vernovelasonline.json +++ b/plugin.video.alfa/channels/vernovelasonline.json @@ -5,7 +5,7 @@ "adult": false, "language": "es", "thumbnail": "https://s16.postimg.org/g4lzydrmd/vernovelasonline1.png", - "bannermenu": "https://s16.postimg.org/w44nhxno5/vernovelasonline2.png", + "banner": "https://s16.postimg.org/w44nhxno5/vernovelasonline2.png", "version": 1, "changes": [ { From 919bc52d0fefc9863d1834a7e9b62eb647a223bf Mon Sep 17 00:00:00 2001 From: j2331223 Date: Sat, 5 Aug 2017 23:07:45 +0200 Subject: [PATCH 16/26] Mergeado de pelisalacarta-ce el fix de la videoteca --- .../platformcode/xbmc_videolibrary.py | 36 ++++++++----------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/plugin.video.alfa/platformcode/xbmc_videolibrary.py b/plugin.video.alfa/platformcode/xbmc_videolibrary.py index 8bef182c..14abdbdf 100755 --- a/plugin.video.alfa/platformcode/xbmc_videolibrary.py +++ b/plugin.video.alfa/platformcode/xbmc_videolibrary.py @@ -375,31 +375,20 @@ def update(folder_content=config.get_setting("folder_tvshows"), folder=""): """ logger.info(folder) - if not folder: - # Actualizar toda la coleccion - while xbmc.getCondVisibility('Library.IsScanningVideo()'): - xbmc.sleep(500) - xbmc.executebuiltin('UpdateLibrary(video)') - - else: - # Actualizar una sola carpeta en un hilo independiente - - def update_multi_threads(update_path, lock): - lock.acquire() - # logger.debug("%s\nINICIO" % update_path) - payload = {"jsonrpc": "2.0", - "method": "VideoLibrary.Scan", - "params": {"directory": update_path}, "id": 1} - - data = get_data(payload) - lock.release() - # logger.debug("%s\nFIN data: %s" % (update_path, data)) + payload = { + "jsonrpc": "2.0", + "method": "VideoLibrary.Scan", + "id": 1 + } + if folder: videolibrarypath = config.get_videolibrary_config_path() if folder.endswith('/') or folder.endswith('\\'): folder = folder[:-1] + update_path = None + if videolibrarypath.startswith("special:"): if videolibrarypath.endswith('/'): videolibrarypath = videolibrarypath[:-1] @@ -407,9 +396,12 @@ def update(folder_content=config.get_setting("folder_tvshows"), folder=""): else: update_path = filetools.join(videolibrarypath, folder_content, folder) + "/" - t = threading.Thread(target=update_multi_threads, args=[update_path, threading.Lock()]) - t.setDaemon(True) - t.start() + payload["params"] = {"directory": update_path} + + while xbmc.getCondVisibility('Library.IsScanningVideo()'): + xbmc.sleep(500) + + data = get_data(payload) def clean(mostrar_dialogo=False): From c68371bdb5a108220e644b2f0f5c60b825b1a44d Mon Sep 17 00:00:00 2001 From: j2331223 Date: Sun, 6 Aug 2017 01:03:46 +0200 Subject: [PATCH 17/26] =?UTF-8?q?Arreglada=20la=20actualizaci=C3=B3n=20de?= =?UTF-8?q?=20la=20videolibrary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.video.alfa/core/channeltools.py | 4 ++++ plugin.video.alfa/videolibrary_service.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/core/channeltools.py b/plugin.video.alfa/core/channeltools.py index e59dd7b8..0158abdb 100755 --- a/plugin.video.alfa/core/channeltools.py +++ b/plugin.video.alfa/core/channeltools.py @@ -18,6 +18,10 @@ def is_adult(channel_name): channel_parameters = get_channel_parameters(channel_name) return channel_parameters["adult"] +def is_active(channel_name): + logger.info("channel_name=" + channel_name) + channel_parameters = get_channel_parameters(channel_name) + return channel_parameters["active"] def get_channel_parameters(channel_name): global dict_channels_parameters diff --git a/plugin.video.alfa/videolibrary_service.py b/plugin.video.alfa/videolibrary_service.py index 51344bf9..8c3c457a 100644 --- a/plugin.video.alfa/videolibrary_service.py +++ b/plugin.video.alfa/videolibrary_service.py @@ -11,6 +11,7 @@ import threading from core import config from core import filetools from core import logger +from core import channeltools from core import videolibrarytools from platformcode import platformtools @@ -24,7 +25,7 @@ def update(path, p_dialog, i, t, serie, overwrite): serie.channel = channel serie.url = url - channel_active = config.get_setting("active", channel=channel, default=False) + channel_active = channeltools.is_active(channel) if channel_active: From 59e47d204cb97fc3e0cc7ed000b521c1e198d996 Mon Sep 17 00:00:00 2001 From: j2331223 Date: Sun, 6 Aug 2017 01:25:06 +0200 Subject: [PATCH 18/26] Limpiar episodios de seriesblanco --- plugin.video.alfa/channels/seriesblanco.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.video.alfa/channels/seriesblanco.py b/plugin.video.alfa/channels/seriesblanco.py index be468499..ff6b1a2f 100644 --- a/plugin.video.alfa/channels/seriesblanco.py +++ b/plugin.video.alfa/channels/seriesblanco.py @@ -190,6 +190,7 @@ def episodios(item): episodes = re.findall("[^'\"]+).+?>(?P.+?)</a>.*?<td>(?P<flags>.*?)</td>", data, re.MULTILINE | re.DOTALL) for url, title, flags in episodes: + title = title.replace("<span itemprop='episodeNumber'>", "").replace("</span>", "") idiomas = " ".join(["[%s]" % IDIOMAS.get(language, "OVOS") for language in re.findall("banderas/([^\.]+)", flags, re.MULTILINE)]) filter_lang = idiomas.replace("[", "").replace("]", "").split(" ") From 5c4b5869a659938fe8f0b7d770e9893ba9ffcc0f Mon Sep 17 00:00:00 2001 From: j2331223 <j2331223@mvrht.net> Date: Sun, 6 Aug 2017 09:50:12 +0200 Subject: [PATCH 19/26] =?UTF-8?q?is=5Factive=20tien=20een=20cuenta=20la=20?= =?UTF-8?q?configuraci=C3=B3n=20del=20canal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Da preferencia al setting general --- plugin.video.alfa/core/channeltools.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin.video.alfa/core/channeltools.py b/plugin.video.alfa/core/channeltools.py index 0158abdb..2c78040b 100755 --- a/plugin.video.alfa/core/channeltools.py +++ b/plugin.video.alfa/core/channeltools.py @@ -20,8 +20,7 @@ def is_adult(channel_name): def is_active(channel_name): logger.info("channel_name=" + channel_name) - channel_parameters = get_channel_parameters(channel_name) - return channel_parameters["active"] + return get_channel_parameters(channel_name)["active"] and get_channel_setting("enabled", channel = channel_name, default = True) def get_channel_parameters(channel_name): global dict_channels_parameters From b86d39ae659829c614ebad239bc5a9ff64173673 Mon Sep 17 00:00:00 2001 From: j2331223 <j2331223@mvrht.net> Date: Sun, 6 Aug 2017 13:10:28 +0200 Subject: [PATCH 20/26] Rename "is_active" method to "is_enabled" --- plugin.video.alfa/core/channeltools.py | 2 +- plugin.video.alfa/videolibrary_service.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.video.alfa/core/channeltools.py b/plugin.video.alfa/core/channeltools.py index 2c78040b..e2c70a8f 100755 --- a/plugin.video.alfa/core/channeltools.py +++ b/plugin.video.alfa/core/channeltools.py @@ -18,7 +18,7 @@ def is_adult(channel_name): channel_parameters = get_channel_parameters(channel_name) return channel_parameters["adult"] -def is_active(channel_name): +def is_enabled(channel_name): logger.info("channel_name=" + channel_name) return get_channel_parameters(channel_name)["active"] and get_channel_setting("enabled", channel = channel_name, default = True) diff --git a/plugin.video.alfa/videolibrary_service.py b/plugin.video.alfa/videolibrary_service.py index 8c3c457a..dcb57459 100644 --- a/plugin.video.alfa/videolibrary_service.py +++ b/plugin.video.alfa/videolibrary_service.py @@ -25,9 +25,9 @@ def update(path, p_dialog, i, t, serie, overwrite): serie.channel = channel serie.url = url - channel_active = channeltools.is_active(channel) + channel_enabled = channeltools.is_enabled(channel) - if channel_active: + if channel_enabled: heading = 'Actualizando videoteca....' p_dialog.update(int(math.ceil((i + 1) * t)), heading, "%s: %s" % (serie.contentSerieName, From 653313f7acc6c5b65ac066456675b622bba37706 Mon Sep 17 00:00:00 2001 From: Intel1 <luisriverap@hotmail.com> Date: Sun, 6 Aug 2017 09:57:38 -0500 Subject: [PATCH 21/26] vimeo: Cambio de estructura Cambio de estructura --- plugin.video.alfa/servers/vimeo.py | 32 +++++++++++------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/plugin.video.alfa/servers/vimeo.py b/plugin.video.alfa/servers/vimeo.py index 857f18ac..ead9058f 100755 --- a/plugin.video.alfa/servers/vimeo.py +++ b/plugin.video.alfa/servers/vimeo.py @@ -2,39 +2,31 @@ import re -from core import jsontools from core import logger from core import scrapertools +from core import httptools - -# Returns an array of possible video url's from the page_url def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("(page_url='%s')" % page_url) - + video_urls = [] headers = [['User-Agent', 'Mozilla/5.0']] if "|" in page_url: page_url, referer = page_url.split("|", 1) headers.append(['Referer', referer]) - if not page_url.endswith("/config"): - page_url = find_videos(page_url)[0][1] + page_url = scrapertools.find_single_match(page_url, ".*?video/[0-9]+") - video_urls = [] - data = scrapertools.downloadpage(page_url, headers=headers) - json_object = jsontools.load(data) - - url_data = json_object['request']['files']['progressive'] - for data_media in url_data: - media_url = data_media['url'] - title = "%s (%s) [vimeo]" % (data_media['mime'].replace("video/", "."), data_media['quality']) - video_urls.append([title, media_url, data_media['height']]) + data = httptools.downloadpage(page_url, headers = headers).data + logger.info("Intel11 %s" %data) + patron = 'mime":"([^"]+)"' + patron += '.*?url":"([^"]+)"' + patron += '.*?quality":"([^"]+)"' + match = scrapertools.find_multiple_matches(data, patron) + for mime, media_url, calidad in match: + title = "%s (%s) [vimeo]" % (mime.replace("video/", "."), calidad) + video_urls.append([title, media_url, int(calidad.replace("p",""))]) video_urls.sort(key=lambda x: x[2]) - try: - video_urls.insert(0, [".m3u8 (SD) [vimeo]", json_object['request']['files']['hls']['cdns'] - ["akfire_interconnect"]["url"].replace("master.m3u8", "playlist.m3u8"), 0]) - except: - pass for video_url in video_urls: video_url[2] = 0 logger.info("%s - %s" % (video_url[0], video_url[1])) From eacb391af8a7880c27e86bbf35a0010174913836 Mon Sep 17 00:00:00 2001 From: Intel1 <luisriverap@hotmail.com> Date: Sun, 6 Aug 2017 09:59:42 -0500 Subject: [PATCH 22/26] allcalidad: Actualizado para vimeo Actualizado para vimeo --- plugin.video.alfa/channels/allcalidad.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin.video.alfa/channels/allcalidad.py b/plugin.video.alfa/channels/allcalidad.py index 8875adbb..a07ceca6 100755 --- a/plugin.video.alfa/channels/allcalidad.py +++ b/plugin.video.alfa/channels/allcalidad.py @@ -126,6 +126,8 @@ def findvideos(item): titulo = "[COLOR = yellow]Ver trailer: " + server + "[/COLOR]" elif "directo" in server: continue + elif "vimeo" in url: + url += "|" + "http://www.allcalidad.com" itemlist.append( Item(channel = item.channel, action = "play", From b044a1df3269b9994b0be6b6f74793fdf1c67262 Mon Sep 17 00:00:00 2001 From: alfa-addon <alfa_addon@protonmail.com> Date: Sun, 6 Aug 2017 16:58:01 -0400 Subject: [PATCH 23/26] minor fixes --- plugin.video.alfa/channels/search.py | 2 +- plugin.video.alfa/channels/yaske.py | 519 +++++++++++++------------ plugin.video.alfa/servers/gvideo.json | 99 ++--- plugin.video.alfa/servers/torrent.json | 6 +- 4 files changed, 321 insertions(+), 305 deletions(-) mode change 100755 => 100644 plugin.video.alfa/channels/search.py mode change 100755 => 100644 plugin.video.alfa/channels/yaske.py mode change 100755 => 100644 plugin.video.alfa/servers/torrent.json diff --git a/plugin.video.alfa/channels/search.py b/plugin.video.alfa/channels/search.py old mode 100755 new mode 100644 index 4f2be5d4..4b8d00c9 --- a/plugin.video.alfa/channels/search.py +++ b/plugin.video.alfa/channels/search.py @@ -476,7 +476,7 @@ def clear_saved_searches(item): def get_saved_searches(): - current_saved_searches_list = config.get_setting("saved_searches_list", "buscador") + current_saved_searches_list = config.get_setting("saved_searches_list", "search") if current_saved_searches_list is None: saved_searches_list = [] else: diff --git a/plugin.video.alfa/channels/yaske.py b/plugin.video.alfa/channels/yaske.py old mode 100755 new mode 100644 index 99e3d9aa..19c85e83 --- a/plugin.video.alfa/channels/yaske.py +++ b/plugin.video.alfa/channels/yaske.py @@ -1,256 +1,263 @@ -# -*- coding: utf-8 -*- - -import re - -from core import channeltools -from core import config -from core import httptools -from core import logger -from core import scrapertoolsV2 -from core import servertools -from core import tmdb -from core.item import Item - -HOST = 'http://www.yaske.ro' -parameters = channeltools.get_channel_parameters('yaske') -fanart_host = parameters['fanart'] -thumbnail_host = parameters['thumbnail'] -color1, color2, color3 = ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E'] - - -def mainlist(item): - logger.info() - itemlist = [] - item.url = HOST - item.text_color = color2 - item.fanart = fanart_host - thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/verdes/%s.png" - - itemlist.append(item.clone(title="Novedades", action="peliculas", text_bold=True, viewcontent='movies', - url=HOST + "/ultimas-y-actualizadas", - thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot")) - itemlist.append(item.clone(title="Estrenos", action="peliculas", text_bold=True, - url=HOST + "/genre/premieres", thumbnail=thumbnail % 'estrenos')) - itemlist.append(item.clone(title="", folder=False)) - - itemlist.append(Item(channel=item.channel, title="Filtrar por:", fanart=fanart_host, folder=False, - text_color=color3, text_bold=True, thumbnail=thumbnail_host)) - itemlist.append(item.clone(title=" Género", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="genre", thumbnail=thumbnail % 'generos', viewmode="thumbnails")) - itemlist.append(item.clone(title=" Idioma", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="audio", thumbnail=thumbnail % 'idiomas')) - itemlist.append(item.clone(title=" Calidad", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="quality", thumbnail=thumbnail % 'calidad')) - itemlist.append(item.clone(title=" Año", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="year", thumbnail=thumbnail % 'year')) - - itemlist.append(item.clone(title="", folder=False)) - itemlist.append(item.clone(title="Buscar por título", action="search", thumbnail=thumbnail % 'buscar')) - - return itemlist - - -def search(item, texto): - logger.info() - itemlist = [] - - try: - # http://www.yaske.ro/search/?q=los+pitufos - item.url = HOST + "/search/?q=" + texto.replace(' ', '+') - item.extra = "" - itemlist.extend(peliculas(item)) - if itemlist[-1].title == ">> Página siguiente": - item_pag = itemlist[-1] - itemlist = sorted(itemlist[:-1], key=lambda Item: Item.contentTitle) - itemlist.append(item_pag) - else: - itemlist = sorted(itemlist, key=lambda Item: Item.contentTitle) - - return itemlist - - except: - import sys - for line in sys.exc_info(): - logger.error("%s" % line) - return [] - - -def newest(categoria): - logger.info() - item = Item() - try: - if categoria == 'peliculas': - item.url = HOST + "/ultimas-y-actualizadas" - elif categoria == 'infantiles': - item.url = HOST + "/search/?q=&genre%5B%5D=animation" - else: - return [] - - itemlist = peliculas(item) - if itemlist[-1].title == ">> Página siguiente": - itemlist.pop() - - # Se captura la excepción, para no interrumpir al canal novedades si un canal falla - except: - import sys - for line in sys.exc_info(): - logger.error("{0}".format(line)) - return [] - - return itemlist - - -def peliculas(item): - logger.info() - itemlist = [] - url_next_page = "" - - data = httptools.downloadpage(item.url).data - data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) - - patron = '<article class.*?' - patron += '<a href="([^"]+)">.*?' - patron += '<img src="([^"]+)".*?' - patron += '<aside class="item-control down">(.*?)</aside>.*?' - patron += '<small class="pull-right text-muted">([^<]+)</small>.*?' - patron += '<h2 class.*?>([^<]+)</h2>' - - matches = re.compile(patron, re.DOTALL).findall(data) - - # Paginacion - if item.next_page != 'b': - if len(matches) > 30: - url_next_page = item.url - matches = matches[:30] - next_page = 'b' - else: - matches = matches[30:] - next_page = 'a' - patron_next_page = 'Anteriores</a> <a href="([^"]+)" class="btn btn-default ".*?Siguiente' - matches_next_page = re.compile(patron_next_page, re.DOTALL).findall(data) - if len(matches_next_page) > 0: - url_next_page = matches_next_page[0] - - for scrapedurl, scrapedthumbnail, idiomas, year, scrapedtitle in matches: - patronidiomas = "<img src='([^']+)'" - matchesidiomas = re.compile(patronidiomas, re.DOTALL).findall(idiomas) - - idiomas_disponibles = [] - for idioma in matchesidiomas: - if idioma.endswith("la_la.png"): - idiomas_disponibles.append("LAT") - elif idioma.endswith("en_en.png"): - idiomas_disponibles.append("VO") - elif idioma.endswith("en_es.png"): - idiomas_disponibles.append("VOSE") - elif idioma.endswith("es_es.png"): - idiomas_disponibles.append("ESP") - - if idiomas_disponibles: - idiomas_disponibles = "[" + "/".join(idiomas_disponibles) + "]" - - contentTitle = scrapertoolsV2.decodeHtmlentities(scrapedtitle.strip()) - title = "%s %s" % (contentTitle, idiomas_disponibles) - - itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=scrapedurl, - thumbnail=scrapedthumbnail, contentTitle=contentTitle, - infoLabels={"year": year}, text_color=color1)) - - # Obtenemos los datos basicos de todas las peliculas mediante multihilos - tmdb.set_infoLabels(itemlist) - - # Si es necesario añadir paginacion - if url_next_page: - itemlist.append( - Item(channel=item.channel, action="peliculas", title=">> Página siguiente", thumbnail=thumbnail_host, - url=url_next_page, next_page=next_page, folder=True, text_color=color3, text_bold=True)) - - return itemlist - - -def menu_buscar_contenido(item): - logger.info(item) - - data = httptools.downloadpage(item.url).data - patron = '<select name="' + item.extra + '(.*?)</select>' - data = scrapertoolsV2.get_match(data, patron) - - # Extrae las entradas - patron = "<option value='([^']+)'>([^<]+)</option>" - matches = re.compile(patron, re.DOTALL).findall(data) - - itemlist = [] - for scrapedvalue, scrapedtitle in matches: - thumbnail = "" - - if item.extra == 'genre': - if scrapedtitle.strip() in ['Documental', 'Short', 'News']: - continue - - url = HOST + "/search/?q=&genre%5B%5D=" + scrapedvalue - filename = scrapedtitle.lower().replace(' ', '%20') - if filename == "ciencia%20ficción": - filename = "ciencia%20ficcion" - thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/verdes/%s.png" \ - % filename - - elif item.extra == 'year': - url = HOST + "/search/?q=&year=" + scrapedvalue - thumbnail = item.thumbnail - else: - # http://www.yaske.ro/search/?q=&quality%5B%5D=c9 - # http://www.yaske.ro/search/?q=&audio%5B%5D=es - url = HOST + "/search/?q=&" + item.extra + "%5B%5D=" + scrapedvalue - thumbnail = item.thumbnail - - itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=url, text_color=color1, - thumbnail=thumbnail, contentType='movie', folder=True, viewmode="movie_with_plot")) - - if item.extra in ['genre', 'audio', 'year']: - return sorted(itemlist, key=lambda i: i.title.lower(), reverse=item.extra == 'year') - else: - return itemlist - - -def findvideos(item): - logger.info() - itemlist = list() - sublist = list() - - # Descarga la página - data = httptools.downloadpage(item.url).data - - if not item.plot: - item.plot = scrapertoolsV2.find_single_match(data, '>Sinopsis</dt> <dd>([^<]+)</dd>') - item.plot = scrapertoolsV2.decodeHtmlentities(item.plot) - - patron = '<option value="([^"]+)"[^>]+' - patron += '>([^<]+).*?</i>([^<]+)' - matches = re.compile(patron, re.DOTALL).findall(data) - - for url, idioma, calidad in matches: - sublist.append(item.clone(action="play", url=url, folder=False, text_color=color1, quality=calidad.strip(), - language=idioma.strip())) - - sublist = servertools.get_servers_itemlist(sublist, lambda i: "Ver en %s %s" % (i.server, i.quality), True) - - # Añadir servidores encontrados, agrupandolos por idioma - for k in ["Español", "Latino", "Subtitulado", "Ingles"]: - lista_idioma = filter(lambda i: i.language == k, sublist) - if lista_idioma: - itemlist.append(Item(channel=item.channel, title=k, fanart=item.fanart, folder=False, - text_color=color2, text_bold=True, thumbnail=thumbnail_host)) - itemlist.extend(lista_idioma) - - # Insertar items "Buscar trailer" y "Añadir a la videoteca" - if itemlist and item.extra != "library": - title = "%s [Buscar trailer]" % (item.contentTitle) - itemlist.insert(0, item.clone(channel="trailertools", action="buscartrailer", - text_color=color3, title=title, viewmode="list")) - - if config.get_videolibrary_support(): - itemlist.append(Item(channel=item.channel, title="Añadir película a la videoteca", - action="add_pelicula_to_library", url=item.url, text_color="green", - contentTitle=item.contentTitle, extra="library", thumbnail=thumbnail_host)) - - return itemlist +# -*- coding: utf-8 -*- + +import re +import base64 + +from core import channeltools +from core import config +from core import httptools +from core import logger +from core import scrapertoolsV2 +from core import servertools +from core import tmdb +from core.item import Item + + +HOST = 'http://www.yaske.ro' +parameters = channeltools.get_channel_parameters('yaske') +fanart_host = parameters['fanart'] +thumbnail_host = parameters['thumbnail'] +color1, color2, color3 = ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E'] + + +def mainlist(item): + logger.info() + itemlist = [] + item.url = HOST + item.text_color = color2 + item.fanart = fanart_host + thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/verdes/%s.png" + + itemlist.append(item.clone(title="Novedades", action="peliculas", text_bold=True, viewcontent='movies', + url=HOST + "/ultimas-y-actualizadas", + thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot")) + itemlist.append(item.clone(title="Estrenos", action="peliculas", text_bold=True, + url=HOST + "/genre/premieres", thumbnail=thumbnail % 'estrenos')) + itemlist.append(item.clone(title="", folder=False)) + + itemlist.append(Item(channel=item.channel, title="Filtrar por:", fanart=fanart_host, folder=False, + text_color=color3, text_bold=True, thumbnail=thumbnail_host)) + itemlist.append(item.clone(title=" Género", action="menu_buscar_contenido", text_color=color1, text_italic=True, + extra="genre", thumbnail=thumbnail % 'generos', viewmode="thumbnails")) + itemlist.append(item.clone(title=" Idioma", action="menu_buscar_contenido", text_color=color1, text_italic=True, + extra="audio", thumbnail=thumbnail % 'idiomas')) + itemlist.append(item.clone(title=" Calidad", action="menu_buscar_contenido", text_color=color1, text_italic=True, + extra="quality", thumbnail=thumbnail % 'calidad')) + itemlist.append(item.clone(title=" Año", action="menu_buscar_contenido", text_color=color1, text_italic=True, + extra="year", thumbnail=thumbnail % 'year')) + + itemlist.append(item.clone(title="", folder=False)) + itemlist.append(item.clone(title="Buscar por título", action="search", thumbnail=thumbnail % 'buscar')) + + return itemlist + + +def search(item, texto): + logger.info() + itemlist = [] + + try: + # http://www.yaske.ro/search/?q=los+pitufos + item.url = HOST + "/search/?q=" + texto.replace(' ', '+') + item.extra = "" + itemlist.extend(peliculas(item)) + if itemlist[-1].title == ">> Página siguiente": + item_pag = itemlist[-1] + itemlist = sorted(itemlist[:-1], key=lambda Item: Item.contentTitle) + itemlist.append(item_pag) + else: + itemlist = sorted(itemlist, key=lambda Item: Item.contentTitle) + + return itemlist + + except: + import sys + for line in sys.exc_info(): + logger.error("%s" % line) + return [] + + +def newest(categoria): + logger.info() + item = Item() + try: + if categoria == 'peliculas': + item.url = HOST + "/ultimas-y-actualizadas" + elif categoria == 'infantiles': + item.url = HOST + "/search/?q=&genre%5B%5D=animation" + else: + return [] + + itemlist = peliculas(item) + if itemlist[-1].title == ">> Página siguiente": + itemlist.pop() + + # Se captura la excepción, para no interrumpir al canal novedades si un canal falla + except: + import sys + for line in sys.exc_info(): + logger.error("{0}".format(line)) + return [] + + return itemlist + + +def peliculas(item): + logger.info() + itemlist = [] + url_next_page = "" + + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) + + patron = '<article class.*?' + patron += '<a href="([^"]+)">.*?' + patron += '<img src="([^"]+)".*?' + patron += '<aside class="item-control down">(.*?)</aside>.*?' + patron += '<small class="pull-right text-muted">([^<]+)</small>.*?' + patron += '<h2 class.*?>([^<]+)</h2>' + + matches = re.compile(patron, re.DOTALL).findall(data) + + # Paginacion + if item.next_page != 'b': + if len(matches) > 30: + url_next_page = item.url + matches = matches[:30] + next_page = 'b' + else: + matches = matches[30:] + next_page = 'a' + patron_next_page = 'Anteriores</a> <a href="([^"]+)" class="btn btn-default ".*?Siguiente' + matches_next_page = re.compile(patron_next_page, re.DOTALL).findall(data) + if len(matches_next_page) > 0: + url_next_page = matches_next_page[0] + + for scrapedurl, scrapedthumbnail, idiomas, year, scrapedtitle in matches: + patronidiomas = "<img src='([^']+)'" + matchesidiomas = re.compile(patronidiomas, re.DOTALL).findall(idiomas) + + idiomas_disponibles = [] + for idioma in matchesidiomas: + if idioma.endswith("la_la.png"): + idiomas_disponibles.append("LAT") + elif idioma.endswith("en_en.png"): + idiomas_disponibles.append("VO") + elif idioma.endswith("en_es.png"): + idiomas_disponibles.append("VOSE") + elif idioma.endswith("es_es.png"): + idiomas_disponibles.append("ESP") + + if idiomas_disponibles: + idiomas_disponibles = "[" + "/".join(idiomas_disponibles) + "]" + + contentTitle = scrapertoolsV2.decodeHtmlentities(scrapedtitle.strip()) + title = "%s %s" % (contentTitle, idiomas_disponibles) + + itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=scrapedurl, + thumbnail=scrapedthumbnail, contentTitle=contentTitle, + infoLabels={"year": year}, text_color=color1)) + + # Obtenemos los datos basicos de todas las peliculas mediante multihilos + tmdb.set_infoLabels(itemlist) + + # Si es necesario añadir paginacion + if url_next_page: + itemlist.append( + Item(channel=item.channel, action="peliculas", title=">> Página siguiente", thumbnail=thumbnail_host, + url=url_next_page, next_page=next_page, folder=True, text_color=color3, text_bold=True)) + + return itemlist + + +def menu_buscar_contenido(item): + logger.info(item) + + data = httptools.downloadpage(item.url).data + patron = '<select name="' + item.extra + '(.*?)</select>' + data = scrapertoolsV2.get_match(data, patron) + + # Extrae las entradas + patron = "<option value='([^']+)'>([^<]+)</option>" + matches = re.compile(patron, re.DOTALL).findall(data) + + itemlist = [] + for scrapedvalue, scrapedtitle in matches: + thumbnail = "" + + if item.extra == 'genre': + if scrapedtitle.strip() in ['Documental', 'Short', 'News']: + continue + + url = HOST + "/search/?q=&genre%5B%5D=" + scrapedvalue + filename = scrapedtitle.lower().replace(' ', '%20') + if filename == "ciencia%20ficción": + filename = "ciencia%20ficcion" + thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/verdes/%s.png" \ + % filename + + elif item.extra == 'year': + url = HOST + "/search/?q=&year=" + scrapedvalue + thumbnail = item.thumbnail + else: + # http://www.yaske.ro/search/?q=&quality%5B%5D=c9 + # http://www.yaske.ro/search/?q=&audio%5B%5D=es + url = HOST + "/search/?q=&" + item.extra + "%5B%5D=" + scrapedvalue + thumbnail = item.thumbnail + + itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=url, text_color=color1, + thumbnail=thumbnail, contentType='movie', folder=True, viewmode="movie_with_plot")) + + if item.extra in ['genre', 'audio', 'year']: + return sorted(itemlist, key=lambda i: i.title.lower(), reverse=item.extra == 'year') + else: + return itemlist + + +def findvideos(item): + logger.info() + itemlist = list() + sublist = list() + + # Descarga la página + data = httptools.downloadpage(item.url).data + + if not item.plot: + item.plot = scrapertoolsV2.find_single_match(data, '>Sinopsis</dt> <dd>([^<]+)</dd>') + item.plot = scrapertoolsV2.decodeHtmlentities(item.plot) + + patron = '<option value="([^"]+)"[^>]+' + patron += '>([^<]+).*?</i>([^<]+)' + matches = re.compile(patron, re.DOTALL).findall(data) + + for url, idioma, calidad in matches: + if 'yaske' in url: + data = httptools.downloadpage(url).data + url_enc = scrapertoolsV2.find_single_match(data, "eval.*?'(.*?)'") + url_dec = base64.b64decode(url_enc) + url = scrapertoolsV2.find_single_match(url_dec, 'iframe src="(.*?)"') + sublist.append(item.clone(action="play", url=url, folder=False, text_color=color1, quality=calidad.strip(), + language=idioma.strip())) + + sublist = servertools.get_servers_itemlist(sublist, lambda i: "Ver en %s %s" % (i.server, i.quality), True) + + # Añadir servidores encontrados, agrupandolos por idioma + for k in ["Español", "Latino", "Subtitulado", "Ingles"]: + lista_idioma = filter(lambda i: i.language == k, sublist) + if lista_idioma: + itemlist.append(Item(channel=item.channel, title=k, fanart=item.fanart, folder=False, + text_color=color2, text_bold=True, thumbnail=thumbnail_host)) + itemlist.extend(lista_idioma) + + # Insertar items "Buscar trailer" y "Añadir a la videoteca" + if itemlist and item.extra != "library": + title = "%s [Buscar trailer]" % (item.contentTitle) + itemlist.insert(0, item.clone(channel="trailertools", action="buscartrailer", + text_color=color3, title=title, viewmode="list")) + + if config.get_videolibrary_support(): + itemlist.append(Item(channel=item.channel, title="Añadir película a la videoteca", + action="add_pelicula_to_library", url=item.url, text_color="green", + contentTitle=item.contentTitle, extra="library", thumbnail=thumbnail_host)) + + return itemlist diff --git a/plugin.video.alfa/servers/gvideo.json b/plugin.video.alfa/servers/gvideo.json index 772a5e55..1df66e72 100644 --- a/plugin.video.alfa/servers/gvideo.json +++ b/plugin.video.alfa/servers/gvideo.json @@ -1,48 +1,53 @@ -{ - "active": true, - "changes": [ - { - "date": "18/07/2017", - "description": "Versión incial" - } - ], - "find_videos": { - "ignore_urls": [], - "patterns": [ - { - "pattern": "(?s)https://youtube.googleapis.com.*?docid=([^(?:&|\")]+)", - "url": "http://docs.google.com/get_video_info?docid=\\1" - } - ] - }, - "free": true, - "id": "gvideo", - "name": "gvideo", - "settings": [ - { - "default": false, - "enabled": true, - "id": "black_list", - "label": "Incluir en lista negra", - "type": "bool", - "visible": true - }, - { - "default": 0, - "enabled": true, - "id": "favorites_servers_list", - "label": "Incluir en lista de favoritos", - "lvalues": [ - "No", - "1", - "2", - "3", - "4", - "5" - ], - "type": "list", - "visible": false - } - ], - "version": 1 +{ + "active": true, + "changes": [ + { + "date": "18/07/2017", + "description": "Versión incial" + } + ], + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "(?s)https://youtube.googleapis.com.*?docid=([^(?:&|\")]+)", + "url": "http://docs.google.com/get_video_info?docid=\\1" + }, + { + "pattern": "(?s)https://drive.google.com/file/d/(.*?)/preview", + "url": "http://docs.google.com/get_video_info?docid=\\1" + } + + ] + }, + "free": true, + "id": "gvideo", + "name": "gvideo", + "settings": [ + { + "default": false, + "enabled": true, + "id": "black_list", + "label": "Incluir en lista negra", + "type": "bool", + "visible": true + }, + { + "default": 0, + "enabled": true, + "id": "favorites_servers_list", + "label": "Incluir en lista de favoritos", + "lvalues": [ + "No", + "1", + "2", + "3", + "4", + "5" + ], + "type": "list", + "visible": false + } + ], + "version": 1 } \ No newline at end of file diff --git a/plugin.video.alfa/servers/torrent.json b/plugin.video.alfa/servers/torrent.json old mode 100755 new mode 100644 index 00a797e3..5be2fb23 --- a/plugin.video.alfa/servers/torrent.json +++ b/plugin.video.alfa/servers/torrent.json @@ -42,12 +42,16 @@ "ignore_urls": [], "patterns": [ { - "pattern": "(http:\\/\\/(?:.*?)\\.torrent)", + "pattern": "(http:\\/\\/(?:[a-zA-Z0-9]+)\\.torrent)", "url": "\\1" }, { "pattern": "(magnet:\\?xt=urn:[^\"]+)", "url": "\\1" + }, + { + "pattern": "(http://tumejorjuego.com/descargar/index.php\\?link=[^\"]+)", + "url": "\\1" } ] }, From 8a410311e5296532ffddba0b9cba0eee76aa75ba Mon Sep 17 00:00:00 2001 From: alfa-addon <alfa_addon@protonmail.com> Date: Sun, 6 Aug 2017 16:58:29 -0400 Subject: [PATCH 24/26] new server --- plugin.video.alfa/channels/gvideo.json | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 plugin.video.alfa/channels/gvideo.json diff --git a/plugin.video.alfa/channels/gvideo.json b/plugin.video.alfa/channels/gvideo.json new file mode 100644 index 00000000..1df66e72 --- /dev/null +++ b/plugin.video.alfa/channels/gvideo.json @@ -0,0 +1,53 @@ +{ + "active": true, + "changes": [ + { + "date": "18/07/2017", + "description": "Versión incial" + } + ], + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "(?s)https://youtube.googleapis.com.*?docid=([^(?:&|\")]+)", + "url": "http://docs.google.com/get_video_info?docid=\\1" + }, + { + "pattern": "(?s)https://drive.google.com/file/d/(.*?)/preview", + "url": "http://docs.google.com/get_video_info?docid=\\1" + } + + ] + }, + "free": true, + "id": "gvideo", + "name": "gvideo", + "settings": [ + { + "default": false, + "enabled": true, + "id": "black_list", + "label": "Incluir en lista negra", + "type": "bool", + "visible": true + }, + { + "default": 0, + "enabled": true, + "id": "favorites_servers_list", + "label": "Incluir en lista de favoritos", + "lvalues": [ + "No", + "1", + "2", + "3", + "4", + "5" + ], + "type": "list", + "visible": false + } + ], + "version": 1 +} \ No newline at end of file From f0d2807e7fbbe3273d2e6c41f2db19c0d6fa2b73 Mon Sep 17 00:00:00 2001 From: alfa-addon <alfa_addon@protonmail.com> Date: Sun, 6 Aug 2017 17:14:26 -0400 Subject: [PATCH 25/26] deleted --- plugin.video.alfa/channels/yaske.json | 67 ------- plugin.video.alfa/channels/yaske.py | 263 -------------------------- plugin.video.alfa/servers/gvideo.json | 53 ------ plugin.video.alfa/servers/gvideo.py | 40 ---- 4 files changed, 423 deletions(-) delete mode 100755 plugin.video.alfa/channels/yaske.json delete mode 100644 plugin.video.alfa/channels/yaske.py delete mode 100644 plugin.video.alfa/servers/gvideo.json delete mode 100644 plugin.video.alfa/servers/gvideo.py diff --git a/plugin.video.alfa/channels/yaske.json b/plugin.video.alfa/channels/yaske.json deleted file mode 100755 index 4f460979..00000000 --- a/plugin.video.alfa/channels/yaske.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "id": "yaske", - "name": "Yaske", - "active": true, - "adult": false, - "language": "es", - "banner": "yaske.png", - "fanart": "https://github.com/master-1970/resources/raw/master/images/fanart/yaske.png", - "thumbnail": "yaske.png", - "version": 1, - "changes": [ - { - "date": "27/06/17", - "description": "Desactivar por falta de contenidos" - }, - { - "date": "04/06/17", - "description": "Desactivar por falta de contenidos" - }, - { - "date": "15/03/2017", - "description": "limpieza código" - }, - { - "date": "01/02/17", - "description": "Añadir imagenes, sinopsis, etc..." - }, - { - "date": "18/01/17", - "description": "Uso de httptools" - }, - { - "date": "12/12/16", - "description": "Cambios en la web" - }, - { - "date": "01/07/16", - "description": "Eliminado código innecesario." - }, - { - "date": "29/04/16", - "description": "Adaptar a Novedades Peliculas e Infantiles" - } - ], - "categories": [ - "latino", - "movie" - ], - "settings": [ - { - "id": "include_in_newest_peliculas", - "type": "bool", - "label": "Incluir en Novedades - Peliculas", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_infantiles", - "type": "bool", - "label": "Incluir en Novedades - Infantiles", - "default": false, - "enabled": true, - "visible": true - } - ] -} \ No newline at end of file diff --git a/plugin.video.alfa/channels/yaske.py b/plugin.video.alfa/channels/yaske.py deleted file mode 100644 index 19c85e83..00000000 --- a/plugin.video.alfa/channels/yaske.py +++ /dev/null @@ -1,263 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import base64 - -from core import channeltools -from core import config -from core import httptools -from core import logger -from core import scrapertoolsV2 -from core import servertools -from core import tmdb -from core.item import Item - - -HOST = 'http://www.yaske.ro' -parameters = channeltools.get_channel_parameters('yaske') -fanart_host = parameters['fanart'] -thumbnail_host = parameters['thumbnail'] -color1, color2, color3 = ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E'] - - -def mainlist(item): - logger.info() - itemlist = [] - item.url = HOST - item.text_color = color2 - item.fanart = fanart_host - thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/verdes/%s.png" - - itemlist.append(item.clone(title="Novedades", action="peliculas", text_bold=True, viewcontent='movies', - url=HOST + "/ultimas-y-actualizadas", - thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot")) - itemlist.append(item.clone(title="Estrenos", action="peliculas", text_bold=True, - url=HOST + "/genre/premieres", thumbnail=thumbnail % 'estrenos')) - itemlist.append(item.clone(title="", folder=False)) - - itemlist.append(Item(channel=item.channel, title="Filtrar por:", fanart=fanart_host, folder=False, - text_color=color3, text_bold=True, thumbnail=thumbnail_host)) - itemlist.append(item.clone(title=" Género", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="genre", thumbnail=thumbnail % 'generos', viewmode="thumbnails")) - itemlist.append(item.clone(title=" Idioma", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="audio", thumbnail=thumbnail % 'idiomas')) - itemlist.append(item.clone(title=" Calidad", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="quality", thumbnail=thumbnail % 'calidad')) - itemlist.append(item.clone(title=" Año", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="year", thumbnail=thumbnail % 'year')) - - itemlist.append(item.clone(title="", folder=False)) - itemlist.append(item.clone(title="Buscar por título", action="search", thumbnail=thumbnail % 'buscar')) - - return itemlist - - -def search(item, texto): - logger.info() - itemlist = [] - - try: - # http://www.yaske.ro/search/?q=los+pitufos - item.url = HOST + "/search/?q=" + texto.replace(' ', '+') - item.extra = "" - itemlist.extend(peliculas(item)) - if itemlist[-1].title == ">> Página siguiente": - item_pag = itemlist[-1] - itemlist = sorted(itemlist[:-1], key=lambda Item: Item.contentTitle) - itemlist.append(item_pag) - else: - itemlist = sorted(itemlist, key=lambda Item: Item.contentTitle) - - return itemlist - - except: - import sys - for line in sys.exc_info(): - logger.error("%s" % line) - return [] - - -def newest(categoria): - logger.info() - item = Item() - try: - if categoria == 'peliculas': - item.url = HOST + "/ultimas-y-actualizadas" - elif categoria == 'infantiles': - item.url = HOST + "/search/?q=&genre%5B%5D=animation" - else: - return [] - - itemlist = peliculas(item) - if itemlist[-1].title == ">> Página siguiente": - itemlist.pop() - - # Se captura la excepción, para no interrumpir al canal novedades si un canal falla - except: - import sys - for line in sys.exc_info(): - logger.error("{0}".format(line)) - return [] - - return itemlist - - -def peliculas(item): - logger.info() - itemlist = [] - url_next_page = "" - - data = httptools.downloadpage(item.url).data - data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) - - patron = '<article class.*?' - patron += '<a href="([^"]+)">.*?' - patron += '<img src="([^"]+)".*?' - patron += '<aside class="item-control down">(.*?)</aside>.*?' - patron += '<small class="pull-right text-muted">([^<]+)</small>.*?' - patron += '<h2 class.*?>([^<]+)</h2>' - - matches = re.compile(patron, re.DOTALL).findall(data) - - # Paginacion - if item.next_page != 'b': - if len(matches) > 30: - url_next_page = item.url - matches = matches[:30] - next_page = 'b' - else: - matches = matches[30:] - next_page = 'a' - patron_next_page = 'Anteriores</a> <a href="([^"]+)" class="btn btn-default ".*?Siguiente' - matches_next_page = re.compile(patron_next_page, re.DOTALL).findall(data) - if len(matches_next_page) > 0: - url_next_page = matches_next_page[0] - - for scrapedurl, scrapedthumbnail, idiomas, year, scrapedtitle in matches: - patronidiomas = "<img src='([^']+)'" - matchesidiomas = re.compile(patronidiomas, re.DOTALL).findall(idiomas) - - idiomas_disponibles = [] - for idioma in matchesidiomas: - if idioma.endswith("la_la.png"): - idiomas_disponibles.append("LAT") - elif idioma.endswith("en_en.png"): - idiomas_disponibles.append("VO") - elif idioma.endswith("en_es.png"): - idiomas_disponibles.append("VOSE") - elif idioma.endswith("es_es.png"): - idiomas_disponibles.append("ESP") - - if idiomas_disponibles: - idiomas_disponibles = "[" + "/".join(idiomas_disponibles) + "]" - - contentTitle = scrapertoolsV2.decodeHtmlentities(scrapedtitle.strip()) - title = "%s %s" % (contentTitle, idiomas_disponibles) - - itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=scrapedurl, - thumbnail=scrapedthumbnail, contentTitle=contentTitle, - infoLabels={"year": year}, text_color=color1)) - - # Obtenemos los datos basicos de todas las peliculas mediante multihilos - tmdb.set_infoLabels(itemlist) - - # Si es necesario añadir paginacion - if url_next_page: - itemlist.append( - Item(channel=item.channel, action="peliculas", title=">> Página siguiente", thumbnail=thumbnail_host, - url=url_next_page, next_page=next_page, folder=True, text_color=color3, text_bold=True)) - - return itemlist - - -def menu_buscar_contenido(item): - logger.info(item) - - data = httptools.downloadpage(item.url).data - patron = '<select name="' + item.extra + '(.*?)</select>' - data = scrapertoolsV2.get_match(data, patron) - - # Extrae las entradas - patron = "<option value='([^']+)'>([^<]+)</option>" - matches = re.compile(patron, re.DOTALL).findall(data) - - itemlist = [] - for scrapedvalue, scrapedtitle in matches: - thumbnail = "" - - if item.extra == 'genre': - if scrapedtitle.strip() in ['Documental', 'Short', 'News']: - continue - - url = HOST + "/search/?q=&genre%5B%5D=" + scrapedvalue - filename = scrapedtitle.lower().replace(' ', '%20') - if filename == "ciencia%20ficción": - filename = "ciencia%20ficcion" - thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/verdes/%s.png" \ - % filename - - elif item.extra == 'year': - url = HOST + "/search/?q=&year=" + scrapedvalue - thumbnail = item.thumbnail - else: - # http://www.yaske.ro/search/?q=&quality%5B%5D=c9 - # http://www.yaske.ro/search/?q=&audio%5B%5D=es - url = HOST + "/search/?q=&" + item.extra + "%5B%5D=" + scrapedvalue - thumbnail = item.thumbnail - - itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=url, text_color=color1, - thumbnail=thumbnail, contentType='movie', folder=True, viewmode="movie_with_plot")) - - if item.extra in ['genre', 'audio', 'year']: - return sorted(itemlist, key=lambda i: i.title.lower(), reverse=item.extra == 'year') - else: - return itemlist - - -def findvideos(item): - logger.info() - itemlist = list() - sublist = list() - - # Descarga la página - data = httptools.downloadpage(item.url).data - - if not item.plot: - item.plot = scrapertoolsV2.find_single_match(data, '>Sinopsis</dt> <dd>([^<]+)</dd>') - item.plot = scrapertoolsV2.decodeHtmlentities(item.plot) - - patron = '<option value="([^"]+)"[^>]+' - patron += '>([^<]+).*?</i>([^<]+)' - matches = re.compile(patron, re.DOTALL).findall(data) - - for url, idioma, calidad in matches: - if 'yaske' in url: - data = httptools.downloadpage(url).data - url_enc = scrapertoolsV2.find_single_match(data, "eval.*?'(.*?)'") - url_dec = base64.b64decode(url_enc) - url = scrapertoolsV2.find_single_match(url_dec, 'iframe src="(.*?)"') - sublist.append(item.clone(action="play", url=url, folder=False, text_color=color1, quality=calidad.strip(), - language=idioma.strip())) - - sublist = servertools.get_servers_itemlist(sublist, lambda i: "Ver en %s %s" % (i.server, i.quality), True) - - # Añadir servidores encontrados, agrupandolos por idioma - for k in ["Español", "Latino", "Subtitulado", "Ingles"]: - lista_idioma = filter(lambda i: i.language == k, sublist) - if lista_idioma: - itemlist.append(Item(channel=item.channel, title=k, fanart=item.fanart, folder=False, - text_color=color2, text_bold=True, thumbnail=thumbnail_host)) - itemlist.extend(lista_idioma) - - # Insertar items "Buscar trailer" y "Añadir a la videoteca" - if itemlist and item.extra != "library": - title = "%s [Buscar trailer]" % (item.contentTitle) - itemlist.insert(0, item.clone(channel="trailertools", action="buscartrailer", - text_color=color3, title=title, viewmode="list")) - - if config.get_videolibrary_support(): - itemlist.append(Item(channel=item.channel, title="Añadir película a la videoteca", - action="add_pelicula_to_library", url=item.url, text_color="green", - contentTitle=item.contentTitle, extra="library", thumbnail=thumbnail_host)) - - return itemlist diff --git a/plugin.video.alfa/servers/gvideo.json b/plugin.video.alfa/servers/gvideo.json deleted file mode 100644 index 1df66e72..00000000 --- a/plugin.video.alfa/servers/gvideo.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "active": true, - "changes": [ - { - "date": "18/07/2017", - "description": "Versión incial" - } - ], - "find_videos": { - "ignore_urls": [], - "patterns": [ - { - "pattern": "(?s)https://youtube.googleapis.com.*?docid=([^(?:&|\")]+)", - "url": "http://docs.google.com/get_video_info?docid=\\1" - }, - { - "pattern": "(?s)https://drive.google.com/file/d/(.*?)/preview", - "url": "http://docs.google.com/get_video_info?docid=\\1" - } - - ] - }, - "free": true, - "id": "gvideo", - "name": "gvideo", - "settings": [ - { - "default": false, - "enabled": true, - "id": "black_list", - "label": "Incluir en lista negra", - "type": "bool", - "visible": true - }, - { - "default": 0, - "enabled": true, - "id": "favorites_servers_list", - "label": "Incluir en lista de favoritos", - "lvalues": [ - "No", - "1", - "2", - "3", - "4", - "5" - ], - "type": "list", - "visible": false - } - ], - "version": 1 -} \ No newline at end of file diff --git a/plugin.video.alfa/servers/gvideo.py b/plugin.video.alfa/servers/gvideo.py deleted file mode 100644 index def01a76..00000000 --- a/plugin.video.alfa/servers/gvideo.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- - -import urllib - -from core import httptools -from core import logger -from core import scrapertools - - -def test_video_exists(page_url): - response = httptools.downloadpage(page_url, cookies=False, headers={"Referer": page_url}) - if "no+existe" in response.data: - return False, "[gvideo] El video no existe o ha sido borrado" - if "Se+ha+excedido+el" in response.data: - return False, "[gvideo] Se ha excedido el número de reproducciones permitidas" - return True, "" - - -def get_video_url(page_url, user="", password="", video_password=""): - video_urls = [] - urls = [] - response = httptools.downloadpage(page_url, cookies=False, headers={"Referer": page_url}) - cookies = "" - cookie = response.headers["set-cookie"].split("HttpOnly, ") - for c in cookie: - cookies += c.split(";", 1)[0] + "; " - data = response.data.decode('unicode-escape') - data = urllib.unquote_plus(urllib.unquote_plus(data)) - headers_string = "|Cookie=" + cookies - url_streams = scrapertools.find_single_match(data, 'url_encoded_fmt_stream_map=(.*)') - streams = scrapertools.find_multiple_matches(url_streams, - 'itag=(\d+)&url=(.*?)(?:;.*?quality=.*?(?:,|&)|&quality=.*?(?:,|&))') - itags = {'18':'360p', '22':'720p', '34':'360p', '35':'480p', '37':'1080p', '43':'360p', '59':'480p'} - for itag, video_url in streams: - if not video_url in urls: - video_url += headers_string - video_urls.append([itags[itag], video_url]) - urls.append(video_url) - video_urls.sort(key=lambda video_urls: int(video_urls[0].replace("p", ""))) - return video_urls From a6165ecb42b11bf9534b967adeb5cac117d5d9d3 Mon Sep 17 00:00:00 2001 From: alfa-addon <alfa_addon@protonmail.com> Date: Sun, 6 Aug 2017 19:33:53 -0400 Subject: [PATCH 26/26] v0.1.0 --- plugin.video.alfa/addon.xml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/plugin.video.alfa/addon.xml b/plugin.video.alfa/addon.xml index 14e5af26..5380297d 100755 --- a/plugin.video.alfa/addon.xml +++ b/plugin.video.alfa/addon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<addon id="plugin.video.alfa" name="Alfa" version="0.0.8" provider-name="Alfa Addon"> +<addon id="plugin.video.alfa" name="Alfa" version="0.1.0" provider-name="Alfa Addon"> <requires> <import addon="xbmc.python" version="2.1.0"/> <import addon="script.module.libtorrent" optional="true"/> @@ -18,18 +18,9 @@ <screenshot>resources/media/general/ss/4.jpg</screenshot> </assets> <news>[B]Estos son los cambios para esta versión:[/B] - [COLOR green][B]Arreglos de canales[/B][/COLOR] - [I]- Seriespapaya - - Playmax - Gracias a d3v3l0p1n - - Seriesblanco - Posible error en versiones anteriores a kodi 16 por https - - AnimesHD - - Cinetux[/I] - [COLOR green][B]Servidor Nuevo[/B][/COLOR] - [I]- Vidlox - [COLOR green][B]Arreglos internos[/B][/COLOR] - [I]- platformtools - posible solución de favoritos - - videolibrarytools - solución a añadir películas de varios canales[/I] - [COLOR blue]Gracias a devalls por su cooperación en esta release.[/COLOR] + [I]- correccion de errores y fix por cambios en web[/I] + + [COLOR blue]Gracias a [COLOR yellow]j2331223[/COLOR] por su colaboración en esta versión.[/COLOR] </news> <description lang="es">Descripción en Español</description> <summary lang="en">English summary</summary>