From e4b1139b847d06f37f6ed5c68202e6109d9c9198 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 5 Oct 2017 17:11:43 -0500 Subject: [PATCH 01/46] Actualizado gamovideo: fix --- plugin.video.alfa/servers/gamovideo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/gamovideo.py b/plugin.video.alfa/servers/gamovideo.py index 5e378be7..715836ca 100755 --- a/plugin.video.alfa/servers/gamovideo.py +++ b/plugin.video.alfa/servers/gamovideo.py @@ -7,7 +7,7 @@ from core import scrapertools from lib import jsunpack from platformcode import logger -headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0'} +headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0'} def test_video_exists(page_url): From 4c5315150fe990bb99ab6e9428a7aa7c0efde1be Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 5 Oct 2017 17:28:57 -0500 Subject: [PATCH 02/46] Update channelselector.py --- plugin.video.alfa/channelselector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channelselector.py b/plugin.video.alfa/channelselector.py index 0c056767..b39534aa 100644 --- a/plugin.video.alfa/channelselector.py +++ b/plugin.video.alfa/channelselector.py @@ -202,7 +202,7 @@ def filterchannels(category, view="thumb_"): def get_thumb(thumb_name, view="thumb_"): - icon_pack_name = config.get_setting('icon_set') + icon_pack_name = config.get_setting('icon_set', default="default") if icon_pack_name == "default": resource_path = os.path.join(config.get_runtime_path(), "resources", "media", "themes") else: From 73ad5d6a046bd95195608c6bc850520572be69a6 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 5 Oct 2017 17:30:59 -0500 Subject: [PATCH 03/46] Update keymaptools.py --- plugin.video.alfa/platformcode/keymaptools.py | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/plugin.video.alfa/platformcode/keymaptools.py b/plugin.video.alfa/platformcode/keymaptools.py index 5d6ecbf2..d65939ae 100644 --- a/plugin.video.alfa/platformcode/keymaptools.py +++ b/plugin.video.alfa/platformcode/keymaptools.py @@ -5,7 +5,7 @@ from threading import Timer import xbmc import xbmcaddon import xbmcgui -from core import filetools +from channelselector import get_thumb from platformcode import config @@ -82,27 +82,13 @@ def set_key(): MAIN_MENU = { - "news": {"label": "Novedades", - "icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default", - "thumb_news.png"), "order": 0}, - "channels": {"label": "Canales", - "icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default", - "thumb_channels.png"), "order": 1}, - "search": {"label": "Buscador", - "icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default", - "thumb_search.png"), "order": 2}, - "favorites": {"label": "Favoritos", - "icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default", - "thumb_favorites.png"), "order": 3}, - "videolibrary": {"label": "Videoteca", - "icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default", - "thumb_videolibrary.png"), "order": 4}, - "downloads": {"label": "Descargas", - "icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default", - "thumb_downloads.png"), "order": 5}, - "settings": {"label": "Configuración", - "icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default", - "thumb_setting_0.png"), "order": 6}, + "news": {"label": "Novedades", "icon": get_thumb("news.png"), "order": 0}, + "channels": {"label": "Canales", "icon": get_thumb("channels.png"), "order": 1}, + "search": {"label": "Buscador", "icon": get_thumb("search.png"), "order": 2}, + "favorites": {"label": "Favoritos", "icon": get_thumb("favorites.png"), "order": 3}, + "videolibrary": {"label": "Videoteca", "icon": get_thumb("videolibrary.png"), "order": 4}, + "downloads": {"label": "Descargas", "icon": get_thumb("downloads.png"), "order": 5}, + "settings": {"label": "Configuración", "icon": get_thumb("setting_0.png"), "order": 6} } From 5ac00398decd92a0fba12d51c6b07d39710a03a6 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 6 Oct 2017 10:03:55 -0500 Subject: [PATCH 04/46] Update peliculasrey.py --- plugin.video.alfa/channels/peliculasrey.py | 161 ++++++--------------- 1 file changed, 48 insertions(+), 113 deletions(-) diff --git a/plugin.video.alfa/channels/peliculasrey.py b/plugin.video.alfa/channels/peliculasrey.py index bcaa5abd..ebd7c362 100755 --- a/plugin.video.alfa/channels/peliculasrey.py +++ b/plugin.video.alfa/channels/peliculasrey.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- import re -import urlparse from core import httptools from core import scrapertools from core import servertools +from core import tmdb from core.item import Item from platformcode import logger, config @@ -16,117 +16,54 @@ def mainlist(item): itemlist = [] itemlist.append(Item(channel=item.channel, action="peliculas", title="Recientes", url=host)) - itemlist.append(Item(channel=item.channel, action="PorFecha", title="Año de Lanzamiento", url=host)) - itemlist.append(Item(channel=item.channel, action="Idiomas", title="Idiomas", url=host)) - itemlist.append(Item(channel=item.channel, action="calidades", title="Por calidad", url=host)) - itemlist.append(Item(channel=item.channel, action="generos", title="Por género", url=host)) + itemlist.append(Item(channel = item.channel, + action = "filtro", + title = "Año de Lanzamiento", + category = "lanzamiento" + )) + itemlist.append(Item(channel = item.channel, + action = "filtro", + title = "Idiomas", + category = "idioma" + )) + itemlist.append(Item(channel = item.channel, + action = "filtro", + title = "Por calidad", + category = "calidades" + )) + itemlist.append(Item(channel = item.channel, + action = "filtro", + title = "Por género", + category = "generos" + )) itemlist.append(Item(channel=item.channel, action="search", title="Buscar...", url=host)) return itemlist -def PorFecha(item): - logger.info() - - # Descarga la pagina - data = httptools.downloadpage(item.url).data - data = scrapertools.find_single_match(data, '
(.*?)
') - - # Extrae las entradas (carpetas) - patron = '(.*?)') - - # Extrae las entradas (carpetas) - patron = '(.*?)') - - # Extrae las entradas (carpetas) - patron = '(.*?)') - patron = '(.*?)') patron = '([^ Date: Fri, 6 Oct 2017 10:42:05 -0500 Subject: [PATCH 05/46] Update peliscity.py --- plugin.video.alfa/channels/peliscity.py | 35 +++++++++++-------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/plugin.video.alfa/channels/peliscity.py b/plugin.video.alfa/channels/peliscity.py index 78a924df..fa64ef07 100755 --- a/plugin.video.alfa/channels/peliscity.py +++ b/plugin.video.alfa/channels/peliscity.py @@ -5,6 +5,7 @@ import re 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 @@ -58,7 +59,7 @@ def porGenero(item): patron = 'cat-item.*?href="([^"]+).*?>(.*?)<.*?span>([^<]+)' - matches = re.compile(patron, re.DOTALL).findall(data) + matches = scrapertools.find_multiple_matches(data, patron) for urlgen, genero, cantidad in matches: cantidad = cantidad.replace(".", "") @@ -103,7 +104,6 @@ def agregadas(item): title = info[3] plot = info[4] year = info[5].strip() - itemlist.append(Item(channel=item.channel, action='findvideos', contentType = "movie", @@ -116,15 +116,11 @@ def agregadas(item): contentTitle = title, url=url )) - # Paginación - try: - next_page = scrapertools.find_single_match(data,'tima>.*?href=(.*?) >.*?href=(.*?) > (.*?)

' - matches = re.compile(patron, re.DOTALL).findall(data) + matches = scrapertools.find_multiple_matches(data, patron) for url, thumbnail, title, sinopsis in matches: itemlist.append(Item(channel=item.channel, action="findvideos", title=title + " ", fulltitle=title, url=url, @@ -157,7 +151,7 @@ def findvideos(item): # Descarga la pagina data = httptools.downloadpage(item.url).data patron = 'cursor: hand" rel="(.*?)".*?class="optxt">(.*?)<.*?width.*?class="q">(.*?) Date: Fri, 6 Oct 2017 10:55:58 -0500 Subject: [PATCH 06/46] Update cloudy.json --- plugin.video.alfa/servers/cloudy.json | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.video.alfa/servers/cloudy.json b/plugin.video.alfa/servers/cloudy.json index a0d0f523..cd539545 100755 --- a/plugin.video.alfa/servers/cloudy.json +++ b/plugin.video.alfa/servers/cloudy.json @@ -48,5 +48,6 @@ "visible": false } ], + "thumbnail": "https://s1.postimg.org/9e6doboo2n/cloudy1.png", "version": 1 } From 09b6a4a2d6e3a420e050b0afead6c6da93009941 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 6 Oct 2017 11:03:39 -0500 Subject: [PATCH 07/46] Update yourupload.json --- plugin.video.alfa/servers/yourupload.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/yourupload.json b/plugin.video.alfa/servers/yourupload.json index 401b7947..7e660487 100755 --- a/plugin.video.alfa/servers/yourupload.json +++ b/plugin.video.alfa/servers/yourupload.json @@ -58,5 +58,6 @@ "visible": false } ], + "thumbnail" : "https://s1.postimg.org/4wje61el4f/yourupload1.png", "version": 1 -} \ No newline at end of file +} From 97eb675083c8e4fae6379a92d9b096ac4acd0668 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 6 Oct 2017 12:46:48 -0500 Subject: [PATCH 08/46] Update hdfull.py --- plugin.video.alfa/channels/hdfull.py | 38 ++++------------------------ 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/plugin.video.alfa/channels/hdfull.py b/plugin.video.alfa/channels/hdfull.py index bc2d90af..3ab8b367 100644 --- a/plugin.video.alfa/channels/hdfull.py +++ b/plugin.video.alfa/channels/hdfull.py @@ -709,12 +709,11 @@ def findvideos(item): itemlist.extend(enlaces) ## 2 = película if type == "2" and item.category != "Cine": - ## STRM para todos los enlaces de servidores disponibles - ## Si no existe el archivo STRM de la peícula muestra el item ">> Añadir a la videoteca..." - try: - itemlist.extend(file_cine_library(item, url_targets)) - except: - pass + if config.get_videolibrary_support(): + itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green", + action="add_pelicula_to_library", url=url_targets, thumbnail = item.thumbnail, + fulltitle = item.contentTitle + )) return itemlist @@ -736,33 +735,6 @@ def trailer(item): return itemlist -def file_cine_library(item, url_targets): - import os - from core import filetools - videolibrarypath = os.path.join(config.get_videolibrary_path(), "CINE") - archivo = item.show.strip() - strmfile = archivo + ".strm" - strmfilepath = filetools.join(videolibrarypath, strmfile) - - if not os.path.exists(strmfilepath): - itemlist = [] - itemlist.append(Item(channel=item.channel, title=">> Añadir a la videoteca...", url=url_targets, - action="add_file_cine_library", extra="episodios", show=archivo)) - - return itemlist - - -def add_file_cine_library(item): - from core import videolibrarytools - new_item = item.clone(title=item.show, action="play_from_library") - videolibrarytools.save_movie(new_item) - itemlist = [] - itemlist.append(Item(title='El vídeo ' + item.show + ' se ha añadido a la videoteca')) - # xbmctools.renderItems(itemlist, "", "", "") - platformtools.render_items(itemlist, "") - - return - def play(item): if "###" in item.url: From ac4d588d34000fcaf015db1cfc889b385b61facf Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 6 Oct 2017 17:59:35 -0500 Subject: [PATCH 09/46] Update hdfull.py --- plugin.video.alfa/channels/hdfull.py | 47 +++++++++++----------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/plugin.video.alfa/channels/hdfull.py b/plugin.video.alfa/channels/hdfull.py index 3ab8b367..a3b2ccfa 100644 --- a/plugin.video.alfa/channels/hdfull.py +++ b/plugin.video.alfa/channels/hdfull.py @@ -676,37 +676,27 @@ def findvideos(item): matches.append([match["lang"], match["quality"], url, embed]) - enlaces = [] for idioma, calidad, url, embed in matches: - servername = scrapertools.find_single_match(url, "(?:http:|https:)//(?:www.|)([^.]+).") - if servername == "streamin": servername = "streaminto" - if servername == "waaw": servername = "netutv" - if servername == "uploaded" or servername == "ul": servername = "uploadedto" mostrar_server = True - if config.get_setting("hidepremium") == True: - mostrar_server = servertools.is_server_enabled(servername) - if mostrar_server: - option = "Ver" - if re.search(r'return ([\'"]{2,}|\})', embed): - option = "Descargar" - calidad = unicode(calidad, "utf8").upper().encode("utf8") - servername_c = unicode(servername, "utf8").capitalize().encode("utf8") - title = option + ": " + servername_c + " (" + calidad + ")" + " (" + idioma + ")" - thumbnail = item.thumbnail - plot = item.title + "\n\n" + scrapertools.find_single_match(data, - ' Date: Sat, 7 Oct 2017 08:48:04 -0500 Subject: [PATCH 10/46] Update streamplay.json --- plugin.video.alfa/servers/streamplay.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/streamplay.json b/plugin.video.alfa/servers/streamplay.json index 2867247d..f04ab61a 100755 --- a/plugin.video.alfa/servers/streamplay.json +++ b/plugin.video.alfa/servers/streamplay.json @@ -68,5 +68,6 @@ "visible": false } ], + "thumbnail": "https://s1.postimg.org/912d5vxmv3/streamplay1.png", "version": 1 -} \ No newline at end of file +} From ed2ea608cb0abb38c7f2ed2a5a5a521b883a4a11 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sat, 7 Oct 2017 09:13:16 -0500 Subject: [PATCH 11/46] Update rapidgator.json --- plugin.video.alfa/servers/rapidgator.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/servers/rapidgator.json b/plugin.video.alfa/servers/rapidgator.json index 880c7df2..5b2e5a89 100755 --- a/plugin.video.alfa/servers/rapidgator.json +++ b/plugin.video.alfa/servers/rapidgator.json @@ -10,7 +10,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "(rapidgator.net/file/.*?(?:\\.html))", + "pattern": "(rapidgator.net/file/\\w+(?:\\.html|))", "url": "http://\\1" } ] @@ -50,4 +50,4 @@ ], "thumbnail": "server_rapidgator.png", "version": 1 -} \ No newline at end of file +} From ed90af9905d7e9b8b3766f2009be39af98467085 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sat, 7 Oct 2017 09:28:31 -0500 Subject: [PATCH 12/46] Update hdfull.py --- plugin.video.alfa/channels/hdfull.py | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/plugin.video.alfa/channels/hdfull.py b/plugin.video.alfa/channels/hdfull.py index a3b2ccfa..76b6375f 100644 --- a/plugin.video.alfa/channels/hdfull.py +++ b/plugin.video.alfa/channels/hdfull.py @@ -634,7 +634,7 @@ def findvideos(item): title_label = bbcode_kodi2html(" ( [COLOR green][B]Tráiler[/B][/COLOR] )") itemlist.append( - Item(channel=item.channel, action="trailer", title=title_label, fulltitle=title_label, url=url_targets, + Item(channel=item.channel, action="buscartrailer", title=title_label, fulltitle=title_label, url=url_targets, thumbnail=item.thumbnail, show=item.show)) itemlist.append(Item(channel=item.channel, action="set_status", title=title, fulltitle=title, url=url_targets, @@ -697,6 +697,7 @@ def findvideos(item): contentTitle=item.contentTitle, contentType=item.contentType, tipo=option)) itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize()) + itemlist.sort(key=lambda it: it.title, reverse=True) ## 2 = película if type == "2" and item.category != "Cine": if config.get_videolibrary_support(): @@ -708,23 +709,6 @@ def findvideos(item): return itemlist -def trailer(item): - import youtube - itemlist = [] - item.url = "https://www.googleapis.com/youtube/v3/search" + \ - "?q=" + item.show.replace(" ", "+") + "+trailer+HD+Español" \ - "®ionCode=ES" + \ - "&part=snippet" + \ - "&hl=es_ES" + \ - "&key=AIzaSyAd-YEOqZz9nXVzGtn3KWzYLbLaajhqIDA" + \ - "&type=video" + \ - "&maxResults=50" + \ - "&pageToken=" - itemlist.extend(youtube.fichas(item)) - # itemlist.pop(-1) - return itemlist - - def play(item): if "###" in item.url: @@ -747,9 +731,6 @@ def play(item): return [item] -## -------------------------------------------------------------------------------- -## -------------------------------------------------------------------------------- - def agrupa_datos(data): ## Agrupa los datos data = re.sub(r'\n|\r|\t| |
|', '', data) From 6d950aedefa17a7ce107ae4e80e5e80de1237754 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sat, 7 Oct 2017 12:21:21 -0500 Subject: [PATCH 13/46] Update pordede.json --- plugin.video.alfa/channels/pordede.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/channels/pordede.json b/plugin.video.alfa/channels/pordede.json index a99cd21e..ad1e3a24 100755 --- a/plugin.video.alfa/channels/pordede.json +++ b/plugin.video.alfa/channels/pordede.json @@ -1,7 +1,7 @@ { "id": "pordede", "name": "Pordede", - "active": true, + "active": false, "adult": false, "language": ["cast"], "thumbnail": "pordede.png", @@ -105,4 +105,4 @@ ] } ] -} \ No newline at end of file +} From 34011ecc776bdee0e08ae5382a99d0dd28e19f3f Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sun, 8 Oct 2017 10:12:11 -0500 Subject: [PATCH 14/46] Update animeflv_me.py --- plugin.video.alfa/channels/animeflv_me.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin.video.alfa/channels/animeflv_me.py b/plugin.video.alfa/channels/animeflv_me.py index 71b18b3b..b73b174f 100755 --- a/plugin.video.alfa/channels/animeflv_me.py +++ b/plugin.video.alfa/channels/animeflv_me.py @@ -21,12 +21,12 @@ CHANNEL_DEFAULT_HEADERS = [ REGEX_NEXT_PAGE = r"class='current'>\d+?
  • )(.+?)(?:)' -REGEX_THUMB = r'src="(http://media.animeflv\.me/uploads/thumbs/[^"]+?)"' +REGEX_THUMB = r'src="(http://media.animeflv\.co/uploads/thumbs/[^"]+?)"' REGEX_PLOT = r'Línea de historia:

    (.*?)' -REGEX_URL = r'href="(http://animeflv\.me/Anime/[^"]+)">' +REGEX_URL = r'href="(http://animeflv\.co/Anime/[^"]+)">' REGEX_SERIE = r'%s.+?%s([^<]+?)

    (.+?)

    ' % (REGEX_THUMB, REGEX_URL) -REGEX_EPISODE = r'href="(http://animeflv\.me/Ver/[^"]+?)">(?:)?(.+?)(\d+/\d+/\d+)' -REGEX_GENERO = r'([^<]+)' +REGEX_EPISODE = r'href="(http://animeflv\.co/Ver/[^"]+?)">(?:)?(.+?)(\d+/\d+/\d+)' +REGEX_GENERO = r'([^<]+)' def get_url_contents(url): @@ -309,7 +309,7 @@ def findvideos(item): itemlist = [] page_html = get_url_contents(item.url) - regex_api = r'http://player\.animeflv\.me/[^\"]+' + regex_api = r'http://player\.animeflv\.co/[^\"]+' iframe_url = scrapertools.find_single_match(page_html, regex_api) iframe_html = get_url_contents(iframe_url) From 441864295a257a63535a1f521754c7103564bfc7 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 9 Oct 2017 11:09:51 -0300 Subject: [PATCH 15/46] AJuestes a canales varios --- plugin.video.alfa/channels/canalpelis.py | 12 +++-- plugin.video.alfa/channels/cinefox.py | 2 +- plugin.video.alfa/channels/cinefoxtv.py | 1 + plugin.video.alfa/channels/pedropolis.py | 61 +++++++++++++---------- plugin.video.alfa/channels/pelisplanet.py | 56 ++++++++++++++------- 5 files changed, 82 insertions(+), 50 deletions(-) diff --git a/plugin.video.alfa/channels/canalpelis.py b/plugin.video.alfa/channels/canalpelis.py index 15fce9a1..cb719be4 100644 --- a/plugin.video.alfa/channels/canalpelis.py +++ b/plugin.video.alfa/channels/canalpelis.py @@ -127,7 +127,6 @@ def peliculas(item): data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}| ", "", data) - logger.info(data) patron = '
    ([^.*?' # img, title.strip() patron += '(.*?)/div>.*?' # rating @@ -144,14 +143,17 @@ def peliculas(item): contentTitle = scrapedtitle.partition(':')[0].partition(',')[0] title = "%s [COLOR green][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % ( scrapedtitle, year, quality) + thumb_id = scrapertools.find_single_match(scrapedthumbnail, '.*?\/uploads\/(.*?)-') + thumbnail = "/%s.jpg" % thumb_id + filtro_list = {"poster_path": thumbnail} + filtro_list = filtro_list.items() itemlist.append(item.clone(channel=__channel__, action="findvideos", text_color=color3, - url=scrapedurl, infoLabels={'year': year, 'rating': rating}, - contentTitle=contentTitle, thumbnail=scrapedthumbnail, + url=scrapedurl, infoLabels={'filtro':filtro_list}, + contentTitle=contentTitle, thumbnail=thumbnail, title=title, context="buscar_trailer", quality = quality)) - tmdb.set_infoLabels(itemlist, __modo_grafico__) - tmdb.set_infoLabels(itemlist, __modo_grafico__) + tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__) if item.page + 20 < len(matches): itemlist.append(item.clone(page=item.page + 20, diff --git a/plugin.video.alfa/channels/cinefox.py b/plugin.video.alfa/channels/cinefox.py index 1697e42b..4fd1983b 100644 --- a/plugin.video.alfa/channels/cinefox.py +++ b/plugin.video.alfa/channels/cinefox.py @@ -689,7 +689,7 @@ def get_enlaces(item, url, type): if servertools.is_server_enabled(server): scrapedtitle = " Ver en " + server.capitalize() + " [" + idioma + "/" + calidad + "]" itemlist.append(item.clone(action="play", url=scrapedurl, title=scrapedtitle, text_color=color2, - extra="", server=server)) + extra="", server=server, language=idioma)) if len(itemlist) == 1: itemlist.append(item.clone(title=" No hay enlaces disponibles", action="", text_color=color2)) diff --git a/plugin.video.alfa/channels/cinefoxtv.py b/plugin.video.alfa/channels/cinefoxtv.py index a3adf5f9..5a33d19a 100644 --- a/plugin.video.alfa/channels/cinefoxtv.py +++ b/plugin.video.alfa/channels/cinefoxtv.py @@ -169,6 +169,7 @@ def findvideos(item): videoitem.plot = info videoitem.action = "play" videoitem.folder = False + videoitem.infoLabels=item.infoLabels if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': itemlist.append( diff --git a/plugin.video.alfa/channels/pedropolis.py b/plugin.video.alfa/channels/pedropolis.py index 45cc0b15..845cba80 100644 --- a/plugin.video.alfa/channels/pedropolis.py +++ b/plugin.video.alfa/channels/pedropolis.py @@ -120,40 +120,51 @@ def peliculas(item): if len(matches_next_page) > 0: url_next_page = urlparse.urljoin(item.url, matches_next_page[0]) - for scrapedthumbnail, scrapedtitle, rating, calidad, scrapedurl, year in matches: - if 'Proximamente' not in calidad: + for scrapedthumbnail, scrapedtitle, rating, quality, scrapedurl, year in matches: + if 'Proximamente' not in quality: scrapedtitle = scrapedtitle.replace('Ver ', '').partition(' /')[0].partition(':')[0].replace( 'Español Latino', '').strip() - title = "%s [COLOR green][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % (scrapedtitle, year, calidad) + title = "%s [COLOR green][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % (scrapedtitle, year, quality) - new_item = Item(channel=__channel__, action="findvideos", contentTitle=scrapedtitle, - infoLabels={'year': year, 'rating': rating}, thumbnail=scrapedthumbnail, - url=scrapedurl, next_page=next_page, quality=calidad, title=title) - if year: - tmdb.set_infoLabels_item(new_item, __modo_grafico__) - itemlist.append(new_item) + + + itemlist.append(Item(channel=item.channel, action="findvideos", contentTitle=scrapedtitle, + infoLabels={"year":year, "rating":rating}, thumbnail=scrapedthumbnail, + url=scrapedurl, next_page=next_page, quality=quality, title=title)) + + tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__) if url_next_page: itemlist.append(Item(channel=__channel__, action="peliculas", title="» Siguiente »", url=url_next_page, next_page=next_page, folder=True, text_blod=True, thumbnail=get_thumb("next.png"))) - for item in itemlist: - if item.infoLabels['plot'] == '': - data = httptools.downloadpage(item.url).data - data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) - # logger.info(data) - item.fanart = scrapertools.find_single_match(data, - "").replace( - 'w780', 'original') - item.plot = scrapertools.find_single_match(data, '
    .*?

    ([' - '^<]+)

    ') - item.plot = scrapertools.htmlclean(item.plot) - item.infoLabels['director'] = scrapertools.find_single_match(data, - '
    ([^<]+)') - item.infoLabels['rating'] = scrapertools.find_single_match(data, '([^<]+)') - item.infoLabels['votes'] = scrapertools.find_single_match(data, '[' - '^<]+\s(.*?) votos') + for no_plot in itemlist: + if no_plot.infoLabels['plot'] == '': + thumb_id = scrapertools.find_single_match(no_plot.thumbnail, '.*?\/\d{2}\/(.*?)-') + thumbnail = "/%s.jpg" % thumb_id + filtro_list = {"poster_path": thumbnail} + filtro_list = filtro_list.items() + no_plot.infoLabels={'filtro':filtro_list} + tmdb.set_infoLabels_item(no_plot, __modo_grafico__) + + if no_plot.infoLabels['plot'] == '': + data = httptools.downloadpage(no_plot.url).data + data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) + # logger.info(data) + no_plot.fanart = scrapertools.find_single_match(data, + "").replace( + 'w780', 'original') + no_plot.plot = scrapertools.find_single_match(data, '
    .*?

    ([' + '^<]+)

    ') + no_plot.plot = scrapertools.htmlclean(no_plot.plot) + no_plot.infoLabels['director'] = scrapertools.find_single_match(data, + '
    ([^<]+)') + no_plot.infoLabels['rating'] = scrapertools.find_single_match(data, '([' + '^<]+)') + no_plot.infoLabels['votes'] = scrapertools.find_single_match(data, '[' + '^<]+\s(.*?) votos') return itemlist diff --git a/plugin.video.alfa/channels/pelisplanet.py b/plugin.video.alfa/channels/pelisplanet.py index 0795cc6b..51e20a09 100644 --- a/plugin.video.alfa/channels/pelisplanet.py +++ b/plugin.video.alfa/channels/pelisplanet.py @@ -176,27 +176,45 @@ def peliculas(item): matches = re.compile(patron, re.DOTALL).findall(data) - for scrapedurl, calidad, year, scrapedtitle, scrapedthumbnail in matches: - datas = httptools.downloadpage(scrapedurl).data - datas = re.sub(r"\n|\r|\t|\s{2}| ", "", datas) - # logger.info(datas) + for scrapedurl, quality, year, scrapedtitle, scrapedthumbnail in matches: if '/ ' in scrapedtitle: scrapedtitle = scrapedtitle.partition('/ ')[2] - contentTitle = scrapertools.find_single_match(datas, 'Titulo original: ([^<]+)

    ') - contentTitle = scrapertools.decodeHtmlentities(contentTitle.strip()) - rating = scrapertools.find_single_match(datas, 'alt="Puntaje MPA IMDb" />([^<]+)') - director = scrapertools.find_single_match( - datas, '') - title = "%s [COLOR yellow][%s][/COLOR]" % (scrapedtitle.strip(), calidad.upper()) + title = scrapedtitle + contentTitle = title + url = scrapedurl + quality = quality + thumbnail = scrapedthumbnail - new_item = Item(channel=item.channel, action="findvideos", title=title, plot='', contentType='movie', - url=scrapedurl, contentQuality=calidad, thumbnail=scrapedthumbnail, - contentTitle=contentTitle, infoLabels={"year": year, 'rating': rating, 'director': director}, - text_color=color3) + itemlist.append(Item(channel=item.channel, + action="findvideos", + title=title, url=url, + quality=quality, + thumbnail=thumbnail, + contentTitle=contentTitle, + infoLabels={"year": year}, + text_color=color3 + )) - if year: - tmdb.set_infoLabels_item(new_item, __modo_grafico__) - itemlist.append(new_item) + # for scrapedurl, calidad, year, scrapedtitle, scrapedthumbnail in matches: + # datas = httptools.downloadpage(scrapedurl).data + # datas = re.sub(r"\n|\r|\t|\s{2}| ", "", datas) + # # logger.info(datas) + # if '/ ' in scrapedtitle: + # scrapedtitle = scrapedtitle.partition('/ ')[2] + # contentTitle = scrapertools.find_single_match(datas, 'Titulo original: ([^<]+)

    ') + # contentTitle = scrapertools.decodeHtmlentities(contentTitle.strip()) + # rating = scrapertools.find_single_match(datas, 'alt="Puntaje MPA IMDb" />([^<]+)') + # director = scrapertools.find_single_match( + # datas, '') + # title = "%s [COLOR yellow][%s][/COLOR]" % (scrapedtitle.strip(), calidad.upper()) + # + # logger.debug('thumbnail: %s' % scrapedthumbnail) + # new_item = Item(channel=item.channel, action="findvideos", title=title, plot='', contentType='movie', + # url=scrapedurl, contentQuality=calidad, thumbnail=scrapedthumbnail, + # contentTitle=contentTitle, infoLabels={"year": year, 'rating': rating, 'director': director}, + # text_color=color3) + # itemlist.append(new_item) + tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__) paginacion = scrapertools.find_single_match(data, '
    .*?.*?') if paginacion: - itemlist.append(channel=item.channel, action="sub_search", title="Next page >>" , url=paginacion) + itemlist.append(Item(channel=item.channel, action="sub_search", title="Next page >>", url=paginacion)) return itemlist + def peliculas(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data data = re.sub(r"\n|\r|\t| |
    ", "", data) - patron = '
    .*?href="(.*?)" title="(.*?)".*?under-title">(.*?)<.*?src="(.*?)"' - matches = re.compile(patron,re.DOTALL).findall(data) - + patron = '
    .*?href="(.*?)" title="(.*?)".*?under-title">(.*?)<.*?src="(.*?)"' + matches = scrapertools.find_multiple_matches(data, patron) for scrapedurl, scrapedyear, scrapedtitle, scrapedthumbnail in matches: - - url = scrapedurl - title = scrapedtitle year = scrapertools.find_single_match(scrapedyear, r'.*?\((\d{4})\)') - thumbnail = scrapedthumbnail - new_item =Item (channel = item.channel, action="findvideos", title=title, contentTitle=title, url=url, - thumbnail=thumbnail, infoLabels = {'year':year}) - if year: - tmdb.set_infoLabels_item(new_item) + itemlist.append(Item(channel=item.channel, action="findvideos", title=scrapedtitle, fulltitle = scrapedtitle, url=scrapedurl, + thumbnail=scrapedthumbnail, infoLabels={'year': year})) - itemlist.append(new_item) - - next_page_url = scrapertools.find_single_match(data,'') - if next_page_url!="": - next_page_url = urlparse.urljoin(item.url,next_page_url) + tmdb.set_infoLabels(itemlist, True) + next_page_url = scrapertools.find_single_match(data, ' Date: Mon, 9 Oct 2017 09:28:29 -0500 Subject: [PATCH 17/46] Update bitp.json --- plugin.video.alfa/servers/bitp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/servers/bitp.json b/plugin.video.alfa/servers/bitp.json index aeb7c8be..dd570cf3 100644 --- a/plugin.video.alfa/servers/bitp.json +++ b/plugin.video.alfa/servers/bitp.json @@ -10,7 +10,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "https://www.bitporno.com/e/([A-z0-9]+)", + "pattern": "https://www.bitporno.com/(?:e|embed)/([A-z0-9]+)", "url": "https://www.bitporno.com/e/\\1" }, { From 028eec79b2eed8eeaac86bc889e40833a6abe2df Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 9 Oct 2017 10:23:27 -0500 Subject: [PATCH 18/46] nuevo conector cloudsany --- plugin.video.alfa/servers/cloudsany.json | 49 ++++++++++++++++++++++++ plugin.video.alfa/servers/cloudsany.py | 33 ++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 plugin.video.alfa/servers/cloudsany.json create mode 100644 plugin.video.alfa/servers/cloudsany.py diff --git a/plugin.video.alfa/servers/cloudsany.json b/plugin.video.alfa/servers/cloudsany.json new file mode 100644 index 00000000..bd1f4f68 --- /dev/null +++ b/plugin.video.alfa/servers/cloudsany.json @@ -0,0 +1,49 @@ +{ + "active": true, + "changes": [ + { + "date": "09/10/2017", + "description": "Versión inicial" + } + ], + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "cloudsany.com/i/([A-z0-9]+)", + "url": "https://cloudsany.com/i/\\1" + } + ] + }, + "free": true, + "id": "cloudsany", + "name": "cloudsany", + "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/6wixo35myn/cloudsany1.png", + "version": 1 +} diff --git a/plugin.video.alfa/servers/cloudsany.py b/plugin.video.alfa/servers/cloudsany.py new file mode 100644 index 00000000..67112c5f --- /dev/null +++ b/plugin.video.alfa/servers/cloudsany.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Alfa addon - KODI Plugin +# Conector para cloudsany +# https://github.com/alfa-addon +# ------------------------------------------------------------ + +from core import httptools +from core import scrapertools +from lib import jsunpack +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: + return False, "[Cloudsany] El fichero ha sido borrado" + + 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 + data = scrapertools.find_single_match(data, 'p,a,c,k,e.*?') + unpack = jsunpack.unpack(data) + logger.info("Intel11 %s" %unpack) + video_urls = [] + videourl = scrapertools.find_single_match(unpack, 'config={file:"([^"]+)') + video_urls.append([".MP4 [Cloudsany]", videourl]) + + return video_urls From 7561a362163fe08bbb7f5323e6958f5732f39b0d Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Mon, 9 Oct 2017 10:47:14 -0500 Subject: [PATCH 19/46] Update gamovideo.py --- plugin.video.alfa/servers/gamovideo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.video.alfa/servers/gamovideo.py b/plugin.video.alfa/servers/gamovideo.py index 715836ca..2f746fbe 100755 --- a/plugin.video.alfa/servers/gamovideo.py +++ b/plugin.video.alfa/servers/gamovideo.py @@ -12,7 +12,7 @@ headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20 def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) - data = httptools.downloadpage(page_url, headers=headers).data + data = httptools.downloadpage(page_url, add_referer = True).data if "File was deleted" in data or "Not Found" in data or "File was locked by administrator" in data: return False, "[Gamovideo] El archivo no existe o ha sido borrado" @@ -24,7 +24,7 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("(page_url='%s')" % page_url) - data = httptools.downloadpage(page_url, headers=headers).data + data = httptools.downloadpage(page_url, add_referer = True).data packer = scrapertools.find_single_match(data, "") From b6951e79b8deb79686aabd46f6aa2925d0d94bfd Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 9 Oct 2017 14:15:13 -0300 Subject: [PATCH 20/46] url x scrapedurl --- plugin.video.alfa/channels/pelisplanet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/pelisplanet.py b/plugin.video.alfa/channels/pelisplanet.py index 51e20a09..935df8c8 100644 --- a/plugin.video.alfa/channels/pelisplanet.py +++ b/plugin.video.alfa/channels/pelisplanet.py @@ -291,7 +291,7 @@ def findvideos(item): title = "Ver en: [COLOR yellowgreen][{}][/COLOR] [COLOR yellow][{}][/COLOR]".format(servidores.capitalize(), quality.upper()) - itemlist.append(item.clone(action='play', title=title, url=url, quality=item.quality, + itemlist.append(item.clone(action='play', title=title, url=scrapedurl, quality=item.quality, server=server, language=lang.replace('Español ', ''), text_color=color3, thumbnail=item.thumbnail)) From c582704a84953bd477051b26b40b4fe0cef5bbdc Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 9 Oct 2017 14:13:33 -0300 Subject: [PATCH 21/46] Gnula pimped y pelixfox fixed --- plugin.video.alfa/channels/gnula.py | 12 ++++++++++-- plugin.video.alfa/channels/pelisfox.py | 4 +++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/plugin.video.alfa/channels/gnula.py b/plugin.video.alfa/channels/gnula.py index c9306666..b34600fb 100755 --- a/plugin.video.alfa/channels/gnula.py +++ b/plugin.video.alfa/channels/gnula.py @@ -56,11 +56,17 @@ def peliculas(item): data = httptools.downloadpage(item.url).data patron = '([^<]+) Date: Mon, 9 Oct 2017 12:34:05 -0500 Subject: [PATCH 22/46] Update pelisfox.py --- plugin.video.alfa/channels/pelisfox.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin.video.alfa/channels/pelisfox.py b/plugin.video.alfa/channels/pelisfox.py index 9aa81828..aef03592 100644 --- a/plugin.video.alfa/channels/pelisfox.py +++ b/plugin.video.alfa/channels/pelisfox.py @@ -240,7 +240,6 @@ def findvideos(item): )) for videoitem in templist: data = httptools.downloadpage(videoitem.url).data - logger.debug(data) urls_list = scrapertools.find_multiple_matches(data, '{"reorder":1,"type":.*?}') for element in urls_list: json_data=jsontools.load(element) From 147afb3adb78112c9bfc5cdce7a65f9135f3bfae Mon Sep 17 00:00:00 2001 From: alfa-addon Date: Mon, 9 Oct 2017 18:11:12 -0400 Subject: [PATCH 23/46] v2.2.1 --- plugin.video.alfa/addon.xml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugin.video.alfa/addon.xml b/plugin.video.alfa/addon.xml index 0ca720af..35fd5c2c 100755 --- a/plugin.video.alfa/addon.xml +++ b/plugin.video.alfa/addon.xml @@ -1,5 +1,5 @@  - + @@ -19,11 +19,17 @@ [B]Estos son los cambios para esta versión:[/B] [COLOR green][B]Canales agregados y arreglos[/B][/COLOR] - » playmax » allcalidad - » cinetux » allpeliculas - » pedropolis » pelisplanet - » flashx » gvideo - ¤ selector de temas ¤ arreglos internos + » animeflv_me » gmobi + » hdfull » peliculasrey + » peliscity » pelisplanet + » bitp » cloudy + » canalpelis » cinefox + » cinefoxtv » gnula + » pedropolis » pelisfox + » gamovideo » rapidgator + » streamplay » yourupload + » cloudsany ¤ arreglos internos + Navega con Kodi por páginas web para ver sus videos de manera fácil. Browse web pages using Kodi From 8dca67daa8ca305a023a511696f6e8127d52d806 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 10 Oct 2017 15:22:14 -0300 Subject: [PATCH 24/46] Ajustes a canales varios --- plugin.video.alfa/channels/maxipelis.py | 5 +++-- .../channels/peliculasaudiolatino.py | 2 ++ plugin.video.alfa/channels/peliculasmx.py | 9 +++------ plugin.video.alfa/channels/peliscity.py | 2 +- plugin.video.alfa/channels/repelis.py | 13 +++++++------ plugin.video.alfa/channels/seriesadicto.py | 19 +++++++++++-------- plugin.video.alfa/channels/serieslatino.py | 2 +- plugin.video.alfa/channels/seriesmeme.py | 2 +- plugin.video.alfa/channels/seriesyonkis.py | 8 +++++--- .../channels/verpeliculasnuevas.py | 2 +- 10 files changed, 35 insertions(+), 29 deletions(-) diff --git a/plugin.video.alfa/channels/maxipelis.py b/plugin.video.alfa/channels/maxipelis.py index ce8c7f8d..8f6b07de 100644 --- a/plugin.video.alfa/channels/maxipelis.py +++ b/plugin.video.alfa/channels/maxipelis.py @@ -104,9 +104,10 @@ def peliculas(item): new_item = Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=thumbnail, plot=plot, contentTitle = contentTitle , infoLabels={'year':year} ) - if year: - tmdb.set_infoLabels_item(new_item) + #if year: + # tmdb.set_infoLabels_item(new_item) itemlist.append(new_item) + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) try: patron = '
    ' next_page = re.compile(patron,re.DOTALL).findall(data) diff --git a/plugin.video.alfa/channels/peliculasaudiolatino.py b/plugin.video.alfa/channels/peliculasaudiolatino.py index d5a021ac..197cc18c 100644 --- a/plugin.video.alfa/channels/peliculasaudiolatino.py +++ b/plugin.video.alfa/channels/peliculasaudiolatino.py @@ -155,6 +155,8 @@ def findvideos(item): url = scrapedurl server = servertools.get_server_name(servidor) title = "Enlace encontrado en %s" % (server) + if idioma == 'Ingles Subtitulado': + idioma = 'vose' itemlist.append(Item(channel=item.channel, action="play", title=title, fulltitle=item.fulltitle, url=url, thumbnail=scrapedthumbnail, language=idioma, quality=calidad, server=server)) if itemlist: diff --git a/plugin.video.alfa/channels/peliculasmx.py b/plugin.video.alfa/channels/peliculasmx.py index 4055fd26..81ccd672 100644 --- a/plugin.video.alfa/channels/peliculasmx.py +++ b/plugin.video.alfa/channels/peliculasmx.py @@ -76,14 +76,11 @@ def peliculas(item): tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) # Extrae la marca de siguiente página - paginador = scrapertools.find_single_match(data, "
    .*?lateral") + next_page = scrapertools.find_single_match(data, 'class="nextpostslink" rel="next" href="(.*?)">') - patron = ".*?href='([^']+)" - scrapedurl = scrapertools.find_single_match(paginador, patron) - - if scrapedurl: + if next_page: scrapedtitle = "!Pagina Siguiente ->" - itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl, folder=True)) + itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=next_page, folder=True)) return itemlist diff --git a/plugin.video.alfa/channels/peliscity.py b/plugin.video.alfa/channels/peliscity.py index fa64ef07..a8b875c6 100755 --- a/plugin.video.alfa/channels/peliscity.py +++ b/plugin.video.alfa/channels/peliscity.py @@ -43,7 +43,7 @@ def porIdioma(item): itemlist.append(Item(channel=item.channel, title="Castellano", action="agregadas", url= host + "/idioma/espanol-castellano/", viewmode="movie_with_plot")) itemlist.append( - Item(channel=item.channel, title="VOS", action="agregadas", url= host + "/idioma/subtitulada/", + Item(channel=item.channel, title="VOSE", action="agregadas", url= host + "/idioma/subtitulada/", viewmode="movie_with_plot")) itemlist.append(Item(channel=item.channel, title="Latino", action="agregadas", url= host + "/idioma/espanol-latino/", viewmode="movie_with_plot")) diff --git a/plugin.video.alfa/channels/repelis.py b/plugin.video.alfa/channels/repelis.py index 67fb5234..c1dd55c9 100644 --- a/plugin.video.alfa/channels/repelis.py +++ b/plugin.video.alfa/channels/repelis.py @@ -108,13 +108,12 @@ def menupelis(item): language = scrapertools.find_multiple_matches(extra_info, 'class="(latino|espanol|subtitulado)"') # if language = 'ingles': # language='vo' - new_item=Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url, + itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url, thumbnail=thumbnail, fanart=thumbnail, language=language, quality=quality, - infoLabels={'year': year}) - if year: - tmdb.set_infoLabels_item(new_item) + infoLabels={'year': year})) + + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - itemlist.append(new_item) try: next_page = scrapertools.get_match(data, '\d+2> Página siguiente" + try: next_page = scrapertools.get_match(data, '\d+ 0: itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url, @@ -142,18 +143,19 @@ def extrae_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 + "VOS" + "/" + textoidiomas = textoidiomas + "VOSE" + "/" if idioma == "4": textoidiomas = textoidiomas + "VO" + "/" - + language.append(codigo_a_idioma(idioma)) textoidiomas = textoidiomas[:-1] - return textoidiomas + return textoidiomas, language def codigo_a_idioma(codigo): @@ -163,7 +165,7 @@ def codigo_a_idioma(codigo): if codigo == "2": idioma = "Latino" if codigo == "3": - idioma = "VOS" + idioma = "VOSE" if codigo == "4": idioma = "VO" @@ -195,14 +197,15 @@ def findvideos(item): for idioma, servername, scrapedurl in matches: title = "Mirror en " + servername + " (" + codigo_a_idioma(idioma) + ")" + language = codigo_a_idioma(idioma) url = urlparse.urljoin(item.url, scrapedurl) thumbnail = "" plot = "" logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]") itemlist.append( Item(channel=item.channel, action="play", title=title, fulltitle=title, url=url, thumbnail=thumbnail, - plot=plot, folder=False)) - + plot=plot, folder=False, language=language)) + itemlist = servertools.get_servers_itemlist(itemlist) return itemlist diff --git a/plugin.video.alfa/channels/serieslatino.py b/plugin.video.alfa/channels/serieslatino.py index b5e9b80f..568c2881 100644 --- a/plugin.video.alfa/channels/serieslatino.py +++ b/plugin.video.alfa/channels/serieslatino.py @@ -108,7 +108,7 @@ def lista(item): actual_page_url = item.url next_page = scrapertools.find_single_match(data, '
    Siguiente<\/a><\/div>') if next_page != '': - itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=item.url + next_page, + itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=host + next_page, thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png')) return itemlist diff --git a/plugin.video.alfa/channels/seriesmeme.py b/plugin.video.alfa/channels/seriesmeme.py index 54c11ac0..2421e412 100755 --- a/plugin.video.alfa/channels/seriesmeme.py +++ b/plugin.video.alfa/channels/seriesmeme.py @@ -144,7 +144,7 @@ def lista_gen(item): context1=[renumbertools.context(item), autoplay.context] itemlist.append( Item(channel=item.channel, title=title, url=scrapedurl, thumbnail=scrapedthumbnail, action="episodios", - show=scrapedtitle, context=context1)) + show=scrapedtitle, context=context1, language=scrapedlang)) tmdb.set_infoLabels(itemlist) # Paginacion diff --git a/plugin.video.alfa/channels/seriesyonkis.py b/plugin.video.alfa/channels/seriesyonkis.py index 20c61a64..c9b7c9e4 100755 --- a/plugin.video.alfa/channels/seriesyonkis.py +++ b/plugin.video.alfa/channels/seriesyonkis.py @@ -171,12 +171,13 @@ def findvideos(item): matches = re.compile(pattern, re.S).findall(data) - for url, server, lang in matches: - title = "[%s] - [%s]" % (lang, server) + for url, server, language in matches: + title = "[%s] - [%s]" % (language, server) url = host + url + server = re.sub('(\..*)', '', server) logger.debug("url %s" % url) itemlist.append(Item(channel=item.channel, action="play", title=title, fulltitle=item.fulltitle, url=url, - thumbnail=item.thumbnail, lang=lang)) + thumbnail=item.thumbnail, language=language, server=server)) return itemlist @@ -191,5 +192,6 @@ def play(item): for video_item in itemlist: video_item.title = "%s [%s]" % (item.fulltitle, item.lang) video_item.thumbnail = item.thumbnail + video_item.language = item.language return itemlist diff --git a/plugin.video.alfa/channels/verpeliculasnuevas.py b/plugin.video.alfa/channels/verpeliculasnuevas.py index 84c0b2b5..cadb95dc 100755 --- a/plugin.video.alfa/channels/verpeliculasnuevas.py +++ b/plugin.video.alfa/channels/verpeliculasnuevas.py @@ -13,7 +13,7 @@ from platformcode import config, logger host = 'http://verpeliculasnuevas.com' -IDIOMAS = {'latino': 'Latino', 'castellano': 'Español', 'sub': 'VOS'} +IDIOMAS = {'latino': 'Latino', 'castellano': 'Español', 'sub': 'VOSE'} list_language = IDIOMAS.values() taudio = {'latino': '[COLOR limegreen]LATINO[/COLOR]', From ae018e43e80e152733cc763f3a587df14c93c60b Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 10 Oct 2017 15:39:15 -0500 Subject: [PATCH 25/46] Actualizado hdfull: fix --- plugin.video.alfa/channels/hdfull.py | 96 ++++++++++++---------------- 1 file changed, 40 insertions(+), 56 deletions(-) diff --git a/plugin.video.alfa/channels/hdfull.py b/plugin.video.alfa/channels/hdfull.py index 76b6375f..3133dc69 100644 --- a/plugin.video.alfa/channels/hdfull.py +++ b/plugin.video.alfa/channels/hdfull.py @@ -49,8 +49,7 @@ def mainlist(item): itemlist.append(Item(channel=item.channel, action="menuseries", title="Series", url=host, folder=True)) itemlist.append(Item(channel=item.channel, action="search", title="Buscar...")) if not account: - itemlist.append(Item(channel=item.channel, title=bbcode_kodi2html( - "[COLOR orange][B]Habilita tu cuenta para activar los items de usuario...[/B][/COLOR]"), + itemlist.append(Item(channel=item.channel, title="[COLOR orange][B]Habilita tu cuenta para activar los items de usuario...[/B][/COLOR]", action="settingCanal", url="")) else: login() @@ -66,10 +65,10 @@ def menupeliculas(item): if account: itemlist.append(Item(channel=item.channel, action="items_usuario", - title=bbcode_kodi2html("[COLOR orange][B]Favoritos[/B][/COLOR]"), + title="[COLOR orange][B]Favoritos[/B][/COLOR]", url=host + "/a/my?target=movies&action=favorite&start=-28&limit=28", folder=True)) itemlist.append(Item(channel=item.channel, action="items_usuario", - title=bbcode_kodi2html("[COLOR orange][B]Pendientes[/B][/COLOR]"), + title="[COLOR orange][B]Pendientes[/B][/COLOR]", url=host + "/a/my?target=movies&action=pending&start=-28&limit=28", folder=True)) itemlist.append(Item(channel=item.channel, action="fichas", title="ABC", url=host + "/peliculas/abc", folder=True)) @@ -86,7 +85,7 @@ def menupeliculas(item): itemlist.append(Item(channel=item.channel, action="generos", title="Películas por Género", url=host, folder=True)) if account: itemlist.append(Item(channel=item.channel, action="items_usuario", - title=bbcode_kodi2html("[COLOR orange][B]Vistas[/B][/COLOR]"), + title="[COLOR orange][B]Vistas[/B][/COLOR]", url=host + "/a/my?target=movies&action=seen&start=-28&limit=28", folder=True)) return itemlist @@ -99,10 +98,10 @@ def menuseries(item): if account: itemlist.append(Item(channel=item.channel, action="items_usuario", - title=bbcode_kodi2html("[COLOR orange][B]Siguiendo[/B][/COLOR]"), + title="[COLOR orange][B]Siguiendo[/B][/COLOR]", url=host + "/a/my?target=shows&action=following&start=-28&limit=28", folder=True)) itemlist.append(Item(channel=item.channel, action="items_usuario", - title=bbcode_kodi2html("[COLOR orange][B]Para Ver[/B][/COLOR]"), + title="[COLOR orange][B]Para Ver[/B][/COLOR]", url=host + "/a/my?target=shows&action=watch&start=-28&limit=28", folder=True)) itemlist.append(Item(channel=item.channel, action="series_abc", title="A-Z", folder=True)) @@ -123,13 +122,13 @@ def menuseries(item): url=host + "/series/list", folder=True)) if account: itemlist.append(Item(channel=item.channel, action="items_usuario", - title=bbcode_kodi2html("[COLOR orange][B]Favoritas[/B][/COLOR]"), + title="[COLOR orange][B]Favoritas[/B][/COLOR]", url=host + "/a/my?target=shows&action=favorite&start=-28&limit=28", folder=True)) itemlist.append(Item(channel=item.channel, action="items_usuario", - title=bbcode_kodi2html("[COLOR orange][B]Pendientes[/B][/COLOR]"), + title="[COLOR orange][B]Pendientes[/B][/COLOR]", url=host + "/a/my?target=shows&action=pending&start=-28&limit=28", folder=True)) itemlist.append(Item(channel=item.channel, action="items_usuario", - title=bbcode_kodi2html("[COLOR orange][B]Vistas[/B][/COLOR]"), + title="[COLOR orange][B]Vistas[/B][/COLOR]", url=host + "/a/my?target=shows&action=seen&start=-28&limit=28", folder=True)) return itemlist @@ -222,7 +221,7 @@ def items_usuario(item): serie = ficha['show_title']['en'].strip() temporada = ficha['season'] episodio = ficha['episode'] - serie = bbcode_kodi2html("[COLOR whitesmoke][B]" + serie + "[/B][/COLOR]") + serie = "[COLOR whitesmoke][B]" + serie + "[/B][/COLOR]" if len(episodio) == 1: episodio = '0' + episodio try: title = temporada + "x" + episodio + " - " + serie + ": " + title @@ -286,9 +285,8 @@ def fichas(item): if len(s_p) == 1: data = s_p[0] if 'Lo sentimos' in s_p[0]: - return [Item(channel=item.channel, title=bbcode_kodi2html( - "[COLOR gold][B]HDFull:[/B][/COLOR] [COLOR blue]" + texto.replace('%20', - ' ') + "[/COLOR] sin resultados"))] + return [Item(channel=item.channel, title="[COLOR gold][B]HDFull:[/B][/COLOR] [COLOR blue]" + texto.replace('%20', + ' ') + "[/COLOR] sin resultados")] else: data = s_p[0] + s_p[1] else: @@ -321,12 +319,12 @@ def fichas(item): if scrapedlangs != ">": textoidiomas, language = extrae_idiomas(scrapedlangs) #Todo Quitar el idioma - title += bbcode_kodi2html(" ( [COLOR teal][B]" + textoidiomas + "[/B][/COLOR])") + title += " ( [COLOR teal][B]" + textoidiomas + "[/B][/COLOR])" if scrapedrating != ">": valoracion = re.sub(r'><[^>]+>(\d+)(\d+)', r'\1,\2', scrapedrating) infoLabels['rating']=valoracion - title += bbcode_kodi2html(" ([COLOR orange]" + valoracion + "[/COLOR])") + title += " ([COLOR orange]" + valoracion + "[/COLOR])" url = urlparse.urljoin(item.url, scrapedurl) @@ -346,7 +344,7 @@ def fichas(item): if item.title == "Buscar...": tag_type = scrapertools.get_match(url, 'l.tv/([^/]+)/') - title += bbcode_kodi2html(" - [COLOR blue]" + tag_type.capitalize() + "[/COLOR]") + title += " - [COLOR blue]" + tag_type.capitalize() + "[/COLOR]" itemlist.append( Item(channel=item.channel, action=action, title=title, url=url, fulltitle=title, thumbnail=thumbnail, @@ -388,7 +386,7 @@ def episodios(item): str = get_status(status, "shows", id) if str != "" and account and item.category != "Series" and "XBMC" not in item.title: if config.get_videolibrary_support(): - title = bbcode_kodi2html(" ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )") + title = " ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )" itemlist.append( Item(channel=item.channel, action="episodios", title=title, fulltitle=title, url=url_targets, thumbnail=item.thumbnail, show=item.show, folder=False)) @@ -397,11 +395,11 @@ def episodios(item): thumbnail=item.thumbnail, show=item.show, folder=True)) elif account and item.category != "Series" and "XBMC" not in item.title: if config.get_videolibrary_support(): - title = bbcode_kodi2html(" ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )") + title = " ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )" itemlist.append( Item(channel=item.channel, action="episodios", title=title, fulltitle=title, url=url_targets, thumbnail=item.thumbnail, show=item.show, folder=False)) - title = bbcode_kodi2html(" ( [COLOR orange][B]Seguir[/B][/COLOR] )") + title = " ( [COLOR orange][B]Seguir[/B][/COLOR] )" itemlist.append(Item(channel=item.channel, action="set_status", title=title, fulltitle=title, url=url_targets, thumbnail=item.thumbnail, show=item.show, folder=True)) @@ -436,7 +434,7 @@ def episodios(item): idiomas = "( [COLOR teal][B]" for idioma in episode['languages']: idiomas += idioma + " " idiomas += "[/B][/COLOR])" - idiomas = bbcode_kodi2html(idiomas) + idiomas = idiomas else: idiomas = "" @@ -513,7 +511,7 @@ def novedades_episodios(item): idiomas = "( [COLOR teal][B]" for idioma in episode['languages']: idiomas += idioma + " " idiomas += "[/B][/COLOR])" - idiomas = bbcode_kodi2html(idiomas) + idiomas = idiomas else: idiomas = "" @@ -522,7 +520,7 @@ def novedades_episodios(item): except: show = episode['show']['title']['en'].strip() - show = bbcode_kodi2html("[COLOR whitesmoke][B]" + show + "[/B][/COLOR]") + show = "[COLOR whitesmoke][B]" + show + "[/B][/COLOR]" if episode['title']: try: @@ -612,6 +610,8 @@ def findvideos(item): logger.info() itemlist = [] + it1 = [] + it2 = [] ## Carga estados status = jsontools.load(httptools.downloadpage(host + '/a/status/all').data) url_targets = item.url @@ -623,21 +623,21 @@ def findvideos(item): item.url = item.url.split("###")[0] if type == "2" and account and item.category != "Cine": - title = bbcode_kodi2html(" ( [COLOR orange][B]Agregar a Favoritos[/B][/COLOR] )") + title = " ( [COLOR orange][B]Agregar a Favoritos[/B][/COLOR] )" if "Favorito" in item.title: - title = bbcode_kodi2html(" ( [COLOR red][B]Quitar de Favoritos[/B][/COLOR] )") + title = " ( [COLOR red][B]Quitar de Favoritos[/B][/COLOR] )" if config.get_videolibrary_support(): - title_label = bbcode_kodi2html(" ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )") - itemlist.append(Item(channel=item.channel, action="findvideos", title=title_label, fulltitle=title_label, + title_label = " ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )" + it1.append(Item(channel=item.channel, action="findvideos", title=title_label, fulltitle=title_label, url=url_targets, thumbnail=item.thumbnail, show=item.show, folder=False)) - title_label = bbcode_kodi2html(" ( [COLOR green][B]Tráiler[/B][/COLOR] )") + title_label = " ( [COLOR green][B]Tráiler[/B][/COLOR] )" - itemlist.append( - Item(channel=item.channel, action="buscartrailer", title=title_label, fulltitle=title_label, url=url_targets, + it1.append( + item.clone(channel="trailertools", action="buscartrailer", title=title_label, contentTitle=item.show, url=item.url, thumbnail=item.thumbnail, show=item.show)) - itemlist.append(Item(channel=item.channel, action="set_status", title=title, fulltitle=title, url=url_targets, + it1.append(Item(channel=item.channel, action="set_status", title=title, fulltitle=title, url=url_targets, thumbnail=item.thumbnail, show=item.show, folder=True)) data_js = httptools.downloadpage("http://hdfull.tv/templates/hdfull/js/jquery.hdfull.view.min.js").data @@ -663,7 +663,6 @@ def findvideos(item): infolabels = {} year = scrapertools.find_single_match(data, 'Año:\s*.*?(\d{4})') infolabels["year"] = year - matches = [] for match in data_decrypt: prov = eval(scrapertools.find_single_match(data_js, 'p\[%s\]\s*=\s*(\{.*?\}[\'"]\})' % match["provider"])) @@ -691,13 +690,15 @@ def findvideos(item): if account: url += "###" + id + ";" + type - itemlist.append( - Item(channel=item.channel, action="play", title=title, fulltitle=title, url=url, thumbnail=thumbnail, + it2.append( + item.clone(channel=item.channel, action="play", title=title, fulltitle=title, url=url, thumbnail=thumbnail, plot=plot, fanart=fanart, show=item.show, folder=True, infoLabels=infolabels, contentTitle=item.contentTitle, contentType=item.contentType, tipo=option)) - itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize()) - itemlist.sort(key=lambda it: it.title, reverse=True) + it2 = servertools.get_servers_itemlist(it2, lambda i: i.title % i.server.capitalize()) + it2.sort(key=lambda it: it.title, reverse=True) + itemlist.extend(it1) + itemlist.extend(it2) ## 2 = película if type == "2" and item.category != "Cine": if config.get_videolibrary_support(): @@ -754,22 +755,6 @@ def extrae_idiomas(bloqueidiomas): return textoidiomas, language -def bbcode_kodi2html(text): - if config.get_platform().startswith("plex") or config.get_platform().startswith("mediaserver"): - import re - text = re.sub(r'\[COLOR\s([^\]]+)\]', - r'', - text) - text = text.replace('[/COLOR]', '') - text = text.replace('[CR]', '
    ') - text = re.sub(r'\[([^\]]+)\]', - r'<\1>', - text) - text = text.replace('"color: white"', '"color: auto"') - - return text - - ## -------------------------------------------------------------------------------- def set_status(item): @@ -797,7 +782,7 @@ def set_status(item): data = httptools.downloadpage(host + path, post=post).data - title = bbcode_kodi2html("[COLOR green][B]OK[/B][/COLOR]") + title = "[COLOR green][B]OK[/B][/COLOR]" return [Item(channel=item.channel, action="episodios", title=title, fulltitle=title, url=item.url, thumbnail=item.thumbnail, show=item.show, folder=False)] @@ -815,15 +800,14 @@ def get_status(status, type, id): try: if id in status['favorites'][type]: - str1 = bbcode_kodi2html(" [COLOR orange][B]Favorito[/B][/COLOR]") + str1 = " [COLOR orange][B]Favorito[/B][/COLOR]" except: str1 = "" try: if id in status['status'][type]: str2 = state[status['status'][type][id]] - if str2 != "": str2 = bbcode_kodi2html( - " [COLOR green][B]" + state[status['status'][type][id]] + "[/B][/COLOR]") + if str2 != "": str2 = "[COLOR green][B]" + state[status['status'][type][id]] + "[/B][/COLOR]" except: str2 = "" From 6c623feef20b6799964084f14c8c8a398d3f1733 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Wed, 11 Oct 2017 08:35:47 -0500 Subject: [PATCH 26/46] Update areadocumental.py --- plugin.video.alfa/channels/areadocumental.py | 25 +++++++++++--------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/plugin.video.alfa/channels/areadocumental.py b/plugin.video.alfa/channels/areadocumental.py index 6a04ef75..b360e078 100644 --- a/plugin.video.alfa/channels/areadocumental.py +++ b/plugin.video.alfa/channels/areadocumental.py @@ -23,12 +23,12 @@ def mainlist(item): itemlist = [] item.text_color = color1 itemlist.append(item.clone(title="Novedades", action="entradas", - url="http://www.area-documental.com/resultados-reciente.php?buscar=&genero=", + url= host + "/resultados-reciente.php?buscar=&genero=", fanart="http://i.imgur.com/Q7fsFI6.png")) itemlist.append(item.clone(title="Destacados", action="entradas", - url="http://www.area-documental.com/resultados-destacados.php?buscar=&genero=", + url= host + "/resultados-destacados.php?buscar=&genero=", fanart="http://i.imgur.com/Q7fsFI6.png")) - itemlist.append(item.clone(title="Categorías", action="cat", url="http://www.area-documental.com/index.php", + itemlist.append(item.clone(title="Categorías", action="cat", url= host + "/index.php", fanart="http://i.imgur.com/Q7fsFI6.png")) itemlist.append(item.clone(title="Ordenados por...", action="indice", fanart="http://i.imgur.com/Q7fsFI6.png")) @@ -47,7 +47,7 @@ def configuracion(item): def search(item, texto): logger.info() - item.url = "http://www.area-documental.com/resultados.php?buscar=%s&genero=&x=0&y=0" % texto + item.url = host + "/resultados.php?buscar=%s&genero=&x=0&y=0" % texto item.action = "entradas" try: itemlist = entradas(item) @@ -65,7 +65,7 @@ def newest(categoria): item = Item() try: if categoria == "documentales": - item.url = "http://www.area-documental.com/resultados-reciente.php?buscar=&genero=" + item.url = host + "/resultados-reciente.php?buscar=&genero=" item.action = "entradas" itemlist = entradas(item) @@ -86,9 +86,9 @@ def indice(item): logger.info() itemlist = [] itemlist.append(item.clone(title="Título", action="entradas", - url="http://www.area-documental.com/resultados-titulo.php?buscar=&genero=")) + url= host + "/resultados-titulo.php?buscar=&genero=")) itemlist.append(item.clone(title="Año", action="entradas", - url="http://www.area-documental.com/resultados-anio.php?buscar=&genero=")) + url= host + "/resultados-anio.php?buscar=&genero=")) return itemlist @@ -125,9 +125,13 @@ def entradas(item): data2 = "" data = data.replace("\n", "").replace("\t", "") - patron = '
    .*?(.*?)(.*?)

    (.*?)

    ' \ - '.*?: (.*?).*?(.*?)
    ' + patron = '(?s)
    .*?a href="([^"]+)".*?' + patron += ' Date: Wed, 11 Oct 2017 15:11:49 -0300 Subject: [PATCH 27/46] Canales nuevos ajustes a bibilioteca adios pymovie --- plugin.video.alfa/channels/kbagi.json | 81 ++++ plugin.video.alfa/channels/kbagi.py | 426 ++++++++++++++++++++ plugin.video.alfa/channels/pymovie.py | 399 ------------------ plugin.video.alfa/channels/tiotorrent.json | 25 ++ plugin.video.alfa/channels/tiotorrent.py | 285 +++++++++++++ plugin.video.alfa/channels/zonatorrent.py | 3 + plugin.video.alfa/core/videolibrarytools.py | 4 +- plugin.video.alfa/servers/kbagi.json | 43 ++ plugin.video.alfa/servers/kbagi.py | 53 +++ 9 files changed, 918 insertions(+), 401 deletions(-) create mode 100644 plugin.video.alfa/channels/kbagi.json create mode 100644 plugin.video.alfa/channels/kbagi.py delete mode 100755 plugin.video.alfa/channels/pymovie.py create mode 100644 plugin.video.alfa/channels/tiotorrent.json create mode 100644 plugin.video.alfa/channels/tiotorrent.py create mode 100644 plugin.video.alfa/servers/kbagi.json create mode 100644 plugin.video.alfa/servers/kbagi.py diff --git a/plugin.video.alfa/channels/kbagi.json b/plugin.video.alfa/channels/kbagi.json new file mode 100644 index 00000000..2f292d54 --- /dev/null +++ b/plugin.video.alfa/channels/kbagi.json @@ -0,0 +1,81 @@ +{ + "id": "kbagi", + "name": "Kbagi/Diskokosmiko", + "language": ["cast", "lat"], + "active": true, + "adult": false, + "version": 1, + "thumbnail": "http://i.imgur.com/EjbfM7p.png?1", + "banner": "copiapop.png", + "categories": [ + "movie", + "tvshow" + ], + "settings": [ + { + "id": "include_in_global_search", + "type": "bool", + "label": "Incluir en busqueda global", + "default": false, + "enabled": true, + "visible": true + }, + { + "id": "kbagiuser", + "type": "text", + "color": "0xFF25AA48", + "label": "Usuario Kbagi", + "enabled": true, + "visible": true + }, + { + "id": "kbagipassword", + "type": "text", + "color": "0xFF25AA48", + "hidden": true, + "label": "Password Kbagi", + "enabled": "!eq(-1,'')", + "visible": true + }, + { + "id": "diskokosmikouser", + "type": "text", + "color": "0xFFC52020", + "label": "Usuario Diskokosmiko", + "enabled": true, + "visible": true + }, + { + "id": "diskokosmikopassword", + "type": "text", + "color": "0xFFC52020", + "hidden": true, + "label": "Password Diskokosmiko", + "enabled": "!eq(-1,'')", + "visible": true + }, + { + "id": "adult_content", + "type": "bool", + "color": "0xFFd50b0b", + "label": "Mostrar contenido adulto en las búsquedas", + "default": false, + "enabled": true, + "visible": true + }, + { + "id": "perfil", + "type": "list", + "label": "Perfil de color", + "default": 3, + "enabled": true, + "visible": true, + "lvalues": [ + "Sin color", + "Perfil 3", + "Perfil 2", + "Perfil 1" + ] + } + ] +} \ No newline at end of file diff --git a/plugin.video.alfa/channels/kbagi.py b/plugin.video.alfa/channels/kbagi.py new file mode 100644 index 00000000..325c9547 --- /dev/null +++ b/plugin.video.alfa/channels/kbagi.py @@ -0,0 +1,426 @@ +# -*- coding: utf-8 -*- + +import re +import threading + +from core import filetools +from core import httptools +from core import scrapertools +from core.item import Item +from platformcode import config, logger + +__perfil__ = config.get_setting('perfil', "kbagi") + +# Fijar perfil de color +perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFF088A08'], + ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFF088A08'], + ['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFF088A08']] + +if __perfil__ - 1 >= 0: + color1, color2, color3, color4, color5 = perfil[__perfil__ - 1] +else: + color1 = color2 = color3 = color4 = color5 = "" + +adult_content = config.get_setting("adult_content", "kbagi") + + +def login(pagina): + logger.info() + + try: + user = config.get_setting("%suser" % pagina.split(".")[0], "kbagi") + password = config.get_setting("%spassword" % pagina.split(".")[0], "kbagi") + if pagina == "kbagi.com": + if user == "" and password == "": + return False, "Para ver los enlaces de kbagi es necesario registrarse en kbagi.com" + elif user == "" or password == "": + return False, "kbagi: Usuario o contraseña en blanco. Revisa tus credenciales" + else: + if user == "" or password == "": + return False, "DiskoKosmiko: Usuario o contraseña en blanco. Revisa tus credenciales" + + data = httptools.downloadpage("http://%s" % pagina).data + if re.search(r'(?i)%s' % user, data): + return True, "" + + token = scrapertools.find_single_match(data, 'name="__RequestVerificationToken".*?value="([^"]+)"') + post = "__RequestVerificationToken=%s&UserName=%s&Password=%s" % (token, user, password) + headers = {'X-Requested-With': 'XMLHttpRequest'} + url_log = "http://%s/action/Account/Login" % pagina + data = httptools.downloadpage(url_log, post, headers).data + if "redirectUrl" in data: + logger.info("Login correcto") + return True, "" + else: + logger.error("Error en el login") + return False, "Nombre de usuario no válido. Comprueba tus credenciales" + except: + import traceback + logger.error(traceback.format_exc()) + return False, "Error durante el login. Comprueba tus credenciales" + + +def mainlist(item): + logger.info() + itemlist = [] + item.text_color = color1 + + logueado, error_message = login("kbagi.com") + + if not logueado: + itemlist.append(item.clone(title=error_message, action="configuracion", folder=False)) + else: + item.extra = "http://kbagi.com" + itemlist.append(item.clone(title="kbagi", action="", text_color=color2)) + itemlist.append( + item.clone(title=" Búsqueda", action="search", url="http://kbagi.com/action/SearchFiles")) + itemlist.append(item.clone(title=" Colecciones", action="colecciones", + url="http://kbagi.com/action/home/MoreNewestCollections?pageNumber=1")) + itemlist.append(item.clone(title=" Búsqueda personalizada", action="filtro", + url="http://kbagi.com/action/SearchFiles")) + itemlist.append(item.clone(title=" Mi cuenta", action="cuenta")) + + item.extra = "http://diskokosmiko.mx/" + itemlist.append(item.clone(title="DiskoKosmiko", action="", text_color=color2)) + itemlist.append(item.clone(title=" Búsqueda", action="search", url="http://diskokosmiko.mx/action/SearchFiles")) + itemlist.append(item.clone(title=" Colecciones", action="colecciones", + url="http://diskokosmiko.mx/action/home/MoreNewestCollections?pageNumber=1")) + itemlist.append(item.clone(title=" Búsqueda personalizada", action="filtro", + url="http://diskokosmiko.mx/action/SearchFiles")) + itemlist.append(item.clone(title=" Mi cuenta", action="cuenta")) + itemlist.append(item.clone(action="", title="")) + + folder_thumb = filetools.join(config.get_data_path(), 'thumbs_kbagi') + files = filetools.listdir(folder_thumb) + if files: + itemlist.append( + item.clone(title="Eliminar caché de imágenes (%s)" % len(files), action="delete_cache", text_color="red")) + itemlist.append(item.clone(title="Configuración del canal", action="configuracion", text_color="gold")) + + return itemlist + + +def search(item, texto): + logger.info() + item.post = "Mode=List&Type=Video&Phrase=%s&SizeFrom=0&SizeTo=0&Extension=&ref=pager&pageNumber=1" % texto.replace( + " ", "+") + try: + return listado(item) + except: + import sys, traceback + for line in sys.exc_info(): + logger.error("%s" % line) + logger.error(traceback.format_exc()) + return [] + + +def configuracion(item): + from platformcode import platformtools + ret = platformtools.show_channel_settings() + platformtools.itemlist_refresh() + return ret + + +def listado(item): + logger.info() + itemlist = [] + + data_thumb = httptools.downloadpage(item.url, item.post.replace("Mode=List", "Mode=Gallery")).data + if not item.post: + data_thumb = "" + item.url = item.url.replace("/gallery,", "/list,") + + data = httptools.downloadpage(item.url, item.post).data + data = re.sub(r"\n|\r|\t|\s{2}| |
    ", "", data) + + folder = filetools.join(config.get_data_path(), 'thumbs_kbagi') + patron = '
    (.*?)
    ' + bloques = scrapertools.find_multiple_matches(data, patron) + for block in bloques: + if "adult_info" in block and not adult_content: + continue + size = scrapertools.find_single_match(block, '

    ([^<]+)

    ') + scrapedurl, scrapedtitle = scrapertools.find_single_match(block, + '
    ([^<]+)<') + scrapedthumbnail = scrapertools.find_single_match(block, "background-image:url\('([^']+)'") + if scrapedthumbnail: + try: + thumb = scrapedthumbnail.split("-", 1)[0].replace("?", "\?") + if data_thumb: + url_thumb = scrapertools.find_single_match(data_thumb, "(%s[^']+)'" % thumb) + else: + url_thumb = scrapedthumbnail + scrapedthumbnail = filetools.join(folder, "%s.jpg" % url_thumb.split("e=", 1)[1][-20:]) + except: + scrapedthumbnail = "" + + if scrapedthumbnail: + t = threading.Thread(target=download_thumb, args=[scrapedthumbnail, url_thumb]) + t.setDaemon(True) + t.start() + + else: + scrapedthumbnail = item.extra + "/img/file_types/gallery/movie.png" + + scrapedurl = item.extra + scrapedurl + title = "%s (%s)" % (scrapedtitle, size) + if "adult_info" in block: + title += " [COLOR %s][+18][/COLOR]" % color4 + plot = scrapertools.find_single_match(block, '
    (.*?)
    ') + if plot: + plot = scrapertools.decodeHtmlentities(plot) + + new_item = Item(channel=item.channel, action="findvideos", title=title, url=scrapedurl, + thumbnail=scrapedthumbnail, contentTitle=scrapedtitle, text_color=color2, + extra=item.extra, infoLabels={'plot': plot}, post=item.post) + if item.post: + try: + new_item.folderurl, new_item.foldername = scrapertools.find_single_match(block, + '

    ([^<]+)<') + except: + pass + else: + new_item.folderurl = item.url.rsplit("/", 1)[0] + new_item.foldername = item.foldername + new_item.fanart = item.thumbnail + + itemlist.append(new_item) + + next_page = scrapertools.find_single_match(data, '

    ", "", content) + else: + usuario = True + if item.follow: + content = scrapertools.find_single_match(data, + 'id="followed_collections"(.*?)