From 29581c50ca7e6383a75784db02c83020387b23b2 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Wed, 1 Aug 2018 17:33:53 -0500 Subject: [PATCH] varios fix --- plugin.video.alfa/channels/animeshd.json | 3 +- plugin.video.alfa/channels/animeyt.json | 5 +- plugin.video.alfa/channels/cinehindi.json | 3 +- plugin.video.alfa/channels/doramasmp4.json | 3 +- plugin.video.alfa/channels/dospelis.json | 79 +++++ plugin.video.alfa/channels/dospelis.py | 345 +++++++++++++++++++++ plugin.video.alfa/channels/pelisr.py | 13 +- 7 files changed, 436 insertions(+), 15 deletions(-) create mode 100644 plugin.video.alfa/channels/dospelis.json create mode 100644 plugin.video.alfa/channels/dospelis.py diff --git a/plugin.video.alfa/channels/animeshd.json b/plugin.video.alfa/channels/animeshd.json index 8aeb2a89..6b4266da 100755 --- a/plugin.video.alfa/channels/animeshd.json +++ b/plugin.video.alfa/channels/animeshd.json @@ -7,7 +7,8 @@ "thumbnail": "https://s21.postimg.cc/b43i3ljav/animeshd.png", "banner": "https://s4.postimg.cc/lulxulmql/animeshd-banner.png", "categories": [ - "anime" + "anime", + "vos" ], "settings": [ { diff --git a/plugin.video.alfa/channels/animeyt.json b/plugin.video.alfa/channels/animeyt.json index 5747693d..54ead4c4 100644 --- a/plugin.video.alfa/channels/animeyt.json +++ b/plugin.video.alfa/channels/animeyt.json @@ -3,10 +3,11 @@ "name": "AnimeYT", "active": true, "adult": false, - "language": "es", + "language": "cast, lat", "thumbnail": "http://i.imgur.com/dHpupFk.png", "categories": [ - "anime" + "anime", + "vos" ], "settings": [ { diff --git a/plugin.video.alfa/channels/cinehindi.json b/plugin.video.alfa/channels/cinehindi.json index 202786d2..a7812b3f 100755 --- a/plugin.video.alfa/channels/cinehindi.json +++ b/plugin.video.alfa/channels/cinehindi.json @@ -7,6 +7,7 @@ "thumbnail": "cinehindi.png", "banner": "http://i.imgur.com/cau9TVe.png", "categories": [ - "movie" + "movie", + "vos" ] } \ No newline at end of file diff --git a/plugin.video.alfa/channels/doramasmp4.json b/plugin.video.alfa/channels/doramasmp4.json index 52112148..a9c09713 100644 --- a/plugin.video.alfa/channels/doramasmp4.json +++ b/plugin.video.alfa/channels/doramasmp4.json @@ -7,7 +7,8 @@ "thumbnail": "https://s14.postimg.cc/ibh4znkox/doramasmp4.png", "banner": "", "categories": [ - "tvshow" + "tvshow", + "vos" ], "settings": [ { diff --git a/plugin.video.alfa/channels/dospelis.json b/plugin.video.alfa/channels/dospelis.json new file mode 100644 index 00000000..9a9dc8d9 --- /dev/null +++ b/plugin.video.alfa/channels/dospelis.json @@ -0,0 +1,79 @@ +{ +"id": "dospelis", + "name": "DosPelis", + "active": true, + "adult": false, + "language": ["lat", "cast", "vose"], + "thumbnail": "https://www.dospelis.com/wp-content/uploads/2018/07/dospelislogo.png", + "banner": "", + "categories": [ + "movie", + "tvshow", + "vos" + ], + "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/dospelis.py b/plugin.video.alfa/channels/dospelis.py new file mode 100644 index 00000000..fcfaf02e --- /dev/null +++ b/plugin.video.alfa/channels/dospelis.py @@ -0,0 +1,345 @@ +# -*- coding: utf-8 -*- +# -*- Channel DosPelis -*- +# -*- 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 = {'mx': 'Latino', 'dk':'Latino', 'es': 'Castellano', 'en': 'VOSE', 'gb':'VOSE'} +list_language = IDIOMAS.values() + +list_quality = [] + +list_servers = [ + 'directo', + 'openload', +] + +__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'dospelis') +__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'dospelis') + +host = 'https://dospelis.com/' + +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))) + itemlist.append(Item(channel=item.channel, title='Series', url=host+'tvshows', action='list_all', type='tvshows', + thumbnail= get_thumb('tvshows', auto=True))) + itemlist.append( + item.clone(title="Buscar", action="search", url=host + '?s=', 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='Todas', url=host + 'movies', action='list_all', + thumbnail=get_thumb('all', auto=True), type='movies')) + 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| |
|\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=[] + duplicados=[] + data = get_source(host+'/'+item.type) + if 'Genero' in item.title: + patron = '
  • (.*?)/i>' + elif 'Año' in item.title: + patron = '
  • (.*?)' + elif 'Calidad' in item.title: + patron = 'menu-item-object-dtquality menu-item-\d+>(.*?)' + + matches = re.compile(patron, re.DOTALL).findall(data) + + for scrapedurl, scrapedtitle in matches: + title = scrapedtitle + plot='' + if 'Genero' in item.title: + quantity = scrapertools.find_single_match(scrapedtitle,' (.*?)<') + title = scrapertools.find_single_match(scrapedtitle,'(.*?)
    (.*?).*?quality>(.*?)' + patron += '<\/div>.*?<\/h3>(.*?)<\/span><\/div>.*?flags(.*?)metadata' + matches = re.compile(patron, re.DOTALL).findall(data) + + for scrapedthumbnail, scrapedtitle, quality, scrapedurl, year, lang_data in matches: + + + title = '%s [%s] [%s]' % (scrapedtitle, year, quality) + contentTitle = scrapedtitle + thumbnail = scrapedthumbnail + url = scrapedurl + language = get_language(lang_data) + + itemlist.append(item.clone(action='findvideos', + title=title, + url=url, + thumbnail=thumbnail, + contentTitle=contentTitle, + language=language, + quality=quality, + infoLabels={'year':year})) + + elif item.type == 'tvshows': + patron = '
    (.*?).*?' + patron += '.*?<\/h3>(.*?)<\/span><\/div>' + matches = re.compile(patron, re.DOTALL).findall(data) + + for scrapedthumbnail, scrapedtitle, scrapedurl, year in matches: + title = scrapedtitle + contentSerieName = scrapedtitle + thumbnail = scrapedthumbnail + url = scrapedurl + + itemlist.append(item.clone(action='seasons', + title=title, + url=url, + thumbnail=thumbnail, + contentSerieName=contentSerieName, + infoLabels={'year':year})) + + tmdb.set_infoLabels(itemlist, seekTmdb=True) + # Paginación + + #url_next_page = scrapertools.find_single_match(data,"]+)>