From 07147d7e4817452124a00270b1117819455c3b44 Mon Sep 17 00:00:00 2001
From: Alfa-beto <30815244+Alfa-beto@users.noreply.github.com>
Date: Thu, 25 Oct 2018 09:58:06 -0300
Subject: [PATCH] - Repelis.live: Nuevo canal
---
plugin.video.alfa/channels/repelislive.json | 55 +++++
plugin.video.alfa/channels/repelislive.py | 246 ++++++++++++++++++++
2 files changed, 301 insertions(+)
create mode 100644 plugin.video.alfa/channels/repelislive.json
create mode 100644 plugin.video.alfa/channels/repelislive.py
diff --git a/plugin.video.alfa/channels/repelislive.json b/plugin.video.alfa/channels/repelislive.json
new file mode 100644
index 00000000..7b8d8ac7
--- /dev/null
+++ b/plugin.video.alfa/channels/repelislive.json
@@ -0,0 +1,55 @@
+{
+ "id": "repelislive",
+ "name":"Repelis.live",
+ "thumbnail":"https://i.postimg.cc/j5ndjr3j/repelislive.png",
+ "banner":"",
+ "active": true,
+ "adult": false,
+ "language": ["cast", "lat"],
+ "version": 1,
+ "categories": [
+ "movie",
+ "vos"
+ ],
+ "settings": [
+ {
+ "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
+ },
+ {
+ "id": "include_in_newest_terror",
+ "type": "bool",
+ "label": "Incluir en Novedades - terror",
+ "default": true,
+ "enabled": true,
+ "visible": true
+ },
+ {
+ "id": "filter_languages",
+ "type": "list",
+ "label": "Mostrar enlaces en idioma...",
+ "default": 0,
+ "enabled": true,
+ "visible": true,
+ "lvalues": [
+ "No filtrar",
+ "LAT",
+ "CAST",
+ "VOSE"
+ ]
+ }
+ ]
+
+}
diff --git a/plugin.video.alfa/channels/repelislive.py b/plugin.video.alfa/channels/repelislive.py
new file mode 100644
index 00000000..af733fb7
--- /dev/null
+++ b/plugin.video.alfa/channels/repelislive.py
@@ -0,0 +1,246 @@
+# -*- coding: utf-8 -*-
+# -*- Channel Repelis.live -*-
+# -*- Created for Alfa-addon -*-
+# -*- By the Alfa Develop Group -*-
+
+import re
+import urllib
+import urlparse
+
+from channelselector import get_thumb
+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
+from core import tmdb
+from channels import filtertools
+from channels import autoplay
+
+IDIOMAS = {'Latino': 'LAT', 'Castellano':'CAST', 'Subtitulado': 'VOSE'}
+list_language = IDIOMAS.values()
+list_quality = []
+list_servers = ['openload', 'streamango', 'rapidvideo', 'netutv']
+
+host = "http://repelis.live/"
+
+def mainlist(item):
+ logger.info()
+
+ autoplay.init(item.channel, list_servers, list_quality)
+ itemlist = list()
+
+ itemlist.append(
+ Item(channel=item.channel,
+ title="Ultimas",
+ action="list_all",
+ url=host,
+ thumbnail=get_thumb("last", auto=True)))
+
+ itemlist.append(
+ Item(channel=item.channel,
+ title="Castellano",
+ action="list_all",
+ url=host+'pelis-castellano/',
+ thumbnail=get_thumb("cast", auto=True)))
+
+ itemlist.append(
+ Item(channel=item.channel,
+ title="Latino",
+ action="list_all",
+ url=host+'pelis-latino/',
+ thumbnail=get_thumb("lat", auto=True)))
+
+ itemlist.append(
+ Item(channel=item.channel,
+ title="VOSE",
+ action="list_all",
+ url=host+'pelis-subtitulado/',
+ thumbnail=get_thumb("vose", auto=True)))
+
+ itemlist.append(
+ Item(channel=item.channel,
+ title="Generos",
+ action="categories",
+ url=host,
+ thumbnail=get_thumb('genres', auto=True)
+ ))
+
+ itemlist.append(
+ Item(channel=item.channel,
+ title="Por Año",
+ action="categories",
+ url=host,
+ thumbnail=get_thumb('year', auto=True)
+ ))
+
+ itemlist.append(
+ Item(channel=item.channel,
+ title="Buscar",
+ action="search",
+ url=host + '?s=',
+ thumbnail=get_thumb("search", auto=True)
+ ))
+
+ autoplay.show_option(item.channel, itemlist)
+
+ 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 categories(item):
+ logger.info()
+ itemlist = []
+
+ data = get_source(item.url)
+ if item.title != 'Generos':
+ patron = ''
+ else:
+ data = scrapertools.find_single_match(data, 'Categories