From fb14f64fcbed29c5b0ec7e285284567de092cb58 Mon Sep 17 00:00:00 2001 From: Kingbox <37674310+lopezvg@users.noreply.github.com> Date: Wed, 5 Dec 2018 12:00:44 +0100 Subject: [PATCH 01/11] =?UTF-8?q?Todopeliculas:=20correcci=C3=B3n=20pagina?= =?UTF-8?q?do?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.video.alfa/channels/todopeliculas.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/todopeliculas.py b/plugin.video.alfa/channels/todopeliculas.py index 6b7b68ab..b10a1954 100644 --- a/plugin.video.alfa/channels/todopeliculas.py +++ b/plugin.video.alfa/channels/todopeliculas.py @@ -178,7 +178,9 @@ def listado(item): #logger.debug(data) #Buscamos la url de paginado y la última página - patron = 'Siguiente<\/a>' + patron = 'Next<\/a>' + if not scrapertools.find_single_match(data, patron): + patron = 'Siguiente<\/a>' try: next_page_url, curr_page = scrapertools.find_single_match(data, patron) curr_page = int(curr_page) / len(matches) From b6673053eb946d4218b9708f5da14dbcd4c56b6f Mon Sep 17 00:00:00 2001 From: chivmalev Date: Wed, 5 Dec 2018 08:56:50 -0300 Subject: [PATCH 02/11] =?UTF-8?q?correcci=C3=B3nes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.video.alfa/channels/maxipelis24.py | 55 +++++++++++++---------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/plugin.video.alfa/channels/maxipelis24.py b/plugin.video.alfa/channels/maxipelis24.py index d8d1eb30..4e1d0938 100644 --- a/plugin.video.alfa/channels/maxipelis24.py +++ b/plugin.video.alfa/channels/maxipelis24.py @@ -98,29 +98,31 @@ def findvideos(item): itemlist = [] data = httptools.downloadpage(item.url).data - data = re.sub(r"\n|\r|\t|\s{2}| ","", data) - patron = scrapertools.find_single_match(data, '
(.*?)
') - patron = '
.+?[a-zA-Z]="([^&]+)&' - + data = re.sub(r"\n|\r|\t|\s{2}| ","", data) + + patron = '
Date: Wed, 5 Dec 2018 09:59:21 -0500 Subject: [PATCH 03/11] Actualizados MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit allcalidad: fix listado descargacineclasico: agregado sección: Listado alfabético porntrex: fix listado rexpelis: desactivado, web no funciona seriesmetro: fix listado youporn: aparecía en listado general de canales vidup: fix enlaces --- plugin.video.alfa/channels/allcalidad.py | 12 +++--- .../channels/descargacineclasico.py | 38 ++++++++++--------- plugin.video.alfa/channels/porntrex.py | 13 ++++--- plugin.video.alfa/channels/rexpelis.json | 2 +- plugin.video.alfa/channels/seriesmetro.py | 2 +- plugin.video.alfa/channels/youporn.json | 2 +- plugin.video.alfa/servers/vidup.json | 2 +- plugin.video.alfa/servers/vidup.py | 5 ++- 8 files changed, 41 insertions(+), 35 deletions(-) diff --git a/plugin.video.alfa/channels/allcalidad.py b/plugin.video.alfa/channels/allcalidad.py index 6c5930d8..acce6a51 100755 --- a/plugin.video.alfa/channels/allcalidad.py +++ b/plugin.video.alfa/channels/allcalidad.py @@ -124,12 +124,12 @@ def peliculas(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data - patron = '(?s)short_overlay.*?([^<]+)').strip() + datapostid = scrapertools.find_single_match(datos, 'data-postid="([^"]+)') + thumbnail = scrapertools.find_single_match(datos, 'img w.*?src="([^"]+)') post = 'action=get_movie_details&postID=%s' %datapostid data1 = httptools.downloadpage(host + "wp-admin/admin-ajax.php", post=post).data idioma = "Latino" diff --git a/plugin.video.alfa/channels/descargacineclasico.py b/plugin.video.alfa/channels/descargacineclasico.py index 2d52b3e8..07ee258f 100755 --- a/plugin.video.alfa/channels/descargacineclasico.py +++ b/plugin.video.alfa/channels/descargacineclasico.py @@ -11,27 +11,28 @@ from lib import unshortenit host = "http://www.descargacineclasico.net" - -def agrupa_datos(data): - # Agrupa los datos - data = re.sub(r'\n|\r|\t| |
|', '', data) - data = re.sub(r'\s+', ' ', data) - data = re.sub(r'>\s<', '><', data) - return data - - def mainlist(item): logger.info() itemlist = [] itemlist.append(Item(channel=item.channel, title="Últimas agregadas", action="agregadas", - url=host, viewmode="movie_with_plot", - thumbnail=get_thumb('last', auto=True))) + url=host, viewmode="movie_with_plot", thumbnail=get_thumb('last', auto=True))) itemlist.append(Item(channel=item.channel, title="Listado por género", action="porGenero", - url=host, - thumbnail=get_thumb('genres', auto=True))) - itemlist.append( - Item(channel=item.channel, title="Buscar", action="search", url=host, - thumbnail=get_thumb('search', auto=True))) + url=host, thumbnail=get_thumb('genres', auto=True))) + itemlist.append(Item(channel=item.channel, title="Listado alfabetico", action="porLetra", + url=host + "/cine-online/", thumbnail=get_thumb('alphabet', auto=True))) + itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=host, + thumbnail=get_thumb('search', auto=True))) + return itemlist + + +def porLetra(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + patron = 'noindex,nofollow" href="([^"]+)">(\w+)<' + matches = scrapertools.find_multiple_matches(data, patron) + for url, titulo in matches: + itemlist.append( Item(channel=item.channel , action="agregadas" , title=titulo, url=url, viewmode="movie_with_plot")) return itemlist @@ -43,7 +44,9 @@ def porGenero(item): data = re.compile(patron,re.DOTALL).findall(data) patron = '.*?href="([^"]+).*?>([^<]+)' matches = re.compile(patron,re.DOTALL).findall(data[0]) - for url,genero in matches: + for url, genero in matches: + if genero == "Erótico" and config.get_setting("adult_mode") == 0: + continue itemlist.append( Item(channel=item.channel , action="agregadas" , title=genero,url=url, viewmode="movie_with_plot")) return itemlist @@ -129,7 +132,6 @@ def findvideos(item): contentTitle = item.contentTitle )) return itemlist - return itemlist def play(item): diff --git a/plugin.video.alfa/channels/porntrex.py b/plugin.video.alfa/channels/porntrex.py index 5136cb41..1fc59e4d 100644 --- a/plugin.video.alfa/channels/porntrex.py +++ b/plugin.video.alfa/channels/porntrex.py @@ -66,16 +66,21 @@ def lista(item): action = "menu_info" # Extrae las entradas - patron = '
.*?([^<]+)<' + patron = '
HD<' in quality: @@ -110,7 +115,6 @@ def lista(item): next_page = "%s?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=post_date&from=%s" % ( item.url, next_page) itemlist.append(item.clone(action="lista", title=">> Página Siguiente", url=next_page)) - return itemlist @@ -225,7 +229,6 @@ def play(item): itemlist = [] data = get_data(item.url) - patron = '(?:video_url|video_alt_url[0-9]*)\s*:\s*\'([^\']+)\'.*?(?:video_url_text|video_alt_url[0-9]*_text)\s*:\s*\'([^\']+)\'' matches = scrapertools.find_multiple_matches(data, patron) if not matches: diff --git a/plugin.video.alfa/channels/rexpelis.json b/plugin.video.alfa/channels/rexpelis.json index b6cd46b8..bdae8bf3 100644 --- a/plugin.video.alfa/channels/rexpelis.json +++ b/plugin.video.alfa/channels/rexpelis.json @@ -1,7 +1,7 @@ { "id": "rexpelis", "name": "Rexpelis", - "active": true, + "active": false, "adult": false, "language": ["lat","cast"], "thumbnail": "https://i.postimg.cc/MMJ5g9Y1/rexpelis1.png", diff --git a/plugin.video.alfa/channels/seriesmetro.py b/plugin.video.alfa/channels/seriesmetro.py index 19516332..32f0bd83 100644 --- a/plugin.video.alfa/channels/seriesmetro.py +++ b/plugin.video.alfa/channels/seriesmetro.py @@ -59,7 +59,7 @@ def list_all(item): itemlist = [] data = get_source(item.url) - patron = '
.*?data-src="([^"]+)"' + patron = '
.*?data-lazy-src="([^"]+)"' matches = re.compile(patron, re.DOTALL).findall(data) for scrapedurl, scrapedtitle, scrapedthumbnail in matches: diff --git a/plugin.video.alfa/channels/youporn.json b/plugin.video.alfa/channels/youporn.json index d63d7d3c..ed466088 100644 --- a/plugin.video.alfa/channels/youporn.json +++ b/plugin.video.alfa/channels/youporn.json @@ -2,7 +2,7 @@ "id": "youporn", "name": "youporn", "active": true, - "adult": false, + "adult": true, "language": ["*"], "thumbnail": "https://fs.ypncdn.com/cb/bundles/youpornwebfront/images/l_youporn_black.png", "banner": "", diff --git a/plugin.video.alfa/servers/vidup.json b/plugin.video.alfa/servers/vidup.json index 39f7ddd3..6ecbc72a 100755 --- a/plugin.video.alfa/servers/vidup.json +++ b/plugin.video.alfa/servers/vidup.json @@ -4,7 +4,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "vidup.(?:me|tv)/(?:embed-|)([A-z0-9]+)", + "pattern": "vidup.(?:me|tv|io)/(?:embed-|)([A-z0-9]+)", "url": "http://vidup.tv/embed-\\1.html" } ] diff --git a/plugin.video.alfa/servers/vidup.py b/plugin.video.alfa/servers/vidup.py index c38e843e..833dc817 100755 --- a/plugin.video.alfa/servers/vidup.py +++ b/plugin.video.alfa/servers/vidup.py @@ -20,8 +20,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= video_urls = [] post= {} post = urllib.urlencode(post) - url = httptools.downloadpage(page_url, follow_redirects=False, only_headers=True).headers.get("location", "") - data = httptools.downloadpage("https://vidup.io/api/serve/video/" + scrapertools.find_single_match(url, "embed/([A-z0-9]+)"), post=post).data + headers = {"Referer":page_url} + url = httptools.downloadpage(page_url, follow_redirects=False, headers=headers, only_headers=True).headers.get("location", "") + data = httptools.downloadpage("https://vidup.io/api/serve/video/" + scrapertools.find_single_match(url, "embed.([A-z0-9]+)"), post=post).data bloque = scrapertools.find_single_match(data, 'qualities":\{(.*?)\}') matches = scrapertools.find_multiple_matches(bloque, '"([^"]+)":"([^"]+)') for res, media_url in matches: From 3bf456e44b3693822427d6d6a960c4c5df4a1059 Mon Sep 17 00:00:00 2001 From: Intel1 Date: Wed, 5 Dec 2018 11:51:45 -0500 Subject: [PATCH 04/11] Varios --- plugin.video.alfa/channels/cine24h.json | 63 +++ plugin.video.alfa/channels/cine24h.py | 382 +++++++++++++++ plugin.video.alfa/channels/hdfilmologia.json | 48 ++ plugin.video.alfa/channels/hdfilmologia.py | 262 +++++++++++ plugin.video.alfa/channels/pedropolis.py | 4 +- plugin.video.alfa/channels/pelis24.json | 49 ++ plugin.video.alfa/channels/pelis24.py | 397 ++++++++++++++++ plugin.video.alfa/channels/pelishd24.json | 64 +++ plugin.video.alfa/channels/pelishd24.py | 464 +++++++++++++++++++ plugin.video.alfa/channels/pelisplay.json | 93 ++++ plugin.video.alfa/channels/pelisplay.py | 414 +++++++++++++++++ plugin.video.alfa/channels/thumbzilla.json | 7 +- plugin.video.alfa/channels/thumbzilla.py | 32 +- plugin.video.alfa/channels/xms.py | 81 +++- 14 files changed, 2326 insertions(+), 34 deletions(-) create mode 100644 plugin.video.alfa/channels/cine24h.json create mode 100644 plugin.video.alfa/channels/cine24h.py create mode 100644 plugin.video.alfa/channels/hdfilmologia.json create mode 100644 plugin.video.alfa/channels/hdfilmologia.py create mode 100644 plugin.video.alfa/channels/pelis24.json create mode 100644 plugin.video.alfa/channels/pelis24.py create mode 100644 plugin.video.alfa/channels/pelishd24.json create mode 100644 plugin.video.alfa/channels/pelishd24.py create mode 100644 plugin.video.alfa/channels/pelisplay.json create mode 100644 plugin.video.alfa/channels/pelisplay.py diff --git a/plugin.video.alfa/channels/cine24h.json b/plugin.video.alfa/channels/cine24h.json new file mode 100644 index 00000000..b679159c --- /dev/null +++ b/plugin.video.alfa/channels/cine24h.json @@ -0,0 +1,63 @@ +{ + "id": "cine24h", + "name": "Cine24H", + "active": true, + "adult": false, + "language": ["lat", "cast", "eng"], + "fanart": "https://i.postimg.cc/WpqD2n77/cine24bg.jpg", + "thumbnail": "https://cine24h.net/wp-content/uploads/2018/06/cine24hv2.png", + "banner": "", + "categories": [ + "movie", + "tvshow", + "vose" + ], + "settings": [ + { + "id": "filter_languages", + "type": "list", + "label": "Mostrar enlaces en idioma...", + "default": 0, + "enabled": true, + "visible": true, + "lvalues": [ + "No filtrar", + "Latino", + "Castellano", + "English" + ] + }, + { + "id": "modo_grafico", + "type": "bool", + "label": "Buscar información extra", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "perfil", + "type": "list", + "label": "Perfil de color", + "default": 3, + "enabled": true, + "visible": true, + "lvalues": [ + "Sin color", + "Perfil 5", + "Perfil 4", + "Perfil 3", + "Perfil 2", + "Perfil 1" + ] + }, + { + "id": "orden_episodios", + "type": "bool", + "label": "Mostrar los episodios de las series en orden descendente", + "default": false, + "enabled": true, + "visible": true + } + ] +} diff --git a/plugin.video.alfa/channels/cine24h.py b/plugin.video.alfa/channels/cine24h.py new file mode 100644 index 00000000..e5edfed9 --- /dev/null +++ b/plugin.video.alfa/channels/cine24h.py @@ -0,0 +1,382 @@ +# -*- coding: utf-8 -*- +# -*- Channel CanalPelis -*- +# -*- Created for Alfa-addon -*- +# -*- By the Alfa Develop Group -*- + +import re +import sys +import urlparse + +from channels import autoplay +from channels import filtertools +from core import httptools +from core import scrapertools +from core import servertools +from core.item import Item +from core import channeltools +from core import tmdb +from platformcode import config, logger +from channelselector import get_thumb + +__channel__ = "cine24h" + +host = "https://cine24h.net/" + +try: + __modo_grafico__ = config.get_setting('modo_grafico', __channel__) + __perfil__ = int(config.get_setting('perfil', __channel__)) +except: + __modo_grafico__ = True + __perfil__ = 0 + +# Fijar perfil de color +perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFFFFD700'], + ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFFFFD700'], + ['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFFFFD700']] +if __perfil__ < 3: + color1, color2, color3, color4, color5 = perfil[__perfil__] +else: + color1 = color2 = color3 = color4 = color5 = "" + +headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'], + ['Referer', host]] + + +parameters = channeltools.get_channel_parameters(__channel__) +fanart_host = parameters['fanart'] +thumbnail_host = parameters['thumbnail'] + +IDIOMAS = {'Latino': 'LAT', 'Castellano': 'CAST'} +list_language = IDIOMAS.values() +list_quality = [] +list_servers = ['rapidvideo', 'streamango', 'openload', 'streamcherry'] + + +def mainlist(item): + logger.info() + autoplay.init(item.channel, list_servers, list_quality) + itemlist = [item.clone(title="Peliculas", action="menumovies", text_blod=True, + viewcontent='movies', viewmode="movie_with_plot", thumbnail=get_thumb('movies', auto=True)), + + item.clone(title="Series", action="series", extra='serie', url=host + 'series/', + viewmode="movie_with_plot", text_blod=True, viewcontent='movies', + thumbnail=get_thumb('tvshows', auto=True), page=0), + + item.clone(title="Buscar", action="search", thumbnail=get_thumb('search', auto=True), + text_blod=True, url=host, page=0)] + + autoplay.show_option(item.channel, itemlist) + return itemlist + + +def menumovies(item): + logger.info() + itemlist = [item.clone(title="Novedades", action="peliculas", thumbnail=get_thumb('newest', auto=True), + text_blod=True, page=0, viewcontent='movies', + url=host + 'peliculas/', viewmode="movie_with_plot"), + + item.clone(title="Estrenos", action="peliculas", thumbnail=get_thumb('estrenos', auto=True), + text_blod=True, page=0, viewcontent='movies', + url=host + '?s=trfilter&trfilter=1&years%5B%5D=2018', viewmode="movie_with_plot"), + + item.clone(title="Más Vistas", action="peliculas", thumbnail=get_thumb('more watched', auto=True), + text_blod=True, page=0, viewcontent='movies', + url=host + 'peliculas-mas-vistas/', viewmode="movie_with_plot"), + + item.clone(title="Géneros", action="genresYears", thumbnail=get_thumb('genres', auto=True), + text_blod=True, page=0, viewcontent='movies', + url=host, viewmode="movie_with_plot"), + + item.clone(title="Estrenos por Año", action="genresYears", thumbnail=get_thumb('year', auto=True), + text_blod=True, page=0, viewcontent='movies', url=host, + viewmode="movie_with_plot"), + + item.clone(title="Buscar", action="search", thumbnail=get_thumb('search', auto=True), + text_blod=True, url=host, page=0, extra='buscarP')] + + return itemlist + + +def search(item, texto): + logger.info() + + texto = texto.replace(" ", "+") + item.url = urlparse.urljoin(item.url, "?s={0}".format(texto)) + + try: + return peliculas(item) + + # Se captura la excepción, para no interrumpir al buscador global si un canal falla + except: + import sys + for line in sys.exc_info(): + logger.error("{0}".format(line)) + return [] + + +def peliculas(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t|\(.*?\)|\s{2}| ", "", data) + data = scrapertools.decodeHtmlentities(data) + patron = '
.*?' # url + patron += '') + if next_page: + itemlist.append(item.clone(url=next_page, page=0, title="» Siguiente »", text_color=color3)) + + return itemlist + + +def genresYears(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t|\(.*?\)| |
", "", data) + data = scrapertools.decodeHtmlentities(data) + + if item.title == "Estrenos por Año": + patron_todas = 'ESTRENOS
(.*?) Géneros' + else: + patron_todas = 'Géneros(.*?)' + + data = scrapertools.find_single_match(data, patron_todas) + patron = '([^<]+)' # url, title + matches = scrapertools.find_multiple_matches(data, patron) + + for scrapedurl, scrapedtitle in matches: + + itemlist.append(item.clone(title=scrapedtitle, url=scrapedurl, action="peliculas")) + + return itemlist + + +def year_release(item): + logger.info() + itemlist = [] + + data = scrapertools.cache_page(item.url) + data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) + patron = '
  • ([^<]+)
  • ' # url, title + matches = re.compile(patron, re.DOTALL).findall(data) + + for scrapedurl, scrapedtitle in matches: + + itemlist.append(item.clone(channel=item.channel, action="peliculas", title=scrapedtitle, page=0, + url=scrapedurl, text_color=color3, viewmode="movie_with_plot", extra='next')) + + return itemlist + + +def series(item): + logger.info() + itemlist = [] + + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t|\(.*?\)| |
    ", "", data) + patron = '
    \s*.*?' # url + patron += '') + + if next_page: + itemlist.append(item.clone(url=next_page, page=0, + title="» Siguiente »", text_color=color3)) + + return itemlist + + +def temporadas(item): + logger.info() + itemlist = [] + + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t| |
    ", "", data) + patron = '
    0: + itemlist.append(Item(channel=__channel__, title="Añadir esta serie a la videoteca", url=item.url, + action="add_serie_to_library", extra="episodios", show=item.show, category="Series", + text_color=color1, thumbnail=thumbnail_host, fanart=fanart_host)) + + return itemlist + else: + return episodios(item) + + +def episodios(item): + logger.info() + itemlist = [] + + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t| |
    ", "", data) + patron = '
    0: + itemlist.append(Item(channel=__channel__, title="Añadir esta serie a la videoteca", url=item.url, + action="add_serie_to_library", extra="episodios", show=item.show, category="Series", + text_color=color1, thumbnail=thumbnail_host, fanart=fanart_host)) + + return itemlist + + +def findvideos(item): + logger.info() + itemlist = [] + + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t|amp;|#038;|\(.*?\)|\s{2}| ", "", data) + data = scrapertools.decodeHtmlentities(data) + patron = 'data-tplayernv="Opt(.*?)">(.*?)(.*?)' # option, server, lang - quality + matches = re.compile(patron, re.DOTALL).findall(data) + + for option, servername, quote in matches: + patron = '(.*?) -([^<]+)