From 79f289b2833850ebc624fd20ae0f98ee8b11c15b Mon Sep 17 00:00:00 2001 From: Kingbox <37674310+lopezvg@users.noreply.github.com> Date: Tue, 15 Jan 2019 21:25:08 +0100 Subject: [PATCH 1/3] Grantorrent: Novedades 4K --- plugin.video.alfa/channels/grantorrent.json | 8 +++++++ plugin.video.alfa/channels/grantorrent.py | 26 +++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/plugin.video.alfa/channels/grantorrent.json b/plugin.video.alfa/channels/grantorrent.json index 923acf94..88e3b68c 100644 --- a/plugin.video.alfa/channels/grantorrent.json +++ b/plugin.video.alfa/channels/grantorrent.json @@ -113,6 +113,14 @@ "14", "15" ] + }, + { + "id": "include_in_newest_4k", + "type": "bool", + "label": "Incluir en Novedades - 4K", + "default": true, + "enabled": true, + "visible": true } ] } diff --git a/plugin.video.alfa/channels/grantorrent.py b/plugin.video.alfa/channels/grantorrent.py index e2bb54ba..ff07dc1a 100644 --- a/plugin.video.alfa/channels/grantorrent.py +++ b/plugin.video.alfa/channels/grantorrent.py @@ -1086,3 +1086,29 @@ def search(item, texto): for line in sys.exc_info(): logger.error("ERROR: %s: SEARCH" % line) return [] + + +def newest(categoria): + logger.info() + itemlist = [] + item = Item() + + try: + if categoria == '4k': + item.url = host + "categoria/4k/" + item.extra = "peliculas" + item.channel = channel + item.category_new= 'newest' + + itemlist = listado(item) + if ">> Página siguiente" 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 \ No newline at end of file From 0ed3347653d99fde840a8adf74f7b5fb2a5694bd Mon Sep 17 00:00:00 2001 From: Kingbox <37674310+lopezvg@users.noreply.github.com> Date: Tue, 15 Jan 2019 21:28:56 +0100 Subject: [PATCH 2/3] Rarbg: nuevo canal USA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NO PUBLICITAR: se bloquea cada 10 accesos por un control desde la web de "No Soy Robot". Desearía que se analizara para ver cómo se puede rodear el problema. De momento es suficiente con reiniciar el Router para obtener una nueva IP, pero puede ser incómodo --- plugin.video.alfa/channels/rarbg.json | 77 ++ plugin.video.alfa/channels/rarbg.py | 828 ++++++++++++++++++++ plugin.video.alfa/core/videolibrarytools.py | 56 +- plugin.video.alfa/lib/generictools.py | 29 +- 4 files changed, 954 insertions(+), 36 deletions(-) create mode 100644 plugin.video.alfa/channels/rarbg.json create mode 100644 plugin.video.alfa/channels/rarbg.py diff --git a/plugin.video.alfa/channels/rarbg.json b/plugin.video.alfa/channels/rarbg.json new file mode 100644 index 00000000..76893d53 --- /dev/null +++ b/plugin.video.alfa/channels/rarbg.json @@ -0,0 +1,77 @@ +{ + "id": "rarbg", + "name": "Rarbg", + "active": true, + "adult": false, + "language": [], + "thumbnail": "https://dyncdn.me/static/20/img/logo_dark_nodomain2_optimized.png", + "categories": [ + "torrent", + "movie", + "tvshow", + "vo" + ], + "settings": [ + { + "default": false, + "enabled": true, + "id": "include_in_global_search", + "label": "Incluir en busqueda global", + "type": "bool", + "visible": true + }, + { + "default": true, + "enabled": true, + "id": "modo_grafico", + "label": "Buscar información extra (TMDB)", + "type": "bool", + "visible": true + }, + { + "id": "filter_languages", + "type": "list", + "label": "Mostrar enlaces en idioma...", + "default": 0, + "enabled": true, + "visible": true, + "lvalues": [ + "No filtrar", + "CAST", + "LAT", + "VO", + "VOS", + "VOSE" + ] + }, + { + "id": "timeout_downloadpage", + "type": "list", + "label": "Timeout (segs.) en descarga de páginas o verificación de servidores", + "default": 5, + "enabled": true, + "visible": true, + "lvalues": [ + "None", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10" + ] + }, + { + "id": "seleccionar_ult_temporadda_activa", + "type": "bool", + "label": "Seleccionar para Videoteca si estará activa solo la última Temporada", + "default": true, + "enabled": true, + "visible": true + } + ] +} \ No newline at end of file diff --git a/plugin.video.alfa/channels/rarbg.py b/plugin.video.alfa/channels/rarbg.py new file mode 100644 index 00000000..bb0ca6fe --- /dev/null +++ b/plugin.video.alfa/channels/rarbg.py @@ -0,0 +1,828 @@ +# -*- coding: utf-8 -*- + +import re +import sys +import urllib +import urlparse +import time + +from channelselector import get_thumb +from core import httptools +from core import scrapertools +from core import servertools +from core.item import Item +from platformcode import config, logger +from core import tmdb +from lib import generictools +from channels import filtertools +from channels import autoplay + + +#IDIOMAS = {'CAST': 'Castellano', 'LAT': 'Latino', 'VO': 'Version Original'} +IDIOMAS = {'Castellano': 'CAST', 'Latino': 'LAT', 'Version Original': 'VO'} +list_language = IDIOMAS.values() +list_quality = [] +list_servers = ['torrent'] + +host = 'https://rarbgmirror.xyz/' +channel = 'rarbg' +categoria = channel.capitalize() +__modo_grafico__ = config.get_setting('modo_grafico', channel) +modo_ultima_temp = config.get_setting('seleccionar_ult_temporadda_activa', channel) #Actualización sólo últ. Temporada? +timeout = config.get_setting('timeout_downloadpage', channel) + + +def mainlist(item): + logger.info() + itemlist = [] + + thumb_cartelera = get_thumb("now_playing.png") + thumb_pelis = get_thumb("channels_movie.png") + thumb_pelis_hd = get_thumb("channels_movie_hd.png") + thumb_pelis_VO = get_thumb("channels_vos.png") + thumb_series = get_thumb("channels_tvshow.png") + thumb_series_hd = get_thumb("channels_tvshow_hd.png") + thumb_series_VOD = get_thumb("videolibrary_tvshow.png") + thumb_generos = get_thumb("genres.png") + thumb_buscar = get_thumb("search.png") + thumb_separador = get_thumb("next.png") + thumb_settings = get_thumb("setting_0.png") + + autoplay.init(item.channel, list_servers, list_quality) + + itemlist.append(Item(channel=item.channel, url=host, title="[COLOR yellow]NOTA: Esta web puede considerar una intrusión[/COLOR]", folder=False, thumbnail=thumb_separador)) + itemlist.append(Item(channel=item.channel, url=host, title="[COLOR yellow]más de 1 usuario o 10 accesos por IP/Router.[/COLOR]", folder=False, thumbnail=thumb_separador)) + itemlist.append(Item(channel=item.channel, url=host, title="[COLOR yellow]Si es bloqueado, renueve la IP en el Router[/COLOR]", folder=False, thumbnail=thumb_separador)) + + itemlist.append(Item(channel=item.channel, title="Películas", action="listado", url=host + "torrents.php?category=movies&search=&order=data&by=DESC", thumbnail=thumb_pelis_VO, extra="peliculas")) + itemlist.append(Item(channel=item.channel, title=" - Calidades", action="calidades", url=host + "torrents.php?category=movies&search=&order=data&by=DESC", thumbnail=thumb_pelis_hd, extra="peliculas")) + #itemlist.append(Item(channel=item.channel, title=" - Géneros", action="generos", url=host + "catalog/movies/", thumbnail=thumb_generos, extra="peliculas")) + + itemlist.append(Item(channel=item.channel, title="Series", action="listado", url=host + "torrents.php?category=2;18;41;49&search=&order=data&by=DESC", thumbnail=thumb_series_VOD, extra="series")) + itemlist.append(Item(channel=item.channel, title=" - Calidades", action="calidades", url=host + "torrents.php?category=2;18;41;49&search=&order=data&by=DESC", thumbnail=thumb_series_hd, extra="series")) + #itemlist.append(Item(channel=item.channel, title=" - Géneros", action="generos", url=host + "catalog/tv/", thumbnail=thumb_generos, extra="series")) + + itemlist.append(Item(channel=item.channel, title="Buscar...", action="search", url=host + "?s=%s", thumbnail=thumb_buscar, extra="search")) + + itemlist.append(Item(channel=item.channel, url=host, title="[COLOR yellow]Configuración:[/COLOR]", folder=False, thumbnail=thumb_separador)) + + itemlist.append(Item(channel=item.channel, action="configuracion", title="Configurar canal", thumbnail=thumb_settings)) + + autoplay.show_option(item.channel, itemlist) #Activamos Autoplay + + return itemlist + + +def configuracion(item): + from platformcode import platformtools + ret = platformtools.show_channel_settings() + platformtools.itemlist_refresh() + return + + +def calidades(item): + logger.info() + itemlist = [] + + data = '' + try: + data = re.sub(r"\n|\r|\t|\s{2}|()", "", httptools.downloadpage(item.url, timeout=timeout).data) + data = unicode(data, "utf-8", errors="replace").encode("utf-8") + except: + pass + + patron = '