(.*?)
' + matches = re.compile(patron, re.DOTALL).findall(data) + + for scrapedurl, scrapedthumb, scrapedtitle, year, lang_data, scrapedplot in matches: + + title = scrapedtitle + url = scrapedurl + thumbnail = scrapedthumb + plot = scrapedplot + language = get_language(lang_data) + if language: + action = 'findvideos' + else: + action = 'seasons' + + new_item=Item(channel=item.channel, title=title, url=url, thumbnail=thumbnail, plot=plot, + action=action, + language=language, infoLabels={'year':year}) + if new_item.action == 'findvideos': + new_item.contentTitle = new_item.title + else: + new_item.contentSerieName = new_item.title + + itemlist.append(new_item) + + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) + + return itemlist + +def newest(categoria): + logger.info() + itemlist = [] + item = Item() + try: + if categoria in ['peliculas']: + item.url = host + 'movies' + elif categoria == 'infantiles': + item.url = host + 'genre/animacion/' + elif categoria == 'terror': + item.url = host + 'genre/terror/' + item.type='movies' + 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 38e27aa01469285c597b1e4b80d79d1d8345e550 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 15 May 2018 14:53:12 -0500 Subject: [PATCH 09/17] estadepelis: fix From 8b2c0adbf4218378ac7f2945b60134d39a859441 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Tue, 15 May 2018 14:53:59 -0500 Subject: [PATCH 10/17] estadepelis: fix --- plugin.video.alfa/channels/estadepelis.json | 3 +- plugin.video.alfa/channels/estadepelis.py | 40 ++++++++------------- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/plugin.video.alfa/channels/estadepelis.json b/plugin.video.alfa/channels/estadepelis.json index 1bc265be..ff8f2a95 100755 --- a/plugin.video.alfa/channels/estadepelis.json +++ b/plugin.video.alfa/channels/estadepelis.json @@ -28,7 +28,8 @@ "lvalues": [ "No filtrar", "Latino", - "VOS" + "VOS", + "Castellano" ] }, { diff --git a/plugin.video.alfa/channels/estadepelis.py b/plugin.video.alfa/channels/estadepelis.py index 07989ada..325ae879 100755 --- a/plugin.video.alfa/channels/estadepelis.py +++ b/plugin.video.alfa/channels/estadepelis.py @@ -22,7 +22,7 @@ list_quality = [] list_servers = ['yourupload', 'openload', 'sendvid'] vars = { - 'ef5ca18f089cf01316bbc967fa10f72950790c39ef5ca18f089cf01316bbc967fa10f72950790c39': 'http://www.estadepelis.com/', + 'ef5ca18f089cf01316bbc967fa10f72950790c39ef5ca18f089cf01316bbc967fa10f72950790c39': 'http://tawnestdplsnetps.pw/', 'b48699bb49d4550f27879deeb948d4f7d9c5949a8': 'embed', 'JzewJkLlrvcFnLelj2ikbA': 'php?url=', 'p889c6853a117aca83ef9d6523335dc065213ae86': 'player', @@ -194,8 +194,8 @@ def generos(item): itemlist = [] norep = [] data = httptools.downloadpage(item.url).data - - patron = '([^<]+)<\/p>') else: - title = item.contentSerieName + ' (' + server + ') ' + idioma + title = item.contentSerieName + ' (' + server + ') ' + language plot = item.plot thumbnail = servertools.guess_server_thumbnail(title) @@ -399,7 +400,6 @@ def findvideos(item): quality='', language=language )) - logger.debug('url: %s' % url) # Requerido para FilterTools itemlist = filtertools.get_links(itemlist, item, list_language) @@ -423,23 +423,13 @@ def findvideos(item): def play(item): logger.info() itemlist = [] - data = httptools.downloadpage(item.url, add_referer=True).data + data = httptools.downloadpage(item.url).data if 'your' in item.url: item.url = 'http://www.yourupload.com/embed/' + scrapertools.find_single_match(data, 'src=".*?code=(.*?)"') itemlist.append(item) else: - itemlist = servertools.find_video_items(data=data) - if config.get_videolibrary_support() and len(itemlist) > 0: - 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 From e66e0fd94e60514acb0dddf3566afdd245ab120b Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Sat, 19 May 2018 09:13:02 -0500 Subject: [PATCH 11/17] pelismedia: nuevo canal --- plugin.video.alfa/channels/pelismedia.json | 88 +++++++ plugin.video.alfa/channels/pelismedia.py | 289 +++++++++++++++++++++ 2 files changed, 377 insertions(+) create mode 100644 plugin.video.alfa/channels/pelismedia.json create mode 100644 plugin.video.alfa/channels/pelismedia.py diff --git a/plugin.video.alfa/channels/pelismedia.json b/plugin.video.alfa/channels/pelismedia.json new file mode 100644 index 00000000..72726692 --- /dev/null +++ b/plugin.video.alfa/channels/pelismedia.json @@ -0,0 +1,88 @@ +{ + "id": "pelismedia", + "name": "PelisMedia", + "active": true, + "adult": false, + "language": ["lat"], + "thumbnail": "https://s14.postimg.cc/eclmujsch/12715507_1112827435402340_7302361220060367711_n.jpg", + "categories": ["movie", "tvshow"], + "settings": [ + { + "id": "include_in_global_search", + "type": "bool", + "label": "Incluir en busqueda global", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_peliculas", + "type": "bool", + "label": "Incluir en Novedades - Peliculas", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_series", + "type": "bool", + "label": "Incluir en Novedades - Series", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_terror", + "type": "bool", + "label": "Incluir en Novedades - terror", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_latino", + "type": "bool", + "label": "Incluir en Novedades - Latino", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "perfil", + "type": "list", + "label": "Perfil de color", + "default": 2, + "enabled": true, + "visible": true, + "lvalues": [ + "Perfil 3", + "Perfil 2", + "Perfil 1", + "Ninguno" + ] + }, + { + "id": "episodios_x_pag", + "type": "list", + "label": "Episodios por página", + "default": 2, + "enabled": true, + "visible": true, + "lvalues": [ + "10", + "15", + "20", + "25", + "30" + ] + }, + { + "id": "temporada_o_todos", + "type": "bool", + "label": "Mostrar temporadas", + "default": true, + "enabled": true, + "visible": true + } + ] +} \ No newline at end of file diff --git a/plugin.video.alfa/channels/pelismedia.py b/plugin.video.alfa/channels/pelismedia.py new file mode 100644 index 00000000..0712b03f --- /dev/null +++ b/plugin.video.alfa/channels/pelismedia.py @@ -0,0 +1,289 @@ +# -*- coding: utf-8 -*- +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 +from channelselector import get_thumb + +__perfil__ = int(config.get_setting('perfil', 'pelisultra')) + +# Fijar perfil de color +perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00'], + ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E'], + ['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE']] + +if __perfil__ < 3: + color1, color2, color3 = perfil[__perfil__] +else: + color1 = color2 = color3 = "" + +host="http://www.pelismedia.com" + +def mainlist(item): + logger.info() + itemlist = [] + item.thumbnail = get_thumb('movies', auto=True) + itemlist.append(item.clone(title="Películas:", folder=False, text_color="0xFFD4AF37", text_bold=True)) + itemlist.append(Item(channel = item.channel, title = " Novedades", action = "peliculas", url = host, + thumbnail=get_thumb('newest', auto=True))) + itemlist.append(Item(channel = item.channel, title = " Estrenos", action = "peliculas", url = host + "/genero/estrenos/", + thumbnail=get_thumb('premieres', auto=True))) + itemlist.append(Item(channel = item.channel, title = " Por género", action = "genero", url = host + "/genero/", + thumbnail=get_thumb('genres', auto=True) )) + item.thumbnail = get_thumb('tvshows', auto=True) + itemlist.append(item.clone(title="Series:", folder=False, text_color="0xFFD4AF37", text_bold=True)) + itemlist.append(Item(channel = item.channel, title = " Todas las series", action = "series", url = host + "/series/", + thumbnail=get_thumb('all', auto=True))) + itemlist.append(Item(channel = item.channel, title = " Nuevos episodios", action = "nuevos_episodios", url = host + "/episodio/", + thumbnail=get_thumb('new episodes', auto=True))) + itemlist.append(Item(channel = item.channel, title = "Buscar...", action = "search", url = host, text_color="red", text_bold=True, + thumbnail=get_thumb('search', auto=True))) + itemlist.append(item.clone(title="Configurar canal...", text_color="green", action="configuracion", text_bold=True)) + return itemlist + +def configuracion(item): + from platformcode import platformtools + ret = platformtools.show_channel_settings() + platformtools.itemlist_refresh() + return ret + +def newest(categoria): + logger.info() + itemlist = [] + item = Item() + try: + if categoria in ["peliculas", "latino"]: + item.url = host + itemlist = peliculas(item) + elif categoria == 'terror': + item.url = host + '/genero/terror/' + itemlist = peliculas(item) + elif categoria == "series": + item.url = host + "/episodio/" + itemlist = nuevos_episodios(item) + if "Pagina" in itemlist[-1].title: + itemlist.pop() + + # Se captura la excepción, para no interrumpir al canal novedades si un canal falla + except: + import sys + for line in sys.exc_info(): + logger.error("{0}".format(line)) + return [] + + return itemlist + +def peliculas(item): + #logger.info() + logger.info(item) + itemlist = [] + data = httptools.downloadpage(item.url).data + + data2 = scrapertools.find_single_match(data,'(?s)
-
-
- patron = '