diff --git a/plugin.video.alfa/addon.xml b/plugin.video.alfa/addon.xml index ddfc3897..66b650d0 100755 --- a/plugin.video.alfa/addon.xml +++ b/plugin.video.alfa/addon.xml @@ -1,5 +1,5 @@  - + @@ -19,12 +19,11 @@ [B]Estos son los cambios para esta versión:[/B] [COLOR green][B]Canales agregados y arreglos[/B][/COLOR] - » yaske »divxatope - » javtasty »bitp - » serviporno »gvideo - » vk »cinetux - » ciberpeliculashd - ¤ arreglos internos + » pelisfox » pelisgratis + » gamovideo » doomtv + » usercloud » ciberpeliculashd + » pordede ¤ arreglos internos + [COLOR green]Gracias a [B][COLOR yellow]f_y_m[/COLOR][/B] por su colaboración en esta versión[/COLOR] Navega con Kodi por páginas web para ver sus videos de manera fácil. Browse web pages using Kodi diff --git a/plugin.video.alfa/channels/ciberpeliculashd.py b/plugin.video.alfa/channels/ciberpeliculashd.py index 37c9439c..3562697f 100644 --- a/plugin.video.alfa/channels/ciberpeliculashd.py +++ b/plugin.video.alfa/channels/ciberpeliculashd.py @@ -20,14 +20,125 @@ except: def mainlist(item): logger.info() itemlist = [] - itemlist.append(Item(channel = item.channel, title = "Novedades", action = "peliculas", url = host + "/?peli=1")) - itemlist.append(Item(channel = item.channel, title = "Por género", action = "filtro", url = host, extra = "categories" )) - itemlist.append(Item(channel = item.channel, title = "Por calidad", action = "filtro", url = host, extra = "qualitys")) - itemlist.append(Item(channel = item.channel, title = "Por idioma", action = "filtro", url = host, extra = "languages")) + itemlist.append(Item(channel = item.channel, title = "Películas", text_bold = True, folder = False)) + itemlist.append(Item(channel = item.channel, title = " Novedades", action = "peliculas", url = host + "/?peli=1")) + itemlist.append(Item(channel = item.channel, title = " Por género", action = "filtro", url = host, extra = "categories" )) + itemlist.append(Item(channel = item.channel, title = " Por calidad", action = "filtro", url = host, extra = "qualitys")) + itemlist.append(Item(channel = item.channel, title = " Por idioma", action = "filtro", url = host, extra = "languages")) + itemlist.append(Item(channel = item.channel, title = "")) + itemlist.append(Item(channel = item.channel, title = "Series", text_bold = True, folder = False)) + itemlist.append(Item(channel = item.channel, title = " Novedades", action = "series", url = host + "/series/?peli=1")) + itemlist.append(Item(channel = item.channel, title = " Nuevos Capitulos", action = "nuevos_capitulos", url = host + "/series/?peli=1")) itemlist.append(Item(channel = item.channel, title = "")) itemlist.append(Item(channel = item.channel, title = "Buscar", action = "search", url = host + "/?s=")) return itemlist +def nuevos_capitulos(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + patron = 'class="episode" href="([^"]+).*?' + patron += 'src="([^"]+).*?' + patron += 'title="([^"]+).*?' + patron += '-->([^<]+).*?' + patron += 'created_at">([^<]+)' + matches = scrapertools.find_multiple_matches(data, patron) + for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedepisode, scrapeddays in matches: + scrapedtitle = scrapedtitle + " %s (%s)" %(scrapedepisode.strip(), scrapeddays.strip()) + itemlist.append(Item(action = "findvideos", + channel = item.channel, + title = scrapedtitle, + thumbnail = scrapedthumbnail, + url = scrapedurl + )) + return itemlist + +def series(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + bloque = scrapertools.find_single_match(data, 'loop-posts series.*?panel-pagination pagination-bottom') + patron = 'a href="([^"]+).*?' + patron += '((?:http|https)://image.tmdb.org[^"]+).*?' + patron += 'title="([^"]+)' + matches = scrapertools.find_multiple_matches(bloque, patron) + for scrapedurl, scrapedthumbnail, scrapedtitle in matches: + itemlist.append(Item(action = "temporadas", + channel = item.channel, + thumbnail = scrapedthumbnail, + title = scrapedtitle, + contentSerieName = scrapedtitle, + url = scrapedurl + )) + if itemlist: + tmdb.set_infoLabels(itemlist) + page = int(scrapertools.find_single_match(item.url,"peli=([0-9]+)")) + 1 + next_page = scrapertools.find_single_match(item.url,".*?peli=") + next_page += "%s" %page + itemlist.append(Item(action = "series", + channel = item.channel, + title = "Página siguiente", + url = next_page + )) + return itemlist + + +def temporadas(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + bloque = scrapertools.find_single_match(data, 'Lista de Temporadas.*?') + matches = scrapertools.find_multiple_matches(bloque, ' (.*?[0-9]+)') + for scrapedtitle in matches: + season = scrapertools.find_single_match(scrapedtitle, '[0-9]+') + item.infoLabels["season"] = season + url = item.url + "?temporada=%s" %season + itemlist.append(item.clone(action = "capitulos", + title = scrapedtitle, + url = url + )) + tmdb.set_infoLabels(itemlist) + if config.get_videolibrary_support(): + itemlist.append(Item(channel=item.channel, title ="")) + itemlist.append(item.clone(action = "add_serie_to_library", + channel = item.channel, + extra = "episodios", + title = '[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]', + url = item.url + )) + return itemlist + + +def episodios(item): + logger.info() + itemlist = [] + templist = temporadas(item) + for tempitem in templist: + itemlist += capitulos(tempitem) + return itemlist + + +def capitulos(item): + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + patron = '", "") + episode = scrapertools.find_single_match(scrapedtitle, "Capitulo ([0-9]+)") + scrapedtitle = scrapedtitle.split(":")[1] + scrapedtitle = "%sx%s %s" %(item.infoLabels["season"], episode, scrapedtitle) + item.infoLabels["episode"] = episode + itemlist.append(item.clone(action = "findvideos", + title = scrapedtitle, + url = scrapedurl + )) + tmdb.set_infoLabels(itemlist) + return itemlist + + def newest(categoria): logger.info() itemlist = [] @@ -83,6 +194,7 @@ def filtro(item): def peliculas(item): logger.info() itemlist = [] + infoLabels = dict() data = httptools.downloadpage(item.url).data bloque = scrapertools.find_single_match(data, 'loop-posts".*?panel-pagination pagination-bottom') patron = 'a href="([^"]+)".*?' @@ -98,23 +210,31 @@ def peliculas(item): else: year = 0 fulltitle = scrapertools.find_single_match(scrapedtitle, "(.*?) \(") - itemlist.append(Item(action = "findvideos", + if "serie" in scrapedurl: + action = "temporadas" + infoLabels ['tvshowtitle'] = scrapedtitle + else: + action = "findvideos" + infoLabels ['tvshowtitle'] = "" + infoLabels ['year'] = year + itemlist.append(Item(action = action, channel = item.channel, fulltitle = fulltitle, thumbnail = scrapedthumbnail, - infoLabels = {'year': year}, + infoLabels = infoLabels, title = scrapedtitle, url = scrapedurl )) - tmdb.set_infoLabels(itemlist) - page = int(scrapertools.find_single_match(item.url,"peli=([0-9]+)")) + 1 - next_page = scrapertools.find_single_match(item.url,".*?peli=") - next_page += "%s" %page - itemlist.append(Item(action = "peliculas", - channel = item.channel, - title = "Página siguiente", - url = next_page - )) + if itemlist: + tmdb.set_infoLabels(itemlist) + page = int(scrapertools.find_single_match(item.url,"peli=([0-9]+)")) + 1 + next_page = scrapertools.find_single_match(item.url,".*?peli=") + next_page += "%s" %page + itemlist.append(Item(action = "peliculas", + channel = item.channel, + title = "Página siguiente", + url = next_page + )) return itemlist diff --git a/plugin.video.alfa/channels/doomtv.py b/plugin.video.alfa/channels/doomtv.py index f906175d..a5f1bd9c 100644 --- a/plugin.video.alfa/channels/doomtv.py +++ b/plugin.video.alfa/channels/doomtv.py @@ -222,11 +222,14 @@ def newest(categoria): def findvideos(item): logger.info() itemlist = [] - #itemlist = get_url(item) data = httptools.downloadpage(item.url).data data = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", data) - url_m3u8 = scrapertools.find_single_match(data, '') + player_vip = scrapertools.find_single_match(data, 'src=(https:\/\/content.jwplatform.com\/players.*?js)') + data_m3u8 = httptools.downloadpage(player_vip, headers= {'referer':item.url}).data + data_m3u8 = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", data_m3u8) + url_m3u8 = scrapertools.find_single_match(data_m3u8,',sources:.*?file: (.*?),') itemlist.append(item.clone(url=url_m3u8, action='play')) + patron = 'id=(tab\d+)>
<(?:iframe|script) src=(.*?)(?:scrolling|><\/script>)' matches = re.compile(patron, re.DOTALL).findall(data) diff --git a/plugin.video.alfa/channels/pelisfox.py b/plugin.video.alfa/channels/pelisfox.py index 10e6e913..8d8da208 100644 --- a/plugin.video.alfa/channels/pelisfox.py +++ b/plugin.video.alfa/channels/pelisfox.py @@ -226,6 +226,7 @@ def findvideos(item): video_list = [] data = httptools.downloadpage(item.url).data data = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", data) + patron = '
  • 0 and item.extra != 'findvideos': video_list.append( diff --git a/plugin.video.alfa/channels/pordede.json b/plugin.video.alfa/channels/pordede.json new file mode 100644 index 00000000..65c0cde2 --- /dev/null +++ b/plugin.video.alfa/channels/pordede.json @@ -0,0 +1,85 @@ +{ + "id": "pordede", + "name": "Pordede", + "active": true, + "adult": false, + "language": ["cast"], + "thumbnail": "pordede.png", + "banner": "pordede.png", + "categories": [ + "movie", + "tvshow" + ], + "settings": [ + { + "id": "pordedeuser", + "type": "text", + "label": "@30014", + "enabled": true, + "visible": true + }, + { + "id": "pordedepassword", + "type": "text", + "hidden": true, + "label": "@30015", + "enabled": "!eq(-1,'')", + "visible": true + }, + { + "id": "include_in_global_search", + "type": "bool", + "label": "Incluir en busqueda global", + "default": false, + "enabled": "!eq(-1,'') + !eq(-2,'')", + "visible": true + }, + { + "id": "pordedesortlinks", + "type": "list", + "label": "Ordenar enlaces", + "default": 0, + "enabled": true, + "visible": "!eq(-2,'') + !eq(-3,'')", + "lvalues": [ + "No", + "Por no Reportes", + "Por Idioma", + "Por Calidad", + "Por Idioma y Calidad", + "Por Idioma y no Reportes", + "Por Idioma, Calidad y no Reportes" + ] + }, + { + "id": "pordedeshowlinks", + "type": "list", + "label": "Mostrar enlaces", + "default": 0, + "enabled": true, + "visible": "!eq(-3,'') + !eq(-4,'')", + "lvalues": [ + "Todos", + "Ver online", + "Descargar" + ] + }, + { + "id": "pordedenumberlinks", + "type": "list", + "label": "Limitar número de enlaces", + "default": 0, + "enabled": true, + "visible": "!eq(-4,'') + !eq(-5,'')", + "lvalues": [ + "No", + "5", + "10", + "15", + "20", + "25", + "30" + ] + } + ] +} diff --git a/plugin.video.alfa/channels/pordede.py b/plugin.video.alfa/channels/pordede.py new file mode 100644 index 00000000..29347d39 --- /dev/null +++ b/plugin.video.alfa/channels/pordede.py @@ -0,0 +1,665 @@ +# -*- coding: utf-8 -*- + +import os +import re +import sys +import urlparse + +from core import channeltools +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 platformcode import platformtools + +def login(): + url_origen = "http://www.pordede.com" + data = httptools.downloadpage(url_origen).data + if config.get_setting("pordedeuser", "pordede") in data: + return True + + url = "http://www.pordede.com/api/login/auth?response_type=code&client_id=appclient&redirect_uri=http%3A%2F%2Fwww.pordede.com%2Fapi%2Flogin%2Freturn&state=none" + post = "username=%s&password=%s&authorized=autorizar" % (config.get_setting("pordedeuser", "pordede"), config.get_setting("pordedepassword", "pordede")) + data = httptools.downloadpage(url, post).data + if '"ok":true' in data: + return True + else: + return False + +def mainlist(item): + logger.info() + + itemlist = [] + + if not config.get_setting("pordedeuser", "pordede"): + itemlist.append( Item( channel=item.channel , title="Habilita tu cuenta en la configuración..." , action="settingCanal" , url="") ) + else: + result = login() + if not result: + itemlist.append(Item(channel=item.channel, action="mainlist", title="Login fallido. Volver a intentar...")) + return itemlist + itemlist.append( Item(channel=item.channel, action="menuseries" , title="Series" , url="" )) + itemlist.append( Item(channel=item.channel, action="menupeliculas" , title="Películas y documentales" , url="" )) + itemlist.append( Item(channel=item.channel, action="listas_sigues" , title="Listas que sigues" , url="http://www.pordede.com/lists/following" )) + itemlist.append( Item(channel=item.channel, action="tus_listas" , title="Tus listas" , url="http://www.pordede.com/lists/yours" )) + itemlist.append( Item(channel=item.channel, action="listas_sigues" , title="Top listas" , url="http://www.pordede.com/lists" )) + itemlist.append( Item(channel=item.channel, action="settingCanal" , title="Configuración..." , url="" )) + + return itemlist + +def settingCanal(item): + return platformtools.show_channel_settings() + +def menuseries(item): + logger.info() + + itemlist = [] + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Novedades" , url="http://www.pordede.com/series/loadmedia/offset/0/showlist/hot" )) + itemlist.append( Item(channel=item.channel, action="generos" , title="Por géneros" , url="http://www.pordede.com/series" )) + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Siguiendo" , url="http://www.pordede.com/series/following" )) + itemlist.append( Item(channel=item.channel, action="siguientes" , title="Siguientes Capítulos" , url="http://www.pordede.com/main/index" , viewmode="movie")) + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Favoritas" , url="http://www.pordede.com/series/favorite" )) + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Pendientes" , url="http://www.pordede.com/series/pending" )) + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Terminadas" , url="http://www.pordede.com/series/seen" )) + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Recomendadas" , url="http://www.pordede.com/series/recommended" )) + itemlist.append( Item(channel=item.channel, action="search" , title="Buscar..." , url="http://www.pordede.com/series" )) + + return itemlist + +def menupeliculas(item): + logger.info() + + itemlist = [] + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Novedades" , url="http://www.pordede.com/pelis/loadmedia/offset/0/showlist/hot" )) + itemlist.append( Item(channel=item.channel, action="generos" , title="Por géneros" , url="http://www.pordede.com/pelis" )) + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Favoritas" , url="http://www.pordede.com/pelis/favorite" )) + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Pendientes" , url="http://www.pordede.com/pelis/pending" )) + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Vistas" , url="http://www.pordede.com/pelis/seen" )) + itemlist.append( Item(channel=item.channel, action="peliculas" , title="Recomendadas" , url="http://www.pordede.com/pelis/recommended" )) + itemlist.append( Item(channel=item.channel, action="search" , title="Buscar..." , url="http://www.pordede.com/pelis" )) + + return itemlist + +def generos(item): + logger.info() + + # Descarga la pagina + data = httptools.downloadpage(item.url).data + + # Extrae las entradas (carpetas) + data = scrapertools.find_single_match(data,'
    (.*?)
    ') + patron = '
    ([^<]+)\((\d+)\)' + matches = re.compile(patron,re.DOTALL).findall(data) + itemlist = [] + + for textid,scrapedurl,scrapedtitle,cuantos in matches: + title = scrapedtitle.strip()+" ("+cuantos+")" + thumbnail = "" + plot = "" + + if "/pelis" in item.url: + url = "http://www.pordede.com/pelis/loadmedia/offset/0/genre/"+textid.replace(" ","%20")+"/showlist/all" + else: + url = "http://www.pordede.com/series/loadmedia/offset/0/genre/"+textid.replace(" ","%20")+"/showlist/all" + + itemlist.append( Item(channel=item.channel, action="peliculas" , title=title , url=url, thumbnail=thumbnail, plot=plot, fulltitle=title)) + + return itemlist + +def search(item,texto): + logger.info() + + if item.url=="": + item.url="http://www.pordede.com/pelis" + + texto = texto.replace(" ","-") + + item.extra = item.url + item.url = item.url+"/loadmedia/offset/0/query/"+texto+"/years/1950/on/undefined/showlist/all" + + try: + return buscar(item) + except: + import sys + for line in sys.exc_info(): + logger.error("%s" % line) + return [] + +def buscar(item): + logger.info() + + # Descarga la pagina + headers = {"X-Requested-With": "XMLHttpRequest"} + data = httptools.downloadpage(item.url, headers=headers).data + + # Extrae las entradas (carpetas) + json_object = jsontools.load(data) + data = json_object["html"] + + return parse_mixed_results(item,data) + +def parse_mixed_results(item,data): + patron = 'Siguiendo(.*?)
    ') + patron = '
    [^<]+' + patron += ''+episode+' ([^<]+)(\s*
    \s*]*>]*>[^<]*]*>[^<]*]*>]*>]*>[^<]*]*>[^<]*
    )?' + matches = re.compile(patron,re.DOTALL).findall(bloque_episodios) + + for scrapedurl,scrapedtitle,info,visto in matches: + if visto.strip()=="active": + visto_string = "[visto] " + else: + visto_string = "" + numero=episode + title = visto_string+session+"x"+numero+" "+scrapertools.htmlclean(scrapedtitle) + thumbnail = "" + plot = "" + + epid = scrapertools.find_single_match(scrapedurl,"id/(\d+)") + url = "http://www.pordede.com/links/viewepisode/id/"+epid + itemlist.append( Item(channel=item.channel, action="findvideos" , title=title , url=url, thumbnail=thumbnail, plot=plot, fulltitle=title, fanart=item.fanart, show=item.show)) + + itemlist2 = [] + for capitulo in itemlist: + itemlist2 = findvideos(capitulo) + + return itemlist2 + +def peliculas(item): + logger.info() + + # Descarga la pagina + headers = {"X-Requested-With": "XMLHttpRequest"} + data = httptools.downloadpage(item.url, headers=headers).data + + # Extrae las entradas (carpetas) + json_object = jsontools.load(data) + data = json_object["html"] + + return parse_mixed_results(item,data) + +def episodios(item): + logger.info() + + itemlist = [] + + # Descarga la pagina + idserie = '' + data = httptools.downloadpage(item.url).data + + patrontemporada = '
    ]+>([^<]+)