([^<]+)<\/p>'
+ patron = ' ([^<]+)<\/p>'
matches = re.compile(patron, re.DOTALL).findall(data)
for scrapedurl, scrapedthumb, scrapedtitle, year, lang_data, scrapedplot in matches:
diff --git a/plugin.video.alfa/channels/pelix.json b/plugin.video.alfa/channels/pelix.json
new file mode 100644
index 00000000..56e91975
--- /dev/null
+++ b/plugin.video.alfa/channels/pelix.json
@@ -0,0 +1,78 @@
+{
+"id": "pelix",
+ "name": "Pelix",
+ "active": true,
+ "adult": false,
+ "language": ["lat", "cast"],
+ "thumbnail": "https://pelix.tv/build/images/logo.png",
+ "banner": "",
+ "categories": [
+ "movie",
+ "tvshow"
+ ],
+ "settings": [
+ {
+ "id": "include_in_global_search",
+ "type": "bool",
+ "label": "Incluir en busqueda global",
+ "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",
+ "Latino",
+ "Castellano",
+ "VOSE"
+ ]
+ },
+ {
+ "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": "comprueba_enlaces",
+ "type": "bool",
+ "label": "Verificar si los enlaces existen",
+ "default": false,
+ "enabled": true,
+ "visible": true
+ },
+ {
+ "id": "comprueba_enlaces_num",
+ "type": "list",
+ "label": "Número de enlaces a verificar",
+ "default": 1,
+ "enabled": true,
+ "visible": "eq(-1,true)",
+ "lvalues": [ "5", "10", "15", "20" ]
+ }
+ ]
+}
diff --git a/plugin.video.alfa/channels/pelix.py b/plugin.video.alfa/channels/pelix.py
new file mode 100644
index 00000000..ee58bd00
--- /dev/null
+++ b/plugin.video.alfa/channels/pelix.py
@@ -0,0 +1,352 @@
+# -*- coding: utf-8 -*-
+# -*- Channel Pelix -*-
+# -*- Created for Alfa-addon -*-
+# -*- By the Alfa Develop Group -*-
+
+import re
+import urllib
+import base64
+
+from channelselector import get_thumb
+from core import httptools
+from core import jsontools
+from core import scrapertools
+from core import servertools
+from core import tmdb
+from lib import jsunpack
+from core.item import Item
+from channels import filtertools
+from channels import autoplay
+from platformcode import config, logger
+
+
+IDIOMAS = {'6': 'Latino', '7': 'Castellano'}
+list_language = IDIOMAS.values()
+CALIDADES = {'1': '1080p', '3': '720p', '4':'720p'}
+list_quality = CALIDADES.values()
+
+list_servers = [
+ 'openload',
+ 'streamango',
+ 'fastplay',
+ 'rapidvideo',
+ 'netutv'
+]
+
+__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'pelix')
+__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'pelix')
+
+host = 'https://pelix.tv/'
+
+def mainlist(item):
+ logger.info()
+
+ autoplay.init(item.channel, list_servers, list_quality)
+
+ itemlist = []
+
+ itemlist.append(Item(channel=item.channel, title='Peliculas', action='menu_movies',
+ thumbnail= get_thumb('movies', auto=True), page=0))
+ itemlist.append(Item(channel=item.channel, title='Series', url=host+'home/genero/5', action='list_all',
+ type='tvshows', thumbnail= get_thumb('tvshows', auto=True), page=0))
+ itemlist.append(
+ item.clone(title="Buscar", action="search", url=host + 'movies/headserach', thumbnail=get_thumb("search", auto=True),
+ extra='movie'))
+
+ autoplay.show_option(item.channel, itemlist)
+
+ return itemlist
+
+def menu_movies(item):
+ logger.info()
+
+ itemlist=[]
+
+ itemlist.append(Item(channel=item.channel, title='Ultimas', url=host, path='home/newest?show=', action='list_all',
+ thumbnail=get_thumb('last', auto=True), type='movies', page=0))
+
+ #itemlist.append(Item(channel=item.channel, title='Mas Vistas', url=host, path='home/views?show=', action='list_all',
+ # thumbnail=get_thumb('all', auto=True), type='movies', page=0))
+
+ itemlist.append(Item(channel=item.channel, title='Genero', action='section',
+ thumbnail=get_thumb('genres', auto=True), type='movies'))
+ itemlist.append(Item(channel=item.channel, title='Por Año', action='section',
+ thumbnail=get_thumb('year', auto=True), type='movies'))
+
+ return itemlist
+
+def get_source(url):
+ logger.info()
+ data = httptools.downloadpage(url).data
+ data = re.sub(r'\n|\r|\t| | (\d{4})
|\s{2,}', "", data)
+ return data
+
+
+def get_language(lang_data):
+ logger.info()
+ language = []
+ lang_list = scrapertools.find_multiple_matches(lang_data, '/flags/(.*?).png\)')
+ for lang in lang_list:
+ if lang == 'en':
+ lang = 'vose'
+ if lang not in language:
+ language.append(lang)
+ return language
+
+def section(item):
+ logger.info()
+ itemlist=[]
+ data = get_source(host)
+ if 'Genero' in item.title:
+ data = scrapertools.find_single_match(data, 'Género(.*?)')
+ elif 'Año' in item.title:
+ data = scrapertools.find_single_match(data, 'Año(.*?)')
+
+ patron = '([^<]+)'
+ matches = re.compile(patron, re.DOTALL).findall(data)
+
+ for scrapedurl, scrapedtitle in matches:
+ itemlist.append(Item(channel=item.channel, url=scrapedurl, title=scrapedtitle, action='list_all',
+ type=item.type, page=0))
+
+ return itemlist
+
+
+def list_all(item):
+ logger.info()
+ import urllib
+ itemlist = []
+ if item.page == 0:
+ data = get_source(item.url+item.path)
+ else:
+ post = {'page': str(item.page)}
+ post = urllib.urlencode(post)
+ data = httptools.downloadpage(host+'home/%sAjax/%s' % ('newest', str(item.page)), post=post).data
+ data = re.sub(r'\n|\r|\t| |
|\s{2,}', "", data)
+
+ patron = '([^<]+)
|\s{2,}', "", data)
+ patron = 'class="results\d+".*?([^<]+)<'
+ matches = re.compile(patron, re.DOTALL).findall(data)
+
+ for scrapedurl, scrapedthumb, scrapedtitle in matches:
+
+ if '(' in scrapedtitle:
+ title = scrapertools.find_single_match(scrapedtitle, '(.*?)\(').strip()
+ year = scrapertools.find_single_match(scrapedtitle, '\((\d+)\)')
+ else:
+ title = scrapedtitle
+ year = '-'
+ url = scrapedurl
+ thumbnail = scrapedthumb
+
+ new_item=Item(channel=item.channel, title=title, url=url, thumbnail=thumbnail,
+ action='findvideos', infoLabels={'year':year})
+
+ itemlist.append(new_item)
+
+ return itemlist
+
+def newest(categoria):
+ logger.info()
+ itemlist = []
+ item = Item()
+ try:
+ item.type = 'movies'
+ item.page = 0
+ if categoria in ['peliculas']:
+ item.url = host + 'home/newest?show='
+ elif categoria == 'infantiles':
+ item.url = host + 'home/genero/54'
+ elif categoria == 'terror':
+ item.url = host + 'home/genero/49'
+ 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
diff --git a/plugin.video.alfa/channels/seriesblanco.py b/plugin.video.alfa/channels/seriesblanco.py
index 0eed39d9..aebecc79 100644
--- a/plugin.video.alfa/channels/seriesblanco.py
+++ b/plugin.video.alfa/channels/seriesblanco.py
@@ -114,6 +114,49 @@ def list_all(item):
))
return itemlist
+def list_from_genre(item):
+ logger.info()
+
+ itemlist = []
+ data = get_source(item.url)
+ contentSerieName = ''
+
+ patron = '