diff --git a/plugin.video.alfa/addon.xml b/plugin.video.alfa/addon.xml index 4ace762a..44d5024d 100755 --- a/plugin.video.alfa/addon.xml +++ b/plugin.video.alfa/addon.xml @@ -1,5 +1,5 @@ - + @@ -19,15 +19,13 @@ [B]Estos son los cambios para esta versión:[/B] [COLOR green][B]Canales agregados y arreglos[/B][/COLOR] - » grantorrent » descargas2020 - » torrentlocura » torrentrapid - » tumejortorrent » tvsinpagar - » mispelisyseries » vidoza - » streamplay » powvideo - » streamcloud + » cinecalidad » animemovil + » seriesverde » animejl + » pelisipad » gmobi + » inkapelis » pelisgratis + » pelispedia » animeyt + » qserie ¤ arreglos internos - - ¤ Agradecimientos al equipo iSOD, @alaquepasa por colaborar con ésta versión. Navega con Kodi por páginas web para ver sus videos de manera fácil. diff --git a/plugin.video.alfa/channels/animejl.json b/plugin.video.alfa/channels/animejl.json new file mode 100644 index 00000000..aae006fd --- /dev/null +++ b/plugin.video.alfa/channels/animejl.json @@ -0,0 +1,30 @@ +{ + "id": "animejl", + "name": "AnimeJL", + "active": true, + "adult": false, + "language": ["cast", "lat"], + "thumbnail": "https://www.animejl.net/img/Logo.png", + "banner": "", + "categories": [ + "anime" + ], + "settings": [ + { + "id": "include_in_global_search", + "type": "bool", + "label": "Incluir en busqueda global", + "default": false, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_anime", + "type": "bool", + "label": "Incluir en Novedades - Episodios de anime", + "default": true, + "enabled": true, + "visible": true + } + ] +} \ No newline at end of file diff --git a/plugin.video.alfa/channels/animejl.py b/plugin.video.alfa/channels/animejl.py new file mode 100644 index 00000000..b02569b7 --- /dev/null +++ b/plugin.video.alfa/channels/animejl.py @@ -0,0 +1,198 @@ +# -*- coding: utf-8 -*- +# -*- Channel AnimeJL -*- +# -*- Created for Alfa-addon -*- +# -*- By the Alfa Develop Group -*- + +import re + +from core import httptools +from core import scrapertools +from core import servertools +from core.item import Item +from platformcode import logger +from channelselector import get_thumb + + +host = 'https://www.animejl.net/' + +def mainlist(item): + logger.info() + + itemlist = [] + + itemlist.append(Item(channel=item.channel, title="Nuevos Episodios", action="new_episodes", + thumbnail=get_thumb('new_episodes', auto=True), url=host)) + + itemlist.append(Item(channel=item.channel, title="Todas", action="list_all", thumbnail=get_thumb('all', auto=True), + url=host + 'animes')) + + itemlist.append(Item(channel=item.channel, title="Series", action="list_all", + thumbnail=get_thumb('tvshows', auto=True), url=host+'animes?type%5B%5D=1&order=default')) + + itemlist.append(Item(channel=item.channel, title="Películas", action="list_all", + thumbnail=get_thumb('movies',auto=True), url=host + 'animes?type%5B%5D=2&order=default')) + + itemlist.append( + Item(channel=item.channel, title="Buscar", action="search", thumbnail=get_thumb('search', auto=True), + url=host + 'animes?q=')) + + 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 new_episodes(item): + logger.info() + + itemlist = [] + + data = get_source(item.url) + data = scrapertools.find_single_match(data, "

Últimos episodios

.*?") + patron = "
  • (.*?)" + + matches = re.compile(patron, re.DOTALL).findall(data) + + for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedepi in matches: + url = host+scrapedurl + thumbnail = host+scrapedthumbnail + title = '%s %s' % (scrapedtitle, scrapedepi) + itemlist.append(Item(channel=item.channel, action='findvideos', + title=title, + url=url, + thumbnail=thumbnail, + contentSerieName=scrapedtitle, + )) + + return itemlist + +def list_all(item): + logger.info() + + itemlist = [] + + data = get_source(item.url) + patron = "
    .*?class=.*?(.*?)" + patron +="(.*?).*?star.*?

    (.*?)

    " + + matches = re.compile(patron, re.DOTALL).findall(data) + + for scrapedurl, scrapedthumbnail, scrapedtitle, type, plot in matches: + url = host + scrapedurl + thumbnail = host+scrapedthumbnail + title = scrapedtitle + type = type + season = '' + if 'season' in scrapedtitle.lower(): + season = scrapertools.find_single_match(scrapedtitle, 'season (\d+)') + scrapedtitle = scrapertools.find_single_match(scrapedtitle, '(.*?) season') + + new_item = Item(channel=item.channel, action='episodios', + title=title, + url=url, + thumbnail=thumbnail, + contentSerieName=scrapedtitle, + plot=plot, + type=item.type, + infoLabels={} + ) + if type.lower() == 'anime': + new_item.contentSerieName = scrapedtitle + new_item.contentSeasonNumber = season + else: + new_item.contentTitle = scrapedtitle + + itemlist.append(new_item) + + # Paginacion + next_page = scrapertools.find_single_match(data, + "
  • »
  • ") + if next_page != '': + itemlist.append(Item(channel=item.channel, + action="list_all", + title=">> Página siguiente", + url=host+next_page, + thumbnail='https://s16.postimg.cc/9okdu7hhx/siguiente.png' + )) + + return itemlist + +def episodios(item): + logger.info() + itemlist = [] + + base_data = get_source(item.url) + data = scrapertools.find_single_match(base_data, '
    Lista de episodios
    .*?') + if data == '': + data = scrapertools.find_single_match(base_data, '
    Formatos disponibles
    .*?') + + if 'listepisodes' in data.lower(): + patron = "
  • (.*?)
  • " + elif 'listcaps' in data.lower(): + patron = ".*?alt=(.*?)>" + matches = re.compile(patron, re.DOTALL).findall(data) + for scrapedurl, scrapedtitle in matches: + title = scrapedtitle.strip() + n=0 + for char in title[::-1]: + n += 1 + if char == ' ': + break + episode = title[-n:] + episode = scrapertools.find_single_match(episode, r' (\d+)') + + url = host + scrapedurl + itemlist.append(Item(channel=item.channel, title='Episodio %s' % episode, thumbnail=item.thumbnail, url=url, + action='findvideos')) + if item.type.lower != 'anime' and len(itemlist)==1: + return findvideos(itemlist[0]) + else: + return itemlist[::-1] + +def findvideos(item): + logger.info() + + itemlist = [] + data = get_source(item.url) + itemlist.extend(servertools.find_video_items(data=data)) + + for videoitem in itemlist: + videoitem.title = '[%s]' % videoitem.server.capitalize() + + return itemlist + +def search(item, texto): + logger.info() + texto = texto.replace(" ", "+") + item.url = item.url + texto + try: + if texto != '': + return list_all(item) + else: + return [] + except: + import sys + for line in sys.exc_info(): + logger.error("%s" % line) + return [] + +def newest(categoria): + logger.info() + itemlist = [] + item = Item() + try: + if categoria == 'anime': + item.url = host + itemlist = new_episodes(item) + if itemlist[-1].title == '>> Página siguiente': + itemlist.pop() + return itemlist + except: + import sys + for line in sys.exc_info(): + logger.error("{0}".format(line)) + return [] diff --git a/plugin.video.alfa/channels/animemovil.py b/plugin.video.alfa/channels/animemovil.py index f5347e4e..5c4031fc 100644 --- a/plugin.video.alfa/channels/animemovil.py +++ b/plugin.video.alfa/channels/animemovil.py @@ -11,6 +11,7 @@ from core.item import Item from platformcode import platformtools, config, logger + __modo_grafico__ = config.get_setting('modo_grafico', 'animemovil') __perfil__ = '' @@ -28,6 +29,7 @@ host = "http://animemovil.com" def mainlist(item): logger.info() + itemlist = [] itemlist.append(Item(channel=item.channel, action="recientes", title="Episodios Recientes", thumbnail=item.thumbnail, @@ -48,6 +50,8 @@ def mainlist(item): itemlist.append(item.clone(title="Configurar canal", action="openconfig", text_color=color5, folder=False)) if renumbertools.context: itemlist = renumbertools.show_option(item.channel, itemlist) + + return itemlist @@ -280,71 +284,42 @@ def findvideos(item): data = httptools.downloadpage(item.url).data data = re.sub(r'\n|\s{2,}', '', data) + strm_id = scrapertools.find_single_match(data, '"id": (.*?),') + streams = scrapertools.find_single_match(data, '"stream": (.*?)};') + dict_strm = jsontools.load(streams) - akiba_url = scrapertools.find_single_match(data, '