From cb423adc88291065c21014d379711ac976d0496a Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sat, 24 Feb 2018 09:21:18 -0500 Subject: [PATCH 01/16] gnula: busqueda actualizada --- plugin.video.alfa/channels/gnula.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/channels/gnula.py b/plugin.video.alfa/channels/gnula.py index f30bf00f..deceb08d 100755 --- a/plugin.video.alfa/channels/gnula.py +++ b/plugin.video.alfa/channels/gnula.py @@ -7,7 +7,7 @@ from core.item import Item from platformcode import config, logger host = "http://gnula.nu/" -host_search = "https://www.googleapis.com/customsearch/v1element?key=AIzaSyCVAXiUzRYsML1Pv6RwSG1gunmMikTzQqY&rsz=small&num=10&hl=es&prettyPrint=false&source=gcsc&gss=.es&sig=45e50696e04f15ce6310843f10a3a8fb&cx=014793692610101313036:vwtjajbclpq&q=%s&cse_tok=AOdTmaBgzSiy5RxoV4cZSGGEr17reWoGLg:1519145966291&googlehost=www.google.com&callback=google.search.Search.apiary10745&nocache=1519145965573&start=0" +host_search = "https://www.googleapis.com/customsearch/v1element?key=AIzaSyCVAXiUzRYsML1Pv6RwSG1gunmMikTzQqY&rsz=small&num=10&hl=es&prettyPrint=false&source=gcsc&gss=.es&sig=45e50696e04f15ce6310843f10a3a8fb&cx=014793692610101313036:vwtjajbclpq&q=%s&cse_tok=%s&googlehost=www.google.com&callback=google.search.Search.apiary10745&nocache=1519145965573&start=0" def mainlist(item): @@ -28,7 +28,16 @@ def mainlist(item): def search(item, texto): logger.info() texto = texto.replace(" ", "+") - item.url = item.url %texto + data = httptools.downloadpage(host).data + url_cse = scrapertools.find_single_match(data, '
').replace('name="q"', "") + matches = scrapertools.find_multiple_matches(bloque, 'name="([^"]+).*?value="([^"]+)') + post = "q=" + texto + "&" + for name, value in matches: + post += name + "=" + value + "&" + data = httptools.downloadpage(url_cse + post).data + cse_token = scrapertools.find_single_match(data, "var cse_token='([^']+)'") + item.url = host_search %(texto, cse_token) try: return sub_search(item) # Se captura la excepción, para no interrumpir al buscador global si un canal falla From 566d1c87be5ca222d3ee63944d05d0d591b5c772 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 26 Feb 2018 08:59:59 -0500 Subject: [PATCH 02/16] pelismagnet: fix series --- plugin.video.alfa/channels/pelismagnet.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin.video.alfa/channels/pelismagnet.py b/plugin.video.alfa/channels/pelismagnet.py index 3adda429..d0cd6fc4 100644 --- a/plugin.video.alfa/channels/pelismagnet.py +++ b/plugin.video.alfa/channels/pelismagnet.py @@ -171,7 +171,7 @@ def episodios(item): # post = "page=%s&x=34&y=14" % urllib.quote(item.url) # response = httptools.downloadpage(url, post, follow_redirects=False).data # url = scrapertools.find_single_match(response, ' Date: Mon, 26 Feb 2018 12:30:38 -0500 Subject: [PATCH 03/16] gnula: buscador fix --- plugin.video.alfa/channels/gnula.py | 57 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/plugin.video.alfa/channels/gnula.py b/plugin.video.alfa/channels/gnula.py index deceb08d..5836f0d2 100755 --- a/plugin.video.alfa/channels/gnula.py +++ b/plugin.video.alfa/channels/gnula.py @@ -7,7 +7,8 @@ from core.item import Item from platformcode import config, logger host = "http://gnula.nu/" -host_search = "https://www.googleapis.com/customsearch/v1element?key=AIzaSyCVAXiUzRYsML1Pv6RwSG1gunmMikTzQqY&rsz=small&num=10&hl=es&prettyPrint=false&source=gcsc&gss=.es&sig=45e50696e04f15ce6310843f10a3a8fb&cx=014793692610101313036:vwtjajbclpq&q=%s&cse_tok=%s&googlehost=www.google.com&callback=google.search.Search.apiary10745&nocache=1519145965573&start=0" +host_search = "https://www.googleapis.com/customsearch/v1element?key=AIzaSyCVAXiUzRYsML1Pv6RwSG1gunmMikTzQqY&rsz=small&num=20&hl=es&prettyPrint=false&source=gcsc&gss=.es&sig=45e50696e04f15ce6310843f10a3a8fb&cx=014793692610101313036:vwtjajbclpq&q=%s&cse_tok=%s&googlehost=www.google.com&callback=google.search.Search.apiary10745&nocache=1519145965573&start=0" +item_per_page = 20 def mainlist(item): @@ -51,35 +52,31 @@ def search(item, texto): def sub_search(item): logger.info() itemlist = [] - data = httptools.downloadpage(item.url).data - patron = '(?s)clicktrackUrl":".*?q=(.*?)".*?' - patron += 'title":"([^"]+)".*?' - patron += 'cseImage":{"src":"([^"]+)"' - matches = scrapertools.find_multiple_matches(data, patron) - for scrapedurl, scrapedtitle, scrapedthumbnail in matches: - scrapedurl = scrapertools.find_single_match(scrapedurl, ".*?online/") - scrapedtitle = scrapedtitle.decode("unicode-escape").replace(" online", "").replace("", "").replace("", "") - if "ver-" not in scrapedurl: - continue - year = scrapertools.find_single_match(scrapedtitle, "\d{4}") - contentTitle = scrapedtitle.replace("(%s)" %year,"").replace("Ver","").strip() - itemlist.append(Item(action = "findvideos", - channel = item.channel, - contentTitle = contentTitle, - infoLabels = {"year":year}, - title = scrapedtitle, - thumbnail = scrapedthumbnail, - url = scrapedurl - )) - if itemlist: - page = int(scrapertools.find_single_match(item.url, ".*?start=(\d+)")) + 10 - npage = (page / 10) + 1 - item_page = scrapertools.find_single_match(item.url, "(.*?start=)") + str(page) - itemlist.append(Item(action = "sub_search", - channel = item.channel, - title = "[COLOR green]Página %s[/COLOR]" %npage, - url = item_page - )) + while True: + data = httptools.downloadpage(item.url).data + if len(data) < 500 : + break + page = int(scrapertools.find_single_match(item.url, ".*?start=(\d+)")) + item_per_page + item.url = scrapertools.find_single_match(item.url, "(.*?start=)") + str(page) + patron = '(?s)clicktrackUrl":".*?q=(.*?)".*?' + patron += 'title":"([^"]+)".*?' + patron += 'cseImage":{"src":"([^"]+)"' + matches = scrapertools.find_multiple_matches(data, patron) + for scrapedurl, scrapedtitle, scrapedthumbnail in matches: + scrapedurl = scrapertools.find_single_match(scrapedurl, ".*?online/") + scrapedtitle = scrapedtitle.decode("unicode-escape").replace(" online", "").replace("", "").replace("", "") + if "ver-" not in scrapedurl: + continue + year = scrapertools.find_single_match(scrapedtitle, "\d{4}") + contentTitle = scrapedtitle.replace("(%s)" %year,"").replace("Ver","").strip() + itemlist.append(Item(action = "findvideos", + channel = item.channel, + contentTitle = contentTitle, + infoLabels = {"year":year}, + title = scrapedtitle, + thumbnail = scrapedthumbnail, + url = scrapedurl, + )) return itemlist From 1f9e7e4fd9bb39bf36b66dbda212c2c8b73485ef Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 26 Feb 2018 12:54:03 -0500 Subject: [PATCH 04/16] =?UTF-8?q?allcalidad:=20cambios=20cosm=C3=A9ticos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.video.alfa/channels/allcalidad.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugin.video.alfa/channels/allcalidad.py b/plugin.video.alfa/channels/allcalidad.py index 04d73f46..97ac059a 100755 --- a/plugin.video.alfa/channels/allcalidad.py +++ b/plugin.video.alfa/channels/allcalidad.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from channelselector import get_thumb from core import httptools from core import scrapertools from core import servertools @@ -20,12 +21,12 @@ except: def mainlist(item): logger.info() itemlist = [] - itemlist.append(Item(channel = item.channel, title = "Novedades", action = "peliculas", url = host)) - itemlist.append(Item(channel = item.channel, title = "Por género", action = "generos_years", url = host, extra = "Genero" )) - itemlist.append(Item(channel = item.channel, title = "Por año", action = "generos_years", url = host, extra = ">Año<")) - itemlist.append(Item(channel = item.channel, title = "Favoritas", action = "peliculas", url = host + "/favorites" )) + itemlist.append(Item(channel = item.channel, title = "Novedades", action = "peliculas", url = host, thumbnail = get_thumb("newest", auto = True))) + itemlist.append(Item(channel = item.channel, title = "Por género", action = "generos_years", url = host, extra = "Genero", thumbnail = get_thumb("genres", auto = True) )) + itemlist.append(Item(channel = item.channel, title = "Por año", action = "generos_years", url = host, extra = ">Año<", thumbnail = get_thumb("year", auto = True))) + itemlist.append(Item(channel = item.channel, title = "Favoritas", action = "peliculas", url = host + "/favorites", thumbnail = get_thumb("favorites", auto = True) )) itemlist.append(Item(channel = item.channel, title = "")) - itemlist.append(Item(channel = item.channel, title = "Buscar", action = "search", url = host + "?s=")) + itemlist.append(Item(channel = item.channel, title = "Buscar", action = "search", url = host + "?s=", thumbnail = get_thumb("search", auto = True))) return itemlist def newest(categoria): From 82752a818ce948de7cdf62482f0fedb68382fedf Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 26 Feb 2018 15:40:08 -0500 Subject: [PATCH 05/16] streamcherry: fix --- plugin.video.alfa/servers/streamcherry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/streamcherry.py b/plugin.video.alfa/servers/streamcherry.py index 5aa5f7e0..a0fea5ec 100644 --- a/plugin.video.alfa/servers/streamcherry.py +++ b/plugin.video.alfa/servers/streamcherry.py @@ -32,7 +32,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= for ext, encoded, code, quality in matches: media_url = decode(encoded, int(code)) - + media_url = media_url.replace("@","") if not media_url.startswith("http"): media_url = "http:" + media_url video_urls.append([".%s %sp [streamcherry]" % (ext, quality), media_url]) From f402610023fca62d277e0a4df0f791ce2ddb6334 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 26 Feb 2018 15:40:34 -0500 Subject: [PATCH 06/16] streamango: fix --- plugin.video.alfa/servers/streamango.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/streamango.py b/plugin.video.alfa/servers/streamango.py index a08f765c..703961e9 100755 --- a/plugin.video.alfa/servers/streamango.py +++ b/plugin.video.alfa/servers/streamango.py @@ -27,7 +27,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= for ext, encoded, code, quality in matches: media_url = decode(encoded, int(code)) - + media_url = media_url.replace("@","") if not media_url.startswith("http"): media_url = "http:" + media_url video_urls.append([".%s %sp [streamango]" % (ext, quality), media_url]) From 936628a9c451f0b964dfd28110d762765e928b77 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 26 Feb 2018 17:12:31 -0500 Subject: [PATCH 07/16] pepecine: dominio actualizado --- plugin.video.alfa/channels/pepecine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/channels/pepecine.py b/plugin.video.alfa/channels/pepecine.py index 4ee8ed34..c1e42e78 100755 --- a/plugin.video.alfa/channels/pepecine.py +++ b/plugin.video.alfa/channels/pepecine.py @@ -14,7 +14,7 @@ from core import tmdb from core.item import Item, InfoLabels from platformcode import config, logger -host = "https://pepecine.tv" +host = "https://pepecine.info" perpage = 20 def mainlist1(item): @@ -29,7 +29,7 @@ def mainlist(item): itemlist = [] itemlist.append(Item(channel=item.channel, title="Ultimas", - url=host+'/tv-peliculas-online', + url=host+'/peliculas-tv-online', action='list_latest', indexp=1, type='movie')) From 800a89c24b76b2a934473019c3f5a050412cf3db Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 27 Feb 2018 08:56:08 -0500 Subject: [PATCH 08/16] =?UTF-8?q?divxtotal:=20cambio=20est=C3=A9tico=20en?= =?UTF-8?q?=20el=20c=C3=B3digo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.video.alfa/channels/divxtotal.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugin.video.alfa/channels/divxtotal.py b/plugin.video.alfa/channels/divxtotal.py index 0525ac09..36aa5931 100644 --- a/plugin.video.alfa/channels/divxtotal.py +++ b/plugin.video.alfa/channels/divxtotal.py @@ -146,8 +146,6 @@ def scraper(item): except: pass - for item_tmdb in itemlist: - logger.info(str(item_tmdb.infoLabels['tmdb_id'])) return itemlist From c2085d91af2ab87e83c0154873499de23cac7482 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 27 Feb 2018 08:57:02 -0500 Subject: [PATCH 09/16] =?UTF-8?q?gnula:=20cambio=20est=C3=A9tico=20en=20el?= =?UTF-8?q?=20c=C3=B3digo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.video.alfa/channels/gnula.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/gnula.py b/plugin.video.alfa/channels/gnula.py index 5836f0d2..c7af0191 100755 --- a/plugin.video.alfa/channels/gnula.py +++ b/plugin.video.alfa/channels/gnula.py @@ -131,7 +131,7 @@ def peliculas(item): def findvideos(item): - logger.info("item=" + item.tostring()) + logger.info() itemlist = [] data = httptools.downloadpage(item.url).data item.plot = scrapertools.find_single_match(data, '
(.*?)
') From 3e767d9cb5aa240c9b84ed3f8375709aa8664489 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 27 Feb 2018 14:08:19 -0500 Subject: [PATCH 10/16] repelis: desactivado, pagina desactualizada --- plugin.video.alfa/channels/repelis.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/channels/repelis.json b/plugin.video.alfa/channels/repelis.json index 5e95dd76..825aec40 100755 --- a/plugin.video.alfa/channels/repelis.json +++ b/plugin.video.alfa/channels/repelis.json @@ -1,7 +1,7 @@ { "id": "repelis", "name": "Repelis", - "active": true, + "active": false, "adult": false, "language": ["cast", "lat"], "thumbnail": "repelis.png", @@ -21,4 +21,4 @@ "visible": true } ] -} \ No newline at end of file +} From da43a31ed27fd824f891bc3ae2559c4fa37d3d60 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 27 Feb 2018 14:09:48 -0500 Subject: [PATCH 11/16] pelisadicto: pagina no funciona --- plugin.video.alfa/channels/pelisadicto.json | 22 --------------------- 1 file changed, 22 deletions(-) delete mode 100755 plugin.video.alfa/channels/pelisadicto.json diff --git a/plugin.video.alfa/channels/pelisadicto.json b/plugin.video.alfa/channels/pelisadicto.json deleted file mode 100755 index 0d277199..00000000 --- a/plugin.video.alfa/channels/pelisadicto.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "pelisadicto", - "name": "Pelisadicto", - "active": true, - "adult": false, - "language": ["cast", "lat"], - "thumbnail": "pelisadicto.png", - "banner": "pelisadicto.png", - "categories": [ - "movie" - ], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Incluir en busqueda global", - "default": false, - "enabled": true, - "visible": true - } - ] -} \ No newline at end of file From 881efdfe84a8541836d77e3f2c0ab759d6ec19f7 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 27 Feb 2018 14:10:15 -0500 Subject: [PATCH 12/16] pelisadicto: pagina no funciona --- plugin.video.alfa/channels/pelisadicto.py | 220 ---------------------- 1 file changed, 220 deletions(-) delete mode 100755 plugin.video.alfa/channels/pelisadicto.py diff --git a/plugin.video.alfa/channels/pelisadicto.py b/plugin.video.alfa/channels/pelisadicto.py deleted file mode 100755 index 93996336..00000000 --- a/plugin.video.alfa/channels/pelisadicto.py +++ /dev/null @@ -1,220 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import urlparse - -from core import scrapertools -from core import servertools -from core.item import Item -from platformcode import config, logger - - -def mainlist(item): - logger.info() - - itemlist = [] - itemlist.append( - Item(channel=item.channel, title="Últimas agregadas", action="agregadas", url="http://pelisadicto.com", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, title="Listado por género", action="porGenero", url="http://pelisadicto.com")) - itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url="http://pelisadicto.com")) - - return itemlist - - -def porGenero(item): - logger.info() - - itemlist = [] - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Acción", url="http://pelisadicto.com/genero/Acción/1", - viewmode="movie_with_plot")) - if config.get_setting("adult_mode") != 0: - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Adulto", url="http://pelisadicto.com/genero/Adulto/1", - viewmode="movie_with_plot")) - itemlist.append(Item(channel=item.channel, action="agregadas", title="Animación", - url="http://pelisadicto.com/genero/Animación/1", viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Aventura", url="http://pelisadicto.com/genero/Aventura/1", - viewmode="movie_with_plot")) - itemlist.append(Item(channel=item.channel, action="agregadas", title="Biográfico", - url="http://pelisadicto.com/genero/Biográfico/1", viewmode="movie_with_plot")) - itemlist.append(Item(channel=item.channel, action="agregadas", title="Ciencia Ficción", - url="http://pelisadicto.com/genero/Ciencia Ficción/1", viewmode="movie_with_plot")) - itemlist.append(Item(channel=item.channel, action="agregadas", title="Cine Negro", - url="http://pelisadicto.com/genero/Cine Negro/1", viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Comedia", url="http://pelisadicto.com/genero/Comedia/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Corto", url="http://pelisadicto.com/genero/Corto/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Crimen", url="http://pelisadicto.com/genero/Crimen/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Deporte", url="http://pelisadicto.com/genero/Deporte/1", - viewmode="movie_with_plot")) - itemlist.append(Item(channel=item.channel, action="agregadas", title="Documental", - url="http://pelisadicto.com/genero/Documental/1", viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Drama", url="http://pelisadicto.com/genero/Drama/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Familiar", url="http://pelisadicto.com/genero/Familiar/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Fantasía", url="http://pelisadicto.com/genero/Fantasía/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Guerra", url="http://pelisadicto.com/genero/Guerra/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Historia", url="http://pelisadicto.com/genero/Historia/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Misterio", url="http://pelisadicto.com/genero/Misterio/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Música", url="http://pelisadicto.com/genero/Música/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Musical", url="http://pelisadicto.com/genero/Musical/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Romance", url="http://pelisadicto.com/genero/Romance/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Terror", url="http://pelisadicto.com/genero/Terror/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Thriller", url="http://pelisadicto.com/genero/Thriller/1", - viewmode="movie_with_plot")) - itemlist.append( - Item(channel=item.channel, action="agregadas", title="Western", url="http://pelisadicto.com/genero/Western/1", - viewmode="movie_with_plot")) - - return itemlist - - -def search(item, texto): - logger.info() - - ''' - texto_get = texto.replace(" ","%20") - texto_post = texto.replace(" ","+") - item.url = "http://pelisadicto.com/buscar/%s?search=%s" % (texto_get,texto_post) - ''' - - texto = texto.replace(" ", "+") - item.url = "http://pelisadicto.com/buscar/%s" % texto - - try: - return agregadas(item) - # Se captura la excepci?n, para no interrumpir al buscador global si un canal falla - except: - import sys - for line in sys.exc_info(): - logger.error("%s" % line) - return [] - - -def agregadas(item): - logger.info() - itemlist = [] - ''' - # Descarga la pagina - if "?search=" in item.url: - url_search = item.url.split("?search=") - data = scrapertools.cache_page(url_search[0], url_search[1]) - else: - data = scrapertools.cache_page(item.url) - logger.info("data="+data) - ''' - - data = scrapertools.cache_page(item.url) - # logger.info("data="+data) - - # Extrae las entradas - fichas = re.sub(r"\n|\s{2}", "", scrapertools.get_match(data, '
    (.*?)
')) - - #
  • 101 dálmatas
    DVD
    101 dálmatas
  • - - patron = 'href="([^"]+)".*?' # url - patron += 'src="([^"]+)" ' # thumbnail - patron += 'alt="([^"]+)' # title - - matches = re.compile(patron, re.DOTALL).findall(fichas) - for url, thumbnail, title 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)) - - # Paginación - try: - - # - - current_page_number = int(scrapertools.get_match(item.url, '/(\d+)$')) - item.url = re.sub(r"\d+$", "%s", item.url) - next_page_number = current_page_number + 1 - next_page = item.url % (next_page_number) - itemlist.append(Item(channel=item.channel, action="agregadas", title="Página siguiente >>", url=next_page, - viewmode="movie_with_plot")) - except: - pass - - return itemlist - - -def findvideos(item): - logger.info() - - itemlist = [] - plot = "" - - data = re.sub(r"\n|\s{2}", "", scrapertools.cache_page(item.url)) - - #

    Sinopsis de 101 dálmatas

    Pongo y Perdita, los dálmatas protagonistas, son una feliz pareja canina que vive rodeada de sus cachorros y con sus amos Roger y Anita. Pero su felicidad está amenazada. Cruella de Ville, una pérfida mujer que vive en una gran mansión y adora los abrigos de pieles, se entera de que los protagonistas tienen quince cachorros dálmatas. Entonces, la idea de secuestrarlos para hacerse un exclusivo abrigo de pieles se convierte en una obsesión enfermiza. Para hacer realidad su sueño contrata a dos ladrones.

    - - patron = " " - patron += "

    [^<]+

    " - patron += "

    ([^<]+)

    " - matches = re.compile(patron, re.DOTALL).findall(data) - if matches: - plot = matches[0] - - # Descarga la pagina - data = scrapertools.cache_page(item.url) - patron = '.*?' - patron += '(.*?).*?(.*?).*?' - matches = re.compile(patron, re.DOTALL).findall(data) - for scrapedidioma, scrapedcalidad, scrapedserver, scrapedurl in matches: - idioma = "" - if "/img/1.png" in scrapedidioma: idioma = "Castellano" - if "/img/2.png" in scrapedidioma: idioma = "Latino" - if "/img/3.png" in scrapedidioma: idioma = "Subtitulado" - title = item.title + " [" + scrapedcalidad + "][" + idioma + "][" + scrapedserver + "]" - - itemlist.append( - Item(channel=item.channel, action="play", title=title, fulltitle=title, url=scrapedurl, thumbnail="", - plot=plot, show=item.show)) - return itemlist - - -def play(item): - logger.info() - - itemlist = servertools.find_video_items(data=item.url) - - for videoitem in itemlist: - videoitem.title = item.title - videoitem.fulltitle = item.fulltitle - videoitem.thumbnail = item.thumbnail - videoitem.channel = item.channel - - return itemlist From 00a2a19131eb1cbebd97d79af7043005fbde17a2 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 27 Feb 2018 14:22:57 -0500 Subject: [PATCH 13/16] seriesadicto: pagina no funciona --- plugin.video.alfa/channels/seriesadicto.py | 224 --------------------- 1 file changed, 224 deletions(-) delete mode 100755 plugin.video.alfa/channels/seriesadicto.py diff --git a/plugin.video.alfa/channels/seriesadicto.py b/plugin.video.alfa/channels/seriesadicto.py deleted file mode 100755 index 12c0be77..00000000 --- a/plugin.video.alfa/channels/seriesadicto.py +++ /dev/null @@ -1,224 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import urlparse - -from core import scrapertools -from core import servertools -from core.item import Item -from platformcode import config, logger - - -def mainlist(item): - logger.info() - - itemlist = [] - itemlist.append( - Item(channel=item.channel, action="letras", title="Todas por orden alfabético", url="http://seriesadicto.com/", - folder=True)) - itemlist.append(Item(channel=item.channel, action="search", title="Buscar...")) - return itemlist - - -def search(item, texto): - logger.info() - texto = texto.replace(" ", "+") - item.url = "http://seriesadicto.com/buscar/" + texto - - try: - return series(item) - # Se captura la excepci?n, para no interrumpir al buscador global si un canal falla - except: - import sys - for line in sys.exc_info(): - logger.error("%s" % line) - return [] - - -def letras(item): - logger.info() - itemlist = [] - - # Descarga la página - data = scrapertools.cachePage(item.url) - data = scrapertools.find_single_match(data, '(.*?)') - logger.info("data=" + data) - - patronvideos = '
  • ([^<]+)' - matches = re.compile(patronvideos, re.DOTALL).findall(data) - - for scrapedurl, scrapedtitle in matches: - title = scrapedtitle - plot = "" - url = urlparse.urljoin(item.url, scrapedurl) - thumbnail = "" - logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]") - - itemlist.append( - Item(channel=item.channel, action='series', title=title, url=url, thumbnail=thumbnail, plot=plot)) - - return itemlist - - -def series(item): - logger.info() - itemlist = [] - - ''' -
  • - - Justicia ciega ( Blind Justuce ) - ''' - - data = scrapertools.cachePage(item.url) - logger.info("data=" + data) - - patron = '
  • - Saving Hope 1x02 -
    - -    - - ''' - - data = scrapertools.cachePage(item.url) - - patron = ' 0: - itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url, - action="add_serie_to_library", extra="episodios", show=item.show)) - itemlist.append(Item(channel=item.channel, title="Descargar todos los episodios de la serie", url=item.url, - action="download_all_episodes", extra="episodios", show=item.show)) - - return itemlist - - -def extrae_idiomas(bloqueidiomas): - logger.info("idiomas=" + bloqueidiomas) - patronidiomas = '([a-z0-9]+).png"' - idiomas = re.compile(patronidiomas, re.DOTALL).findall(bloqueidiomas) - textoidiomas = "" - language=[] - for idioma in idiomas: - if idioma == "1": - textoidiomas = textoidiomas + "Español" + "/" - if idioma == "2": - textoidiomas = textoidiomas + "Latino" + "/" - if idioma == "3": - textoidiomas = textoidiomas + "VOSE" + "/" - if idioma == "4": - textoidiomas = textoidiomas + "VO" + "/" - language.append(codigo_a_idioma(idioma)) - textoidiomas = textoidiomas[:-1] - return textoidiomas, language - - -def codigo_a_idioma(codigo): - idioma = "" - if codigo == "1": - idioma = "Español" - if codigo == "2": - idioma = "Latino" - if codigo == "3": - idioma = "VOSE" - if codigo == "4": - idioma = "VO" - - return idioma - - -def findvideos(item): - logger.info() - itemlist = [] - - ''' - - - Nowvideo - Reproducir - - - ''' - # Descarga la pagina - data = scrapertools.cachePage(item.url) - - patron = ' Date: Tue, 27 Feb 2018 14:23:20 -0500 Subject: [PATCH 14/16] seriesadicto: pagina no funciona --- plugin.video.alfa/channels/seriesadicto.json | 23 -------------------- 1 file changed, 23 deletions(-) delete mode 100755 plugin.video.alfa/channels/seriesadicto.json diff --git a/plugin.video.alfa/channels/seriesadicto.json b/plugin.video.alfa/channels/seriesadicto.json deleted file mode 100755 index 7abc9e4b..00000000 --- a/plugin.video.alfa/channels/seriesadicto.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id": "seriesadicto", - "name": "Seriesadicto", - "active": true, - "adult": false, - "language": ["cast"], - "thumbnail": "seriesadicto.png", - "banner": "seriesadicto.png", - "categories": [ - "tvshow", - "anime" - ], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Incluir en busqueda global", - "default": false, - "enabled": true, - "visible": true - } - ] -} \ No newline at end of file From fb6d9600757b358363b31ed5bd50bffd25ffd92f Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 1 Mar 2018 14:28:54 -0500 Subject: [PATCH 15/16] unify: limpieza de log --- plugin.video.alfa/platformcode/unify.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/plugin.video.alfa/platformcode/unify.py b/plugin.video.alfa/platformcode/unify.py index f11cadc7..c153a9e1 100644 --- a/plugin.video.alfa/platformcode/unify.py +++ b/plugin.video.alfa/platformcode/unify.py @@ -5,6 +5,8 @@ # Herramientas responsables de unificar diferentes tipos de # datos obtenidos de las paginas # ---------------------------------------------------------- +# -*- Created for Alfa-addon -*- +# -*- By the Alfa Develop Group -*- import os import sys @@ -90,7 +92,7 @@ thumb_dict = {"movies": "https://s10.postimg.org/fxtqzdog9/peliculas.png", } def set_genre(string): - logger.info() + #logger.info() genres_dict = {'accion':['accion', 'action', 'accion y aventura', 'action & adventure'], 'adultos':['adultos', 'adultos +', 'adulto'], @@ -131,7 +133,8 @@ def set_genre(string): return string def remove_format(string): - logger.info() + #logger.info() + #logger.debug('entra en remove: %s' % string) string = string.rstrip() string = re.sub(r'(\[|\[\/)(?:color|COLOR|b|B|i|I).*?\]|\[|\]|\(|\)|\:|\.', '', string) @@ -139,8 +142,8 @@ def remove_format(string): return string def simplify(string): + #logger.info() - logger.info() #logger.debug('entra en simplify: %s'%string) string = remove_format(string) string = string.replace('-',' ').replace('_',' ') @@ -155,7 +158,6 @@ def simplify(string): return string def add_languages(title, languages): - logger.info() if isinstance(languages, list): for language in languages: @@ -165,7 +167,6 @@ def add_languages(title, languages): return title def set_color(title, category): - logger.info() color_scheme = {'otro': 'white'} @@ -199,7 +200,6 @@ def set_color(title, category): return title def set_lang(language): - logger.info() cast =['castellano','espanol','cast','esp','espaol', 'es','zc', 'spa', 'spanish', 'vc'] lat=['latino','lat','la', 'espanol latino', 'espaol latino', 'zl', 'mx', 'co', 'vl'] @@ -234,10 +234,8 @@ def set_lang(language): - - def title_format(item): - logger.info() + #logger.info() lang = False valid = True @@ -446,7 +444,6 @@ def title_format(item): return item def thumbnail_type(item): - logger.info() # Se comprueba que tipo de thumbnail se utilizara en findvideos, # Poster o Logo del servidor From b817ba40e8cce2922597144e1cb3d8976c262e6e Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 2 Mar 2018 16:02:14 -0500 Subject: [PATCH 16/16] Update unify.py --- plugin.video.alfa/platformcode/unify.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugin.video.alfa/platformcode/unify.py b/plugin.video.alfa/platformcode/unify.py index c153a9e1..44354f12 100644 --- a/plugin.video.alfa/platformcode/unify.py +++ b/plugin.video.alfa/platformcode/unify.py @@ -5,8 +5,6 @@ # Herramientas responsables de unificar diferentes tipos de # datos obtenidos de las paginas # ---------------------------------------------------------- -# -*- Created for Alfa-addon -*- -# -*- By the Alfa Develop Group -*- import os import sys @@ -134,7 +132,6 @@ def set_genre(string): def remove_format(string): #logger.info() - #logger.debug('entra en remove: %s' % string) string = string.rstrip() string = re.sub(r'(\[|\[\/)(?:color|COLOR|b|B|i|I).*?\]|\[|\]|\(|\)|\:|\.', '', string) @@ -142,8 +139,8 @@ def remove_format(string): return string def simplify(string): - #logger.info() + #logger.info() #logger.debug('entra en simplify: %s'%string) string = remove_format(string) string = string.replace('-',' ').replace('_',' ') @@ -158,6 +155,7 @@ def simplify(string): return string def add_languages(title, languages): + #logger.info() if isinstance(languages, list): for language in languages: @@ -167,6 +165,7 @@ def add_languages(title, languages): return title def set_color(title, category): + #logger.info() color_scheme = {'otro': 'white'} @@ -200,6 +199,7 @@ def set_color(title, category): return title def set_lang(language): + #logger.info() cast =['castellano','espanol','cast','esp','espaol', 'es','zc', 'spa', 'spanish', 'vc'] lat=['latino','lat','la', 'espanol latino', 'espaol latino', 'zl', 'mx', 'co', 'vl'] @@ -234,6 +234,8 @@ def set_lang(language): + + def title_format(item): #logger.info() @@ -347,7 +349,7 @@ def title_format(item): else: simple_language = '' - item.language = simple_language + #item.language = simple_language # Damos formato al año si existiera y lo agregamos # al titulo excepto que sea un episodio @@ -444,6 +446,7 @@ def title_format(item): return item def thumbnail_type(item): + #logger.info() # Se comprueba que tipo de thumbnail se utilizara en findvideos, # Poster o Logo del servidor