From 9eadf04e3bae00dca58257576c703ff7961798c6 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 25 Jan 2018 17:41:50 -0500 Subject: [PATCH 01/15] logger: for mediaserver --- mediaserver/platformcode/logger.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mediaserver/platformcode/logger.py b/mediaserver/platformcode/logger.py index 51bd7b0b..8a2e0846 100644 --- a/mediaserver/platformcode/logger.py +++ b/mediaserver/platformcode/logger.py @@ -46,3 +46,8 @@ def debug(texto=""): def error(texto=""): logger_object.error(unicode(str(texto), "utf-8", "ignore").replace("\n", "\n" + " " * 67)) + + +class WebErrorException(Exception): + def __init__(self, *args, **kwargs): + Exception.__init__(self, *args, **kwargs) From efdc770d3b0e06023fd26983c96ddbac5fa54b3d Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 25 Jan 2018 17:42:55 -0500 Subject: [PATCH 02/15] clipwatching: updated test_video_exists --- plugin.video.alfa/servers/clipwatching.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugin.video.alfa/servers/clipwatching.py b/plugin.video.alfa/servers/clipwatching.py index 7a8139e8..a954f252 100644 --- a/plugin.video.alfa/servers/clipwatching.py +++ b/plugin.video.alfa/servers/clipwatching.py @@ -8,10 +8,8 @@ from platformcode import logger def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) data = httptools.downloadpage(page_url).data - if "no longer exists" in data or "to copyright issues" in data: + if "File Not Found" in data: return False, "[clipwatching] El video ha sido borrado" - if "please+try+again+later." in data: - return False, "[clipwatching] Error de clipwatching, no se puede generar el enlace al video" return True, "" From 8bf14987427c7486755768393ab9193b4e266928 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 25 Jan 2018 17:44:15 -0500 Subject: [PATCH 03/15] anitoonstv: update --- plugin.video.alfa/channels/anitoonstv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/anitoonstv.py b/plugin.video.alfa/channels/anitoonstv.py index df815baa..f273670b 100644 --- a/plugin.video.alfa/channels/anitoonstv.py +++ b/plugin.video.alfa/channels/anitoonstv.py @@ -95,7 +95,7 @@ def episodios(item): patron = '
(.+?)<\/div>
' data = scrapertools.find_single_match(data, patron) - patron_caps = "
  • Capitulo: (.+?) - (.+?)<\/a>" + patron_caps = "
  • Cap(?:i|í)tulo: (.+?) - (.+?)<\/a>" matches = scrapertools.find_multiple_matches(data, patron_caps) show = scrapertools.find_single_match(data, 'Titulo.+?<\/span>(.+?)
    ') scrapedthumbnail = scrapertools.find_single_match(data, "") From 73010c0156ce9a40b980ee82c7b6d455b9b2e7d3 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 25 Jan 2018 17:55:52 -0500 Subject: [PATCH 04/15] autoplay: updated --- plugin.video.alfa/channels/autoplay.py | 61 +++++++++++++++++++------- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/plugin.video.alfa/channels/autoplay.py b/plugin.video.alfa/channels/autoplay.py index a901ed7a..eadc9577 100644 --- a/plugin.video.alfa/channels/autoplay.py +++ b/plugin.video.alfa/channels/autoplay.py @@ -54,7 +54,7 @@ def show_option(channel, itemlist, text_color='yellow', thumbnail=None, fanart=N fanart = 'https://s7.postimg.org/65ooga04b/Auto_Play.png' plot_autoplay = 'AutoPlay permite auto reproducir los enlaces directamente, basándose en la configuracion de tus ' \ - 'servidores y calidades preferidas. ' + 'servidores y calidades favoritas. ' itemlist.append( Item(channel=__channel__, title="Configurar AutoPlay", @@ -79,8 +79,6 @@ def start(itemlist, item): :return: intenta autoreproducir, en caso de fallar devuelve el itemlist que recibio en un principio ''' logger.info() - logger.debug('item inicial %s' % item) - if not config.is_xbmc(): #platformtools.dialog_notification('AutoPlay ERROR', 'Sólo disponible para XBMC/Kodi') @@ -105,6 +103,7 @@ def start(itemlist, item): if settings_node['active']: url_list_valid = [] autoplay_list = [] + autoplay_b = [] favorite_servers = [] favorite_quality = [] @@ -118,7 +117,7 @@ def start(itemlist, item): config.set_setting("player_mode", 0) # Informa que AutoPlay esta activo - platformtools.dialog_notification('AutoPlay Activo', '', sound=False) + #platformtools.dialog_notification('AutoPlay Activo', '', sound=False) # Prioridades a la hora de ordenar itemlist: # 0: Servidores y calidades @@ -152,6 +151,7 @@ def start(itemlist, item): # Se filtran los enlaces de itemlist y que se correspondan con los valores de autoplay for item in itemlist: autoplay_elem = dict() + b_dict = dict() # Comprobamos q se trata de un item de video if 'server' not in item: @@ -177,6 +177,9 @@ def start(itemlist, item): # descartamos el item if item.server not in favorite_servers or item.quality not in favorite_quality \ or item.url in url_list_valid: + item.type_b = True + b_dict['videoitem']= item + autoplay_b.append(b_dict) continue autoplay_elem["indice_server"] = favorite_servers.index(item.server) autoplay_elem["indice_quality"] = favorite_quality.index(item.quality) @@ -186,6 +189,9 @@ def start(itemlist, item): # si el servidor no se encuentra en la lista de favoritos o la url esta repetida, # descartamos el item if item.server not in favorite_servers or item.url in url_list_valid: + item.type_b = True + b_dict['videoitem'] = item + autoplay_b.append(b_dict) continue autoplay_elem["indice_server"] = favorite_servers.index(item.server) @@ -194,6 +200,9 @@ def start(itemlist, item): # si la calidad no se encuentra en la lista de favoritos o la url esta repetida, # descartamos el item if item.quality not in favorite_quality or item.url in url_list_valid: + item.type_b = True + b_dict['videoitem'] = item + autoplay_b.append(b_dict) continue autoplay_elem["indice_quality"] = favorite_quality.index(item.quality) @@ -205,6 +214,7 @@ def start(itemlist, item): # Si el item llega hasta aqui lo añadimos al listado de urls validas y a autoplay_list url_list_valid.append(item.url) + item.plan_b=True autoplay_elem['videoitem'] = item # autoplay_elem['server'] = item.server # autoplay_elem['quality'] = item.quality @@ -223,9 +233,17 @@ def start(itemlist, item): elif priority == 3: # Solo calidades autoplay_list.sort(key=lambda orden: orden['indice_quality']) + # Se prepara el plan b, en caso de estar activo se agregan los elementos no favoritos al final + plan_b = settings_node['plan_b'] + ready = False + text_b = '' + if plan_b: + autoplay_list.extend(autoplay_b) # Si hay elementos en la lista de autoplay se intenta reproducir cada elemento, hasta encontrar uno # funcional o fallen todos - if autoplay_list: + + if autoplay_list or (plan_b and autoplay_b): + played = False max_intentos = 5 max_intentos_servers = {} @@ -236,6 +254,10 @@ def start(itemlist, item): for autoplay_elem in autoplay_list: play_item = Item + + # Si no es un elemento favorito si agrega el texto plan b + if autoplay_elem['videoitem'].type_b: + text_b = '(Plan B)' if not platformtools.is_playing() and not played: videoitem = autoplay_elem['videoitem'] logger.debug('videoitem %s' % videoitem) @@ -250,7 +272,7 @@ def start(itemlist, item): if hasattr(videoitem, 'language') and videoitem.language != "": lang = " '%s' " % videoitem.language - platformtools.dialog_notification("AutoPlay", "%s%s%s" % ( + platformtools.dialog_notification("AutoPlay %s" %text_b, "%s%s%s" % ( videoitem.server.upper(), lang, videoitem.quality.upper()), sound=False) # TODO videoitem.server es el id del server, pero podria no ser el nombre!!! @@ -282,12 +304,11 @@ def start(itemlist, item): except: pass - try: if platformtools.is_playing(): played = True break - except: # TODO evitar el informe de que el conector fallo o el video no se encuentra + except: logger.debug(str(len(autoplay_list))) # Si hemos llegado hasta aqui es por q no se ha podido reproducir @@ -300,9 +321,10 @@ def start(itemlist, item): if not platformtools.dialog_yesno("AutoPlay", text, "¿Desea ignorar todos los enlaces de este servidor?"): max_intentos_servers[videoitem.server] = max_intentos - logger.debug('elem: %s list %s' % (autoplay_list.index(autoplay_elem),autoplay_list[-1])) + + # Si no quedan elementos en la lista se informa if autoplay_elem == autoplay_list[-1]: - platformtools.dialog_notification('AutoPlay', 'No hubo enlaces funcionales') + platformtools.dialog_notification('AutoPlay', 'No hubo enlaces funcionales') else: platformtools.dialog_notification('AutoPlay No Fue Posible', 'No Hubo Coincidencias') @@ -470,7 +492,7 @@ def autoplay_config(item): "type": "label", "enabled": True, "visible": True} list_controls.append(separador) - # Seccion servidores Preferidos + # Seccion servidores favoritos server_list = channel_node.get("servers", []) if not server_list: enabled = False @@ -478,7 +500,7 @@ def autoplay_config(item): else: enabled = "eq(-3,true)" - custom_servers_settings = {"id": "custom_servers", "label": " Servidores Preferidos", "color": "0xff66ffcc", + custom_servers_settings = {"id": "custom_servers", "label": " Servidores favoritos", "color": "0xff66ffcc", "type": "bool", "default": False, "enabled": enabled, "visible": True} list_controls.append(custom_servers_settings) if dict_values['active'] and enabled: @@ -501,7 +523,7 @@ def autoplay_config(item): if settings_node.get("server_%s" % num, 0) > len(server_list) - 1: dict_values["server_%s" % num] = 0 - # Seccion Calidades Preferidas + # Seccion Calidades favoritas quality_list = channel_node.get("quality", []) if not quality_list: enabled = False @@ -509,7 +531,7 @@ def autoplay_config(item): else: enabled = "eq(-7,true)" - custom_quality_settings = {"id": "custom_quality", "label": " Calidades Preferidas", "color": "0xff66ffcc", + custom_quality_settings = {"id": "custom_quality", "label": " Calidades Favoritas", "color": "0xff66ffcc", "type": "bool", "default": False, "enabled": enabled, "visible": True} list_controls.append(custom_quality_settings) if dict_values['active'] and enabled: @@ -532,11 +554,20 @@ def autoplay_config(item): if settings_node.get("quality_%s" % num, 0) > len(quality_list) - 1: dict_values["quality_%s" % num] = 0 + # Plan B + dict_values['plan_b'] = settings_node.get('plan_b', False) + enabled = "eq(-4,true)|eq(-8,true)" + plan_b = {"id": "plan_b", "label": " Plan B (Si fallan los favoritos prueba otros enlaces)", + "color": "0xffffff99", + "type": "bool", "default": False, "enabled": enabled, "visible": True} + list_controls.append(plan_b) + + # Seccion Prioridades priority_list = ["Servidor y Calidad", "Calidad y Servidor"] set_priority = {"id": "priority", "label": " Prioridad (Indica el orden para Auto-Reproducir)", "color": "0xffffff99", "type": "list", "default": 0, - "enabled": True, "visible": "eq(-4,true)+eq(-8,true)+eq(-11,true)", "lvalues": priority_list} + "enabled": True, "visible": "eq(-5,true)+eq(-9,true)+eq(-12,true)", "lvalues": priority_list} list_controls.append(set_priority) dict_values["priority"] = settings_node.get("priority", 0) From 07741c9443e84baaa76b5cfaea8807c7d9fc273c Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 25 Jan 2018 17:57:24 -0500 Subject: [PATCH 05/15] thevideome: patron actualizado --- plugin.video.alfa/servers/thevideome.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin.video.alfa/servers/thevideome.json b/plugin.video.alfa/servers/thevideome.json index 06a9ef6c..673d0eed 100755 --- a/plugin.video.alfa/servers/thevideome.json +++ b/plugin.video.alfa/servers/thevideome.json @@ -6,6 +6,10 @@ { "pattern": "(?:thevideo.me|tvad.me|thevid.net)/(?:embed-|)([A-z0-9]+)", "url": "http://thevideo.me/embed-\\1.html" + }, + { + "pattern": "(?:thevideo.me|tvad.me|thevid.net|thevideo.us)/(?:embed-|)([A-z0-9]+)", + "url": "http://thevideo.me/embed-\\1.html" } ] }, From 0e3cae850dd004869d6ed5b59e99cc503c003a7c Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 26 Jan 2018 08:20:58 -0500 Subject: [PATCH 06/15] mundoflv: update servers --- plugin.video.alfa/channels/mundoflv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/mundoflv.py b/plugin.video.alfa/channels/mundoflv.py index 8eeb1dae..00b0b14a 100755 --- a/plugin.video.alfa/channels/mundoflv.py +++ b/plugin.video.alfa/channels/mundoflv.py @@ -641,7 +641,7 @@ def play(item): logger.info() data = httptools.downloadpage(item.url).data - if item.server not in ['streamplay','streame']: + if item.server not in ['streamplay','streame', 'clipwatching', 'vidoza']: url = scrapertools.find_single_match(data, '<(?:IFRAME|iframe).*?(?:SRC|src)=*([^ ]+) (?!style|STYLE)') else: url = scrapertools.find_single_match(data, '') From 4ea7f2af2ed29917cf33037df2c30661af6422b4 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 26 Jan 2018 09:01:16 -0500 Subject: [PATCH 07/15] videowood: updated --- plugin.video.alfa/servers/videowood.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/plugin.video.alfa/servers/videowood.py b/plugin.video.alfa/servers/videowood.py index d73d5cc2..e9d86825 100755 --- a/plugin.video.alfa/servers/videowood.py +++ b/plugin.video.alfa/servers/videowood.py @@ -1,34 +1,26 @@ # -*- coding: utf-8 -*- +from aadecode import decode as aadecode from core import scrapertools +from core import httptools from platformcode import logger def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) - - data = scrapertools.cache_page(page_url) - + data = httptools.downloadpage(page_url).data if "This video doesn't exist." in data: - return False, 'The requested video was not found.' - + return False, '[videowood] El video no puede ser encontrado o ha sido eliminado.' return True, "" def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("url=" + page_url) video_urls = [] - - data = scrapertools.cache_page(page_url) + data = httptools.downloadpage(page_url).data text_encode = scrapertools.find_single_match(data, "(eval\(function\(p,a,c,k,e,d.*?)") - - from aadecode import decode as aadecode text_decode = aadecode(text_encode) - - # URL del vídeo patron = "'([^']+)'" media_url = scrapertools.find_single_match(text_decode, patron) - video_urls.append([media_url[-4:] + " [Videowood]", media_url]) - return video_urls From 42d0fddf378ce7d462d80ecbd7270b6c80edced7 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 26 Jan 2018 09:02:52 -0500 Subject: [PATCH 08/15] vertelenovelas: fix --- plugin.video.alfa/channels/vertelenovelas.py | 55 ++++++++++---------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/plugin.video.alfa/channels/vertelenovelas.py b/plugin.video.alfa/channels/vertelenovelas.py index acaba1a5..df0b926c 100755 --- a/plugin.video.alfa/channels/vertelenovelas.py +++ b/plugin.video.alfa/channels/vertelenovelas.py @@ -11,21 +11,17 @@ from platformcode import logger def mainlist(item): logger.info() - itemlist = [] - itemlist.append(Item(channel=item.channel, title="Catálogo", action="series", url="http://www.vertelenovelas.cc/", + itemlist.append(Item(channel=item.channel, title="Ultimos capítulos", action="ultimos", url="http://www.vertelenovelas.cc/", viewmode="movie")) itemlist.append(Item(channel=item.channel, title="Buscar", action="search")) - return itemlist def search(item, texto): logger.info() - texto = texto.replace(" ", "+") item.url = "http://www.vertelenovelas.cc/ajax/autocompletex.php?q=" + texto - try: return series(item) @@ -37,16 +33,38 @@ def search(item, texto): return [] + +def ultimos(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + patron = '' + matches = re.compile(patron, re.DOTALL).findall(data) + for match in matches: + title = scrapertools.find_single_match(match, '([^<]+)') + if title == "": + title = scrapertools.find_single_match(match, '
    ([^<]+)') + url = urlparse.urljoin(item.url, scrapertools.find_single_match(match, '

  • ([^<]+)' - matches = re.compile(patron, re.DOTALL).findall(data) - for scrapedurl, scrapedtitle in matches: title = scrapertools.htmlclean(scrapedtitle) - plot = "" - thumbnail = "" url = urlparse.urljoin(item.url, scrapedurl) - - logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]") itemlist.append( - Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=thumbnail, plot=plot, + Item(channel=item.channel, action="findvideos", title=title, url=url, folder=True, fulltitle=title)) - return itemlist def findvideos(item): logger.info() data = httptools.downloadpage(item.url).data - pattern = 'data-id="([^"]+)"' list_servers = re.compile(pattern, re.DOTALL).findall(data) - - logger.debug("llist_servers %s" % list_servers) list_urls = [] - for _id in list_servers: post = "id=%s" % _id data = httptools.downloadpage("http://www.vertelenovelas.cc/goto/", post=post).data list_urls.append(scrapertools.find_single_match(data, 'document\.location = "([^"]+)";')) - from core import servertools itemlist = servertools.find_video_items(data=", ".join(list_urls)) for videoitem in itemlist: # videoitem.title = item.title videoitem.channel = item.channel - return itemlist From 95c3f619af00a67c6f30d60ee0a98a3b6fad5672 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 26 Jan 2018 12:05:38 -0500 Subject: [PATCH 09/15] sendvid: fix --- plugin.video.alfa/servers/sendvid.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/plugin.video.alfa/servers/sendvid.py b/plugin.video.alfa/servers/sendvid.py index 2d0ac02a..cf9ba80d 100755 --- a/plugin.video.alfa/servers/sendvid.py +++ b/plugin.video.alfa/servers/sendvid.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +from core import httptools from core import scrapertools from platformcode import logger @@ -10,28 +11,19 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("(page_url='%s')" % page_url) - video_urls = [] - - data = scrapertools.cache_page(page_url) - # var video_source = "//cache-2.sendvid.com/1v0chsus.mp4"; - - media_url = "http:" + scrapertools.find_single_match(data, 'var\s+video_source\s+\=\s+"([^"]+)"') - + data = scrapertools.httptools.downloadpage(page_url).data + media_url = scrapertools.find_single_match(data, 'var\s+video_source\s+\=\s+"([^"]+)"') if "cache-1" in media_url: video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " (cache1) [sendvid]", media_url]) video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " (cache2) [sendvid]", media_url.replace("cache-1", "cache-2")]) - elif "cache-2" in media_url: video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " (cache1) [sendvid]", media_url.replace("cache-2", "cache-1")]) video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " (cache2) [sendvid]", media_url]) - else: video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [sendvid]", media_url]) - for video_url in video_urls: logger.info("%s - %s" % (video_url[0], video_url[1])) - return video_urls From e24311b20e297031a8aefede0f85e37af11b77c2 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 26 Jan 2018 16:50:51 -0500 Subject: [PATCH 10/15] animeid: fix --- plugin.video.alfa/channels/animeid.py | 225 +++++++------------------- 1 file changed, 62 insertions(+), 163 deletions(-) diff --git a/plugin.video.alfa/channels/animeid.py b/plugin.video.alfa/channels/animeid.py index 520d8c3c..5a9400ca 100755 --- a/plugin.video.alfa/channels/animeid.py +++ b/plugin.video.alfa/channels/animeid.py @@ -4,25 +4,25 @@ import re import urlparse from core import httptools +from core import jsontools from core import scrapertools +from core import servertools from core.item import Item from platformcode import config, logger -CHANNEL_HOST = "http://animeid.tv/" - +CHANNEL_HOST = "https://www.animeid.tv/" def mainlist(item): logger.info() - itemlist = list() itemlist.append( - Item(channel=item.channel, action="novedades_series", title="Últimas series", url="http://www.animeid.tv/")) + Item(channel=item.channel, action="novedades_series", title="Últimas series", url=CHANNEL_HOST)) itemlist.append(Item(channel=item.channel, action="novedades_episodios", title="Últimos episodios", - url="http://www.animeid.tv/", viewmode="movie_with_plot")) + url=CHANNEL_HOST, viewmode="movie_with_plot")) itemlist.append( - Item(channel=item.channel, action="generos", title="Listado por genero", url="http://www.animeid.tv/")) + Item(channel=item.channel, action="generos", title="Listado por genero", url=CHANNEL_HOST)) itemlist.append( - Item(channel=item.channel, action="letras", title="Listado alfabetico", url="http://www.animeid.tv/")) + Item(channel=item.channel, action="letras", title="Listado alfabetico", url=CHANNEL_HOST)) itemlist.append(Item(channel=item.channel, action="search", title="Buscar...")) return itemlist @@ -33,7 +33,7 @@ def newest(categoria): item = Item() try: if categoria == 'anime': - item.url = "http://animeid.tv/" + item.url = CHANNEL_HOST itemlist = novedades_episodios(item) # Se captura la excepción, para no interrumpir al canal novedades si un canal falla except: @@ -50,19 +50,17 @@ def search(item, texto): itemlist = [] if item.url == "": - item.url = "http://www.animeid.tv/ajax/search?q=" + item.url = CHANNEL_HOST + "ajax/search?q=" texto = texto.replace(" ", "+") item.url = item.url + texto try: headers = [] headers.append( ["User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20100101 Firefox/19.0"]) - headers.append(["Referer", "http://www.animeid.tv/"]) + headers.append(["Referer", CHANNEL_HOST]) headers.append(["X-Requested-With", "XMLHttpRequest"]) data = scrapertools.cache_page(item.url, headers=headers) data = data.replace("\\", "") - logger.debug("data=" + data) - patron = '{"id":"([^"]+)","text":"([^"]+)","date":"[^"]*","image":"([^"]+)","link":"([^"]+)"}' matches = re.compile(patron, re.DOTALL).findall(data) @@ -71,8 +69,6 @@ def search(item, texto): url = urlparse.urljoin(item.url, scrapedurl) thumbnail = scrapedthumbnail plot = "" - logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]") - itemlist.append( Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail, plot=plot, show=title, viewmode="movie_with_plot")) @@ -89,240 +85,146 @@ def search(item, texto): def novedades_series(item): logger.info() - - # Descarga la pagina - data = httptools.downloadpage(item.url).data - data = scrapertools.get_match(data, '
    (.*?)
    ') - patronvideos = '
  • ([^<]+)([^<]+)' - matches = re.compile(patronvideos, re.DOTALL).findall(data) itemlist = [] - + data = httptools.downloadpage(item.url).data + data = scrapertools.find_single_match(data, '
    (.*?)
    ') + patronvideos = '(?s)
    .*?tipo\d+">([^<]+).*?([^<]+)' + matches = re.compile(patronvideos, re.DOTALL).findall(data) for url, tipo, title in matches: scrapedtitle = title + " (" + tipo + ")" scrapedurl = urlparse.urljoin(item.url, url) - scrapedthumbnail = "" - scrapedplot = "" - logger.debug("title=[" + scrapedtitle + "], url=[" + scrapedurl + "], thumbnail=[" + scrapedthumbnail + "]") - itemlist.append(Item(channel=item.channel, action="episodios", title=scrapedtitle, url=scrapedurl, - thumbnail=scrapedthumbnail, plot=scrapedplot, show=title, viewmode="movie_with_plot")) - + show=title, viewmode="movie_with_plot")) return itemlist def novedades_episodios(item): logger.info() - - # Descarga la pagina - #
    Uchuu Kyoudai #35
    Uchuu Kyoudai

    Una noche en el año 2006, cuando eran jovenes, los dos hermanos Mutta (el mayor) y Hibito (el menor) vieron un OVNI que hiba en dirección hacia la luna. Esa misma noche decidieron que ellos se convertirian en astronautas y irian al espacio exterior. En el año 2050, Hibito se ha convertido en astronauta y que ademas está incluido en una misión que irá a la luna. En cambio Mutta siguió una carrera mas tradicional, y terminó trabajando en una compañia de fabricación de automoviles. Sin embargo, Mutta termina arruinando su carrera por ciertos problemas que tiene con su jefe. Ahora bien, no sólo perdió su trabajo si no que fue incluido en la lista negra de la industria laboral. Pueda ser que esta sea su unica oportunidad que tenga Mutta de volver a perseguir su sueño de la infancia y convertirse en astronauta, al igual que su perqueño hermano Hibito.

    - # (.*?)') - - patronvideos = '[^<]+
    ([^<]+)
    [^<]+
    ]+src="([^"]+)"[\s\S]+?

    (.+?)

    ' + data = scrapertools.find_single_match(data, '
    (.*?)
    ') + patronvideos = '(?s)
    [^<]+
    ([^<]+).*?src="([^"]+)"[\s\S]+?

    (.+?)

    ' matches = re.compile(patronvideos, re.DOTALL).findall(data) itemlist = [] - for url, title, thumbnail, plot in matches: scrapedtitle = scrapertools.entityunescape(title) scrapedurl = urlparse.urljoin(item.url, url) scrapedthumbnail = thumbnail scrapedplot = plot - logger.debug("title=[" + scrapedtitle + "], url=[" + scrapedurl + "], thumbnail=[" + scrapedthumbnail + "]") - - episodio = scrapertools.get_match(scrapedtitle, '\s+#(.*?)$') + episodio = scrapertools.find_single_match(scrapedtitle, '\s+#(.*?)$') contentTitle = scrapedtitle.replace('#' + episodio, '') - itemlist.append(Item(channel=item.channel, action="findvideos", title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail, plot=scrapedplot, contentSeason=1, contentTitle=contentTitle)) - return itemlist def generos(item): logger.info() - - # Descarga la pagina - data = httptools.downloadpage(item.url).data - data = scrapertools.get_match(data, '
    (.*?)
    ') - patronvideos = '
  • ([^<]+)' - matches = re.compile(patronvideos, re.DOTALL).findall(data) itemlist = [] - + data = httptools.downloadpage(item.url).data + data = scrapertools.find_single_match(data, '
    (.*?)
    ') + patronvideos = '(?s)([^<]+)' + matches = re.compile(patronvideos, re.DOTALL).findall(data) for url, title in matches: scrapedtitle = title scrapedurl = urlparse.urljoin(item.url, url) scrapedthumbnail = "" scrapedplot = "" - logger.debug("title=[" + scrapedtitle + "], url=[" + scrapedurl + "], thumbnail=[" + scrapedthumbnail + "]") - itemlist.append( Item(channel=item.channel, action="series", title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail, plot=scrapedplot, show=title, viewmode="movie_with_plot")) - return itemlist def letras(item): logger.info() - - # Descarga la pagina data = httptools.downloadpage(item.url).data - data = scrapertools.get_match(data, '
      (.*?)
    ') + data = scrapertools.find_single_match(data, '
      (.*?)
    ') patronvideos = '
  • ([^<]+)' matches = re.compile(patronvideos, re.DOTALL).findall(data) itemlist = [] - for url, title in matches: scrapedtitle = title scrapedurl = urlparse.urljoin(item.url, url) - scrapedthumbnail = "" - scrapedplot = "" - logger.debug("title=[" + scrapedtitle + "], url=[" + scrapedurl + "], thumbnail=[" + scrapedthumbnail + "]") - itemlist.append( - Item(channel=item.channel, action="series", title=scrapedtitle, url=scrapedurl, thumbnail=scrapedthumbnail, - plot=scrapedplot, show=title, viewmode="movie_with_plot")) + Item(channel=item.channel, action="series", title=scrapedtitle, url=scrapedurl, + show=title, viewmode="movie_with_plot")) return itemlist def series(item): logger.info() - - # Descarga la pagina - data = httptools.downloadpage(item.url).data - logger.debug("datito %s" % data) - - ''' -
    - -
    Aoi Sekai no Chuushin de
    -
    - -
    -
    -
    -

    - El Reino de Segua ha ido perdiendo la guerra contra el Imperio de Ninterdo pero la situación ha cambiado - con la aparición de un chico llamado Gear. Todos los personajes son parodias de protas de videojuegos de - Nintendo y Sega respectivamente, como lo son Sonic the Hedgehog, Super Mario Bros., The Legend of Zelda, - etc. -

    -
    - ''' - patron = '
  • ') + page_url = scrapertools.find_single_match(data, '
  • >
  • ') itemlist.append(Item(channel=item.channel, action="series", title=">> Página siguiente", url=urlparse.urljoin(item.url, page_url), viewmode="movie_with_plot", thumbnail="", plot="")) except: pass - return itemlist def episodios(item, final=True): logger.info() - - # Descarga la pagina - body = httptools.downloadpage(item.url).data - - try: - scrapedplot = scrapertools.get_match(body, '(.*?)') - patron = '
  • (.*?)
  • ' - matches = re.compile(patron, re.DOTALL).findall(data) itemlist = [] - - for url, title in matches: - scrapedtitle = scrapertools.htmlclean(title) - - try: - episodio = scrapertools.get_match(scrapedtitle, "Capítulo\s+(\d+)") - titulo_limpio = re.compile("Capítulo\s+(\d+)\s+", re.DOTALL).sub("", scrapedtitle) - if len(episodio) == 1: - scrapedtitle = "1x0" + episodio + " - " + titulo_limpio - else: - scrapedtitle = "1x" + episodio + " - " + titulo_limpio - except: - pass - - scrapedurl = urlparse.urljoin(item.url, url) - # scrapedthumbnail = "" - # scrapedplot = "" - logger.debug("title=[" + scrapedtitle + "], url=[" + scrapedurl + "], thumbnail=[" + scrapedthumbnail + "]") - - itemlist.append(Item(channel=item.channel, action="findvideos", title=scrapedtitle, url=scrapedurl, - thumbnail=scrapedthumbnail, plot=scrapedplot, show=item.show)) - - try: - next_page = scrapertools.get_match(body, '\>\;') - next_page = urlparse.urljoin(item.url, next_page) - item2 = Item(channel=item.channel, action="episodios", title=item.title, url=next_page, - thumbnail=item.thumbnail, plot=item.plot, show=item.show, viewmode="movie_with_plot") - itemlist.extend(episodios(item2, final=False)) - except: - import traceback - logger.error(traceback.format_exc()) - - if final and config.get_videolibrary_support(): + data = httptools.downloadpage(item.url).data + data_id = scrapertools.find_single_match(data, 'data-id="([^"]+)') + CHANNEL_HEADERS = [ + ["Host", "m.animeid.tv"], + ["X-Requested-With", "XMLHttpRequest"] + ] + page = 0 + while True: + page += 1 + u = "https://m.animeid.tv/ajax/caps?id=%s&ord=DESC&pag=%s" %(data_id, page) + data = httptools.downloadpage(u, headers=CHANNEL_HEADERS).data + # Cuando ya no hay datos devuelve: "list":[] + if '"list":[]' in data: + break + dict_data = jsontools.load(data) + list = dict_data['list'] + for dict in list: + itemlist.append(Item(action = "findvideos", + channel = item.channel, + title = "1x" + dict["numero"] + " - " + dict["date"], + url = CHANNEL_HOST + dict['href'], + thumbnail = item.thumbnail, + show = item.show, + viewmode = "movie_with_plot" + )) + if config.get_videolibrary_support(): 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 findvideos(item): logger.info() - - data = httptools.downloadpage(item.url).data itemlist = [] - + data = httptools.downloadpage(item.url).data url_anterior = scrapertools.find_single_match(data, '
  • « Capítulo anterior') url_siguiente = scrapertools.find_single_match(data, '
  • Siguiente capítulo »') - - data = scrapertools.find_single_match(data, '
      (.*?)
    ') - data = data.replace("\\/", "/") - data = data.replace("%3A", ":") - data = data.replace("%2F", "/") - logger.info("data=" + data) - - # http%3A%2F%2Fwww.animeid.moe%2Fstream%2F41TLmCj7_3q4BQLnfsban7%2F1440956023.mp4 - # http://www.animeid.moe/stream/41TLmCj7_3q4BQLnfsban7/1440956023.mp4 - # http://www.animeid.tv/stream/oiW0uG7yqBrg5TVM5Cm34n/1385370686.mp4 - patron = '(http://www.animeid.tv/stream/[^/]+/\d+.[a-z0-9]+)' - matches = re.compile(patron, re.DOTALL).findall(data) + data = scrapertools.find_single_match(data, '
      (.*?)
    ').decode("unicode-escape") + data = data.replace("\\/", "/").replace("%3A", ":").replace("%2F", "/") + patron = '(https://www.animeid.tv/stream/[^/]+/\d+.[a-z0-9]+)' + matches = scrapertools.find_multiple_matches(data, patron) encontrados = set() for url in matches: if url not in encontrados: @@ -330,15 +232,12 @@ def findvideos(item): Item(channel=item.channel, action="play", title="[directo]", server="directo", url=url, thumbnail="", plot="", show=item.show, folder=False)) encontrados.add(url) - - from core import servertools itemlist.extend(servertools.find_video_items(data=data)) for videoitem in itemlist: videoitem.channel = item.channel videoitem.action = "play" videoitem.folder = False videoitem.title = "[" + videoitem.server + "]" - if url_anterior: title_anterior = url_anterior.strip("/v/").replace('-', ' ').strip('.html') itemlist.append(Item(channel=item.channel, action="findvideos", title="Anterior: " + title_anterior, From 02c489868088554a3f582f0601107741be6bb6b8 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 26 Jan 2018 16:52:18 -0500 Subject: [PATCH 11/15] animeid: nuevo server --- plugin.video.alfa/servers/animeid.json | 42 ++++++++++++++++++++++++++ plugin.video.alfa/servers/animeid.py | 26 ++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 plugin.video.alfa/servers/animeid.json create mode 100644 plugin.video.alfa/servers/animeid.py diff --git a/plugin.video.alfa/servers/animeid.json b/plugin.video.alfa/servers/animeid.json new file mode 100644 index 00000000..73283539 --- /dev/null +++ b/plugin.video.alfa/servers/animeid.json @@ -0,0 +1,42 @@ +{ + "active": true, + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "(s[0-9]+\\.animeid.tv/\\?vid=[A-z0-9-_]+)", + "url": "https://\\1" + } + ] + }, + "free": true, + "id": "animeid", + "name": "animeid", + "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": "" +} diff --git a/plugin.video.alfa/servers/animeid.py b/plugin.video.alfa/servers/animeid.py new file mode 100644 index 00000000..eab8f678 --- /dev/null +++ b/plugin.video.alfa/servers/animeid.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +from core import httptools +from core import scrapertools +from platformcode import logger + + +def test_video_exists(page_url): + logger.info("(page_url='%s')" % page_url) + data = httptools.downloadpage(page_url).data + if "no longer exists" in data or "to copyright issues" in data: + return False, "[animeid] El video ha sido borrado" + if "please+try+again+later." in data: + return False, "[animeid] Error de animeid, no se puede generar el enlace al video" + return True, "" + + +def get_video_url(page_url, user="", password="", video_password=""): + logger.info("(page_url='%s')" % page_url) + data = httptools.downloadpage(page_url).data + video_urls = [] + label, videourl = scrapertools.find_single_match(data, 'label":"([^"]+)".*?file":"([^"]+)') + if "animeid.tv" in videourl: + videourl = httptools.downloadpage(videourl, follow_redirects=False, only_headers=True).headers.get("location", "") + video_urls.append([".MP4 " + label + " [animeid]", videourl]) + return video_urls From b27254d6952259417af1a66bbb8dbf7a69331b17 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 26 Jan 2018 17:10:39 -0500 Subject: [PATCH 12/15] filebebo: nuevo server --- plugin.video.alfa/servers/filebebo.json | 42 +++++++++++++++++++++++++ plugin.video.alfa/servers/filebebo.py | 35 +++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 plugin.video.alfa/servers/filebebo.json create mode 100644 plugin.video.alfa/servers/filebebo.py diff --git a/plugin.video.alfa/servers/filebebo.json b/plugin.video.alfa/servers/filebebo.json new file mode 100644 index 00000000..d6e43254 --- /dev/null +++ b/plugin.video.alfa/servers/filebebo.json @@ -0,0 +1,42 @@ +{ + "active": true, + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "(https://filebebo.com/e/[a-zA-Z0-9]+)", + "url": "\\1" + } + ] + }, + "free": true, + "id": "filebebo", + "name": "filebebo", + "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://filebebo.com/images/logo.png" +} \ No newline at end of file diff --git a/plugin.video.alfa/servers/filebebo.py b/plugin.video.alfa/servers/filebebo.py new file mode 100644 index 00000000..be7dbdf4 --- /dev/null +++ b/plugin.video.alfa/servers/filebebo.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# -*- Server Filebebo -*- +# -*- Created for Alfa-addon -*- +# -*- By the Alfa Develop Group -*- + +import re +from core import httptools +from core import scrapertools +from platformcode import logger + + +def get_source(url): + logger.info() + data = httptools.downloadpage(url).data + data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) + return data + +def test_video_exists(page_url): + logger.info("(page_url='%s')" % page_url) + data = get_source(page_url) + + if "File was deleted" in data: + return False, "[Filebebo] El video ha sido borrado" + + return True, "" + + +def get_video_url(page_url, premium=False, user="", password="", video_password=""): + logger.info("url=" + page_url) + video_urls = [] + data = get_source(page_url) + url = scrapertools.find_single_match(data, " Date: Fri, 26 Jan 2018 17:11:19 -0500 Subject: [PATCH 13/15] cinemahd: nuevo canal --- plugin.video.alfa/channels/cinemahd.json | 39 +++++ plugin.video.alfa/channels/cinemahd.py | 173 +++++++++++++++++++++++ 2 files changed, 212 insertions(+) create mode 100644 plugin.video.alfa/channels/cinemahd.json create mode 100644 plugin.video.alfa/channels/cinemahd.py diff --git a/plugin.video.alfa/channels/cinemahd.json b/plugin.video.alfa/channels/cinemahd.json new file mode 100644 index 00000000..10407831 --- /dev/null +++ b/plugin.video.alfa/channels/cinemahd.json @@ -0,0 +1,39 @@ +{ + "id": "cinemahd", + "name": "CinemaHD", + "active": true, + "adult": false, + "language": ["lat"], + "thumbnail": "", + "banner": "", + "version": 1, + "categories": [ + "tvshow" + ], + "settings": [ + { + "id": "include_in_global_search", + "type": "bool", + "label": "Incluir en busqueda global", + "default": false, + "enabled": false, + "visible": false + }, + { + "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": true, + "enabled": true, + "visible": true + } + ] +} \ No newline at end of file diff --git a/plugin.video.alfa/channels/cinemahd.py b/plugin.video.alfa/channels/cinemahd.py new file mode 100644 index 00000000..2a019159 --- /dev/null +++ b/plugin.video.alfa/channels/cinemahd.py @@ -0,0 +1,173 @@ +# -*- coding: utf-8 -*- +# -*- Channel CinemaHD -*- +# -*- Created for Alfa-addon -*- +# -*- By the Alfa Develop Group -*- + +import re +from channelselector import get_thumb +from core import httptools +from core import scrapertools +from core import servertools +from core import tmdb +from core.item import Item +from platformcode import config, logger + +host = 'http://www.cinemahd.co/' + + +def mainlist(item): + logger.info() + + itemlist = list() + itemlist.append(item.clone(title="Ultimas", action="list_all", url=host)) + itemlist.append(item.clone(title="Generos", action="section", section='genre')) + itemlist.append(item.clone(title="Por Calidad", action="section", section='quality')) + itemlist.append(item.clone(title="Por Año", action="section", section='year')) + itemlist.append(item.clone(title="Alfabetico", action="section", section='alpha')) + itemlist.append(item.clone(title="Buscar", action="search", url=host+'?s=')) + + return itemlist + + +def get_source(url): + logger.info() + data = httptools.downloadpage(url).data + data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) + return data + + +def list_all(item): + logger.info() + itemlist = [] + data = get_source(item.url) + + if item.section == 'alpha': + patron = '\d+.*?
    (.*?).*?' + patron += '(\d{4}).*?Qlty>(.*?)' + else: + patron = '
  • ') + if url_next_page: + itemlist.append(item.clone(title="Siguiente >>", url=url_next_page, action='list_all')) + return itemlist + +def section(item): + logger.info() + itemlist = [] + + data = get_source(host) + + action = 'list_all' + if item.section == 'quality': + patron = 'menu-item-object-category.*?menu-item-\d+>(.*?)<\/a>' + elif item.section == 'genre': + patron = '(.*?)' + elif item.section == 'year': + patron = 'menu-item-15\d+>(\d{4})<\/a><\/li>' + elif item.section == 'alpha': + patron = '
  • (.*?)' + action = 'list_all' + matches = re.compile(patron, re.DOTALL).findall(data) + + for data_one, data_two in matches: + + url = data_one + title = data_two + if title != 'Ver más': + new_item = Item(channel=item.channel, title= title, url=url, action=action, section=item.section) + itemlist.append(new_item) + + return itemlist + + +def findvideos(item): + logger.info() + + itemlist = [] + data = get_source(item.url) + + patron = 'id=(Opt\d+)>.*?src=(.*?) frameborder.*?' + matches = re.compile(patron, re.DOTALL).findall(data) + + for option, scrapedurl in matches: + + url= scrapedurl + opt_data = scrapertools.find_single_match(data,'%s>.*?\d+<.*?.*?(' + '.*?)'%option).split('-') + + language = opt_data[0].strip() + quality = opt_data[1].strip() + + if url != '': + itemlist.append(item.clone(title='%s', url=url, language=language, quality=quality, action='play')) + + itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % '%s [%s] [%s]'%(i.server.capitalize(), + i.language, i.quality)) + if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': + itemlist.append( + Item(channel=item.channel, title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', url=item.url, + action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle)) + return itemlist + + +def search(item, texto): + logger.info() + texto = texto.replace(" ", "+") + item.url = item.url + texto + + if texto != '': + return list_all(item) + else: + return [] + + +def newest(categoria): + logger.info() + itemlist = [] + item = Item() + try: + if categoria in ['peliculas','latino']: + item.url = host + elif categoria == 'infantiles': + item.url = host+'/animacion' + elif categoria == 'terror': + item.url = host+'/terror' + itemlist = list_all(item) + if itemlist[-1].title == 'Siguiente >>': + itemlist.pop() + except: + import sys + for line in sys.exc_info(): + logger.error("{0}".format(line)) + return [] + + return itemlist From 854b4125759e26ff83737c5704ec8cac631653a4 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 26 Jan 2018 17:43:55 -0500 Subject: [PATCH 14/15] hentaiid: fix --- plugin.video.alfa/channels/hentaiid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/channels/hentaiid.py b/plugin.video.alfa/channels/hentaiid.py index f6cb51aa..926353a9 100755 --- a/plugin.video.alfa/channels/hentaiid.py +++ b/plugin.video.alfa/channels/hentaiid.py @@ -21,7 +21,7 @@ def mainlist(item): itemlist.append(Item(channel=item.channel, action="series", title="Sin Censura", url=urlparse.urljoin(CHANNEL_HOST, "archivos/sin-censura/"))) itemlist.append(Item(channel=item.channel, action="series", title="High Definition", - url=urlparse.urljoin(CHANNEL_HOST, "archivos/hight-definition/"))) + url=urlparse.urljoin(CHANNEL_HOST, "archivos/high-definition/"))) itemlist.append(Item(channel=item.channel, action="series", title="Mejores Hentais", url=urlparse.urljoin(CHANNEL_HOST, "archivos/ranking-hentai/"))) @@ -75,7 +75,7 @@ def series(item): show=show, fulltitle=fulltitle, fanart=thumbnail, folder=True)) if pagination: - page = scrapertools.find_single_match(pagination, '>Página\s*(\d+)\s*de\s*\d+<') + page = scrapertools.find_single_match(pagination, '>Page\s*(\d+)\s*of\s*\d+<') pattern = 'href="([^"]+)">%s<' % (int(page) + 1) url_page = scrapertools.find_single_match(pagination, pattern) From 8b4802b4e133bb4f4c0e929e8b29403b59f3b832 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sat, 27 Jan 2018 08:10:45 -0500 Subject: [PATCH 15/15] Update hentaiid.py --- plugin.video.alfa/channels/hentaiid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/hentaiid.py b/plugin.video.alfa/channels/hentaiid.py index 926353a9..d6f05214 100755 --- a/plugin.video.alfa/channels/hentaiid.py +++ b/plugin.video.alfa/channels/hentaiid.py @@ -75,7 +75,7 @@ def series(item): show=show, fulltitle=fulltitle, fanart=thumbnail, folder=True)) if pagination: - page = scrapertools.find_single_match(pagination, '>Page\s*(\d+)\s*of\s*\d+<') + page = scrapertools.find_single_match(pagination, '>(?:Page|Página)\s*(\d+)\s*(?:of|de)\s*\d+<') pattern = 'href="([^"]+)">%s<' % (int(page) + 1) url_page = scrapertools.find_single_match(pagination, pattern)