# -*- coding: utf-8 -*- import re import urllib from channelselector import get_thumb from core.item import Item from core import httptools from core import jsontools from core import scrapertools from core import servertools from platformcode import config, logger from channels import autoplay host = "http://cuevana2espanol.com/" list_quality = [] list_servers = ['rapidvideo', 'streamango', 'directo', 'yourupload', 'openload', 'dostream'] def load_data(url): data = httptools.downloadpage(url).data data = re.sub(r"\n|\r|\t| |
", "", data) return data def mainlist(item): itemlist = [] autoplay.init(item.channel, list_servers, list_quality) itemlist.append(Item(channel = item.channel, title = "Novedades", action = "movies", url = host + "ver-pelicula-online", thumbnail = get_thumb("newest", auto = True))) itemlist.append(Item(channel = item.channel, title = "Favoritas", action = "movies", url = host + "calificaciones", thumbnail = get_thumb("favorites", auto = True) )) itemlist.append(Item(channel = item.channel, title = "Destacadas", action = "movies", url = host + "tendencias", thumbnail = get_thumb("hot", auto = True))) itemlist.append(Item(channel = item.channel, title = "Ranking IMDB", action = "moviesIMDB", url = host + "raking-imdb", thumbnail = get_thumb("hot", auto = True) )) itemlist.append(Item(channel = item.channel, title = "Busqueda", folder=False, text_bold=True, thumbnail = get_thumb("search", auto = True))) itemlist.append(Item(channel = item.channel, title = "Por Letra", action = "letters", url = host, thumbnail = get_thumb("alphabet", auto = True))) itemlist.append(Item(channel = item.channel, title = "Buscar...", action = "search", url = host + "?s=", thumbnail = get_thumb("search", auto = True))) autoplay.show_option(item.channel, itemlist) return itemlist def movies(item): itemlist = [] data = load_data(item.url) pattern = 'class="poster">([^') if next_page: itemlist.append(Item(channel = item.channel, title="Siguiente Pagina", url=next_page, action="movies")) return itemlist def moviesIMDB(item): itemlist = [] data = load_data(item.url) pattern = '"poster">') if next_page: itemlist.append(Item(channel = item.channel, title="Siguiente Pagina", url=next_page, action="searchMovies")) return itemlist def search(item, text): text = text.lower().replace(' ', '+') item.url += text return searchMovies(item) def GKPluginLink(hash): hashdata = urllib.urlencode({r'link':hash}) json = httptools.downloadpage('https://player4.cuevana2.com/plugins/gkpluginsphp.php', post=hashdata).data return jsontools.load(json)['link'] if json else '' def getContent(item, data): item.infoLabels["year"] = scrapertools.find_single_match(data, 'class="date">.*?(\d+)') item.plot = scrapertools.find_single_match(data, 'class="wp-content">

(.*?)

') genres = '' for genre in scrapertools.find_multiple_matches(data, '/genero/.*?"tag">(.*?)
'): genres += genre + ', ' item.infoLabels['genre'] = genres.strip(', ') def findvideos(item): logger.info() itemlist = [] data = load_data(item.url) getContent(item, data) """ if item.extra: getContentShow(data, item) else: getContentMovie(data, item) """ pattern = '