diff --git a/plugin.video.alfa/channels/mixtoon.json b/plugin.video.alfa/channels/mixtoon.json new file mode 100644 index 00000000..fb71306c --- /dev/null +++ b/plugin.video.alfa/channels/mixtoon.json @@ -0,0 +1,12 @@ +{ + "id": "mixtoon", + "name": "MixToon", + "active": true, + "adult": false, + "language": ["cast"], + "thumbnail": "http://i.imgur.com/s6CBxlw.png", + "banner": "http://i.imgur.com/c1YTgNT.png", + "categories": [ + "tvshow" + ] +} \ No newline at end of file diff --git a/plugin.video.alfa/channels/mixtoon.py b/plugin.video.alfa/channels/mixtoon.py new file mode 100644 index 00000000..215b144c --- /dev/null +++ b/plugin.video.alfa/channels/mixtoon.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- + +import re + +from channels import renumbertools +from channelselector import get_thumb +from core import httptools +from core import scrapertools +from core import servertools +from core import tmdb +from core.item import Item +from platformcode import config, logger +from channels import filtertools +from channels import autoplay +from lib import gktools + +IDIOMAS = {'castellano': 'Castellano'} +list_language = IDIOMAS.values() +list_servers = ['openload' + ] +list_quality = ['default'] + + +host = "https://mixtoon.com" + + +def mainlist(item): + logger.info() + thumb_series = get_thumb("channels_tvshow.png") + autoplay.init(item.channel, list_servers, list_quality) + + itemlist = list() + + itemlist.append( + Item(channel=item.channel, action="lista", title="Series", url=host, thumbnail=thumb_series, page=0)) + itemlist = renumbertools.show_option(item.channel, itemlist) + autoplay.show_option(item.channel, itemlist) + return itemlist + + +def lista(item): + logger.info() + + itemlist = [] + data = httptools.downloadpage(item.url).data + data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) + patron = ' 1: + i = 0 + for pos in name.split(pat): + i = i + 1 + total_episode += 1 + season, episode = renumbertools.numbered_for_tratk(item.channel, item.contentSerieName, 1, total_episode) + if len(name.split(pat)) == i: + title += "%sx%s " % (season, str(episode).zfill(2)) + else: + title += "%sx%s_" % (season, str(episode).zfill(2)) + else: + total_episode += 1 + season, episode = renumbertools.numbered_for_tratk(item.channel,item.contentSerieName, 1, total_episode) + + title += "%sx%s " % (season, str(episode).zfill(2)) + + url = host + "/" + link + if "disponible" in link: + title += "No Disponible aún" + else: + title += name + itemlist.append( + Item(channel=item.channel, action="findvideos", title=title, url=url, show=show, plot=scrapedplot, + thumbnail=scrapedthumbnail)) + + if config.get_videolibrary_support() and len(itemlist) > 0: + itemlist.append(Item(channel=item.channel, title="[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]", url=item.url, + action="add_serie_to_library", extra="episodios", show=show)) + + return itemlist + +def findvideos(item): + import base64 + logger.info() + itemlist = [] + data = httptools.downloadpage(item.url).data + _sl = scrapertools.find_single_match(data, 'var _dt=([^;]+);') + sl = eval(_sl) + buttons = [0,1] + for id in buttons: + new_url = "https://videoeb.xyz/" + "eb/" + sl[0] + "/" + sl[1] + "/" + str(id) + "/" + sl[2] + data_new = httptools.downloadpage(new_url).data + valor1, valor2 = scrapertools.find_single_match(data_new, 'var x0x = \["[^"]*","([^"]+)","[^"]*","[^"]*","([^"]+)') + try: + url = base64.b64decode(gktools.transforma_gsv(valor2, base64.b64decode(valor1))) + if 'download' in url: + url = url.replace('download', 'preview') + title = '%s' + itemlist.append(Item(channel=item.channel, title=title, url=url, action='play', language='latino', + infoLabels=item.infoLabels)) + except Exception as e: + logger.info(e) + itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize()) + # Requerido para FilterTools + itemlist = filtertools.get_links(itemlist, item, list_language) + # Requerido para AutoPlay + autoplay.start(itemlist, item) + + return itemlist \ No newline at end of file diff --git a/plugin.video.alfa/channels/seodiv.json b/plugin.video.alfa/channels/seodiv.json index cb4a6bde..79241049 100755 --- a/plugin.video.alfa/channels/seodiv.json +++ b/plugin.video.alfa/channels/seodiv.json @@ -1,7 +1,7 @@ { "id": "seodiv", "name": "Seodiv", - "active": false, + "active": true, "adult": false, "language": ["lat"], "thumbnail": "https://s32.postimg.cc/gh8lhbkb9/seodiv.png", diff --git a/plugin.video.alfa/channels/seodiv.py b/plugin.video.alfa/channels/seodiv.py index 1fca076f..83cf2aaa 100755 --- a/plugin.video.alfa/channels/seodiv.py +++ b/plugin.video.alfa/channels/seodiv.py @@ -47,8 +47,7 @@ def todas(item): itemlist = [] data = httptools.downloadpage(item.url).data data = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", data) - patron = '
.*?quality(.*?)<.*?Ver ' \ - 'Serie>(.*?)<\/span>' + patron = '
<\/a><\/div>' matches = re.compile(patron, re.DOTALL).findall(data) # Paginacion @@ -57,16 +56,15 @@ def todas(item): min=int(min)-int(item.page) max = min + num_items_x_pagina - 1 - for scrapedurl, scrapedthumbnail, scrapedcalidad, scrapedtitle in matches[min:max]: + for scrapedurl, scrapedtitle, scrapedthumbnail, in matches[min:max]: url = host + scrapedurl - calidad = scrapedcalidad title = scrapedtitle.decode('utf-8') thumbnail = scrapedthumbnail fanart = 'https://s32.postimg.cc/gh8lhbkb9/seodiv.png' - if not 'xxxxxx' in scrapedtitle: + if 'TITULO' != title: itemlist.append( Item(channel=item.channel, - action="temporadas", + action="episodios", title=title, url=url, thumbnail=thumbnail, fanart=fanart, @@ -85,153 +83,70 @@ def todas(item): return itemlist -def temporadas(item): - logger.info() - itemlist = [] - data = get_source(item.url) - url_base = item.url - patron = '
  • (.*?) <\/a>' - matches = re.compile(patron, re.DOTALL).findall(data) - temp = 1 - if matches: - for scrapedtitle in matches: - url = url_base - tempo = re.findall(r'\d+', scrapedtitle) - # if tempo: - # title = 'Temporada' + ' ' + tempo[0] - # else: - title = scrapedtitle - thumbnail = item.thumbnail - plot = item.plot - fanart = scrapertools.find_single_match(data, '.*?') - itemlist.append( - Item(channel=item.channel, - action="episodiosxtemp", - title=title, - fulltitle=item.title, - url=url, - thumbnail=thumbnail, - plot=plot, fanart=fanart, - temp=str(temp), - contentSerieName=item.contentSerieName, - context=item.context - )) - temp = temp + 1 - - if config.get_videolibrary_support() and len(itemlist) > 0: - itemlist.append( - Item(channel=item.channel, - title='[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]', - url=item.url, - action="add_serie_to_library", - extra="episodios", - contentSerieName=item.contentSerieName, - extra1=item.extra1, - temp=str(temp) - )) - return itemlist - else: - itemlist = episodiosxtemp(item) - if config.get_videolibrary_support() and len(itemlist) > 0: - itemlist.append( - Item(channel=item.channel, - title='[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]', - url=item.url, - action="add_serie_to_library", - extra="episodios", - contentSerieName=item.contentSerieName, - extra1=item.extra1, - temp=str(temp) - )) - return itemlist - - def episodios(item): logger.info() itemlist = [] - templist = temporadas(item) - for tempitem in templist: - itemlist += episodiosxtemp(tempitem) - - return itemlist - - -def get_source(url): - logger.info() - data = httptools.downloadpage(url, add_referer=True).data + data = httptools.downloadpage(item.url).data data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) - return data - - -def episodiosxtemp(item): - logger.info() - - logger.info() - itemlist = [] - item.title = 'Temporada %s' % item.temp.zfill(2) - patron_temp = '
  • %s <\/a>