diff --git a/channels/bloghorror.json b/channels/bloghorror.json deleted file mode 100644 index e849f99d..00000000 --- a/channels/bloghorror.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "id": "bloghorror", - "name": "BlogHorror", - "active": true, - "adult": false, - "language": [], - "thumbnail": "https://i.postimg.cc/gcgQhKTL/2018-10-10_20_34_57-_Peliculas_de_Terror_BLOGHORROR.png", - "banner": "", - "categories": [ - "movie", - "vo", - "torrent" - ], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Incluir en busqueda global", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "include_in_newest_peliculas", - "type": "bool", - "label": "Incluir en Novedades - Peliculas", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_torrent", - "type": "bool", - "label": "Incluir en Novedades - Torrent", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_terror", - "type": "bool", - "label": "Incluir en Novedades - terror", - "default": true, - "enabled": true, - "visible": true - } - ] -} diff --git a/channels/bloghorror.py b/channels/bloghorror.py deleted file mode 100644 index bbbda1d2..00000000 --- a/channels/bloghorror.py +++ /dev/null @@ -1,234 +0,0 @@ -# -*- coding: utf-8 -*- -# -*- Channel BlogHorror -*- -# -*- Created for Alfa-addon -*- -# -*- By the Alfa Develop Group -*- - -import os -import re - -from channels import autoplay -from channels import filtertools -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 channelselector import get_thumb - -host = 'http://bloghorror.com/' -fanart = 'http://bloghorror.com/wp-content/uploads/2015/04/bloghorror-2017-x.jpg' - -def get_source(url): - logger.info() - data = httptools.downloadpage(url).data - data = re.sub(r'\n|\r|\t| |
|\s{2,}', "", data) - return data - -def mainlist(item): - logger.info() - - itemlist = [] - - itemlist.append(Item(channel=item.channel, fanart=fanart, title="Todas", action="list_all", - url=host+'/category/terror', thumbnail=get_thumb('all', auto=True))) - - itemlist.append(Item(channel=item.channel, fanart=fanart, title="Asiaticas", action="list_all", - url=host+'/category/asiatico', thumbnail=get_thumb('asiaticas', auto=True))) - - itemlist.append(Item(channel=item.channel, fanart=fanart, title = 'Buscar', action="search", url=host + '?s=', pages=3, - thumbnail=get_thumb('search', auto=True))) - - return itemlist - - -def list_all(item): - logger.info() - - itemlist = [] - data = get_source(item.url) - patron = '
([^<]+)' - - matches = re.compile(patron, re.DOTALL).findall(data) - - for scrapedthumbnail, scrapedurl, scrapedtitle in matches: - url = scrapedurl - title = scrapertools.find_single_match(scrapedtitle, '(.*?)(?:|\(|\| )\d{4}').strip() - year = scrapertools.find_single_match(scrapedtitle, '(\d{4})') - thumbnail = scrapedthumbnail - new_item = Item(channel=item.channel, fanart=fanart, title=title, url=url, action='findvideos', - thumbnail=thumbnail, infoLabels={'year':year}) - - new_item.contentTitle=title - itemlist.append(new_item) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - # Paginacion - - if itemlist != []: - - next_page = scrapertools.find_single_match(data, 'page-numbers current.*?Generos<.*?') - elif 'Años' in item.title: - data = scrapertools.find_single_match(data, 'tabindex="0">Año<.*?') - - patron = 'href="([^"]+)">([^<]+)' - - matches = re.compile(patron, re.DOTALL).findall(data) - - for url, title in matches: - - itemlist.append(Item(channel=item.channel, fanart=fanart, title=title, url=url, action='list_all', pages=3)) - - return itemlist - - -def findvideos(item): - logger.info() - - itemlist = [] - full_data = get_source(item.url) - data = scrapertools.find_single_match(full_data, '>FICHA TECNICA:<.*?') - #patron = '(?:bold|strong>|
|)([^<]+)(?:|
).*?="(magnet[^"]+)"' - patron = '(?:|
|/> )(DVD|720|1080)(?:|
|).*?="(magnet[^"]+)"' - matches = re.compile(patron, re.DOTALL).findall(data) - - if len(matches) == 0: - patron = ' 0 and item.extra != 'findvideos': - itemlist.append(Item(channel=item.channel, - title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', - url=item.url, - action="add_pelicula_to_library", - extra="findvideos", - contentTitle=item.contentTitle - )) - - return itemlist - - -def search(item, texto): - logger.info() - itemlist = [] - texto = texto.replace(" ", "+") - item.url = item.url + texto - if texto != '': - try: - return list_all(item) - except: - itemlist.append(item.clone(url='', title='No hay elementos...', action='')) - return itemlist - -def newest(categoria): - logger.info() - itemlist = [] - item = Item() - try: - if categoria in ['peliculas', 'terror', 'torrent']: - item.url = host - itemlist = list_all(item) - if itemlist[-1].title == 'Siguiente >>>': - itemlist.pop() - except: - import sys - for line in sys.exc_info(): - logger.error("{0}".format(line)) - return [] - - return itemlist - - -def get_sub_from_subdivx(sub_url, sub_num): - logger.info() - - import xbmc - from time import sleep - import urlparse - sub_dir = os.path.join(config.get_data_path(), 'temp_subs') - - if os.path.exists(sub_dir): - for sub_file in os.listdir(sub_dir): - old_sub = os.path.join(sub_dir, sub_file) - os.remove(old_sub) - - sub_data = httptools.downloadpage(sub_url, follow_redirects=False) - - if 'x-frame-options' not in sub_data.headers: - sub_url = 'http://subdivx.com/sub%s/%s' % (sub_num, sub_data.headers['location']) - sub_url = sub_url.replace('http:///', '') - sub_data = httptools.downloadpage(sub_url).data - - fichero_rar = os.path.join(config.get_data_path(), "subtitle.rar") - outfile = open(fichero_rar, 'wb') - outfile.write(sub_data) - outfile.close() - xbmc.executebuiltin("XBMC.Extract(%s, %s/temp_subs)" % (fichero_rar, config.get_data_path())) - sleep(1) - if len(os.listdir(sub_dir)) > 0: - sub = os.path.join(sub_dir, os.listdir(sub_dir)[0]) - else: - sub = '' - else: - logger.info('sub no valido') - sub = '' - return sub - diff --git a/channels/cinehindi.json b/channels/cinehindi.json deleted file mode 100644 index 6b64c65c..00000000 --- a/channels/cinehindi.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "cinehindi", - "name": "CineHindi", - "active": true, - "adult": false, - "language": ["vos"], - "thumbnail": "cinehindi.png", - "banner": "http://i.imgur.com/cau9TVe.png", - "categories": [ - "movie", - "vos" - ] -} \ No newline at end of file diff --git a/channels/cinehindi.py b/channels/cinehindi.py deleted file mode 100644 index 57505b18..00000000 --- a/channels/cinehindi.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: UTF-8 -*- - -import re -import urlparse - -from channelselector import get_thumb -from channels import autoplay -from channels import filtertools -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 - -IDIOMAS = {'Hindi': 'Hindi'} -list_language = IDIOMAS.values() -list_quality = [] -list_servers = ['verystream', 'openload', 'netutv'] - -host = "http://www.cinehindi.com/" - - -def mainlist(item): - logger.info() - autoplay.init(item.channel, list_servers, list_quality) - itemlist = list() - itemlist.append(Item(channel=item.channel, action="genero", title="Generos", url=host, thumbnail = get_thumb("genres", auto = True))) - itemlist.append(Item(channel=item.channel, action="lista", title="Novedades", url=host, thumbnail = get_thumb("newest", auto = True))) - #itemlist.append(Item(channel=item.channel, action="proximas", title="Próximas Películas", - # url=urlparse.urljoin(host, "proximamente"))) - itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=urlparse.urljoin(host, "?s="), thumbnail = get_thumb("search", auto = True))) - autoplay.show_option(item.channel, itemlist) - return itemlist - - -def genero(item): - logger.info() - itemlist = list() - data = httptools.downloadpage(host).data - patron = '""") - patron = '
' # Todos los items de peliculas (en esta web) empiezan con esto - patron += '
' # scrapedurl - patron += '.*?' 0 and item.contentChannel!='videolibrary': - itemlist.append( - Item(channel=item.channel, title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', url=item.url, - action="add_pelicula_to_library", extra="findvideos", contentTitle=show)) - return itemlist - - -def play(item): - logger.info() - item.thumbnail = item.contentThumbnail - return [item] diff --git a/channels/cuevana2.json b/channels/cuevana2.json deleted file mode 100644 index d0c28d54..00000000 --- a/channels/cuevana2.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "id": "cuevana2", - "name": "Cuevana2", - "active": true, - "adult": false, - "language": ["en"], - "thumbnail": "cuevana2.png", - "categories": [ - "movie", - "tvshow", - "vos" - ], - "settings": [ - { - "id": "modo_grafico", - "type": "bool", - "label": "Buscar información extra", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_global_search", - "type": "bool", - "label": "Incluir en busqueda global", - "default": true, - "enabled": true, - "visible": true - } - ] -} diff --git a/channels/cuevana2.py b/channels/cuevana2.py deleted file mode 100644 index 1dcf86d9..00000000 --- a/channels/cuevana2.py +++ /dev/null @@ -1,320 +0,0 @@ -# -*- 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://www.cuevana2.com/" -list_quality = [] -list_servers = ['rapidvideo', 'streamango', 'directo', 'yourupload', 'openload', 'dostream'] - -### MENUS ### - -def mainlist(item): - logger.info() - autoplay.init(item.channel, list_servers, list_quality) - itemlist = [] - # PELICULAS - itemlist.append(Item(channel = item.channel, title = "--- Peliculas ---", folder=False, text_bold=True)) - - itemlist.append(Item(channel = item.channel, title = "Novedades", action = "movies", - url = host + "pelicula", thumbnail = get_thumb("newest", auto = True))) - itemlist.append(Item(channel = item.channel, title = "Por género", action = "genre", - url = host + "pelicula", thumbnail = get_thumb("genres", auto = True) )) - itemlist.append(Item(channel = item.channel, title = "Por año", action = "age", - url = host + "pelicula", thumbnail = get_thumb("year", auto = True))) - itemlist.append(Item(channel = item.channel, title = "Favoritas", action = "movies", - url = host + "peliculas-destacadas", thumbnail = get_thumb("favorites", auto = True) )) - itemlist.append(Item(channel = item.channel, title = "Buscar...", action = "search", - url = host + "pelicula/?s=", thumbnail = get_thumb("search", auto = True))) - - # SERIES - itemlist.append(Item(channel = item.channel, title = "--- Series ---", folder=False, text_bold=True)) - - itemlist.append(Item(channel = item.channel, title = "Todas las Series", action = "shows", - url = host + "listar-series", thumbnail = get_thumb("tvshows", auto = True))) - itemlist.append(Item(channel = item.channel, title = "Buscar...", action = "search", extra='1', - url = host + "listar-series", thumbnail = get_thumb("search", auto = True))) - - autoplay.show_option(item.channel, itemlist) - - return itemlist - -### FIN MENUS ### -def inArray(arr, arr2): - for word in arr: - if word not in arr2: - return False - - return True - -def load_data(url): - data = httptools.downloadpage(url).data - data = re.sub(r"\n|\r|\t| |
", "", data) - - return data - -def redirect_url(url, parameters=None): - data = httptools.downloadpage(url, post=parameters) - logger.info(data.url) - return data.url - -def put_movies(itemlist, item, data, pattern): - matches = scrapertools.find_multiple_matches(data, pattern) - for link, img, title, rating, plot in matches: - if 'pelicula' in link: - itemTitle = "%s [COLOR yellow](%s/100)[/COLOR]" % (title, rating) - itemlist.append(Item(channel = item.channel, title=itemTitle, fulltitle=title, thumbnail=img, - url=link, plot=plot, action="findvideos")) - logger.info(link) - - return itemlist - -def put_episodes(itemlist, item, text): - pattern = '
  • .*?ref="([^"]+).*?"tit">(.*?)' - - matches = scrapertools.find_multiple_matches(text, pattern) - for link, title in matches: - itemlist.append(item.clone(title=title, fulltitle=item.title, url=link, action='findvideos', extra=1)) - -def episodes(item): - logger.info() - itemlist = [] - - data = load_data(item.url) - seasonsPattern = '"#episodios(\d+)".*?>(.*?)' - episodesPattern = 'id="episodios%s">(.*?)' - - matches = scrapertools.find_multiple_matches(data, seasonsPattern) - for season, title in matches: - itemlist.append(Item(channel = item.channel, title="[COLOR blue]%s[/COLOR]" % title, - folder=False, text_bold=True)) - episodeMatches = scrapertools.find_single_match(data, episodesPattern % season) - put_episodes(itemlist, item, episodeMatches) - - return itemlist - -def shows(item): - logger.info() - itemlist = [] - - data = load_data(item.url) - pattern = '"in">(.*?)' - - matches = scrapertools.find_multiple_matches(data, pattern) - for link, title in matches: - itemlist.append(Item(channel = item.channel, title=title, url=host + link, action="episodes")) - - return itemlist - -def movies(item): - logger.info() - itemlist = [] - - #descarga la pagina html - data = load_data(item.url) - - #patron para buscar las peliculas - pattern = '
  • &&'.replace('&&', pattern) - - matches = scrapertools.find_multiple_matches(data, pattern) - for link, genre in matches: - itemlist.append(Item(channel = item.channel, title=genre, url=link, action="movies")) - - return itemlist - -def genre(item): - return by(item, '(\D+)') - -def age(item): - return by(item, '(\d+)') - -def GKPluginLink(hash): - hashdata = urllib.urlencode({r'link':hash}) - try: - json = httptools.downloadpage('https://player4.cuevana2.com/plugins/gkpluginsphp.php', post=hashdata).data - except: - return None - logger.info(jsontools.load(json)) - - data = jsontools.load(json) if json else False - if data: - return data['link'] if 'link' in data else None - else: - return None - -def RedirectLink(hash): - hashdata = urllib.urlencode({r'url':hash}) - return redirect_url('https://player4.cuevana2.com/r.php', hashdata) - -def OpenloadLink(hash): - hashdata = urllib.urlencode({r'h':hash}) - json = httptools.downloadpage('https://api.cuevana2.com/openload/api.php', post=hashdata).data - logger.info("CUEVANA OL JSON %s" % json) - data = jsontools.load(json) if json else False - - return data['url'] if data['status'] == 1 else None - -#el pattern esta raro para eliminar los duplicados, de todas formas asi es un lenguaje de programacion verificando su sintaxis -def getContentMovie(data, item): - item.infoLabels["year"] = scrapertools.find_single_match(data, 'rel="tag">(\d+)') - genre = '' - for found_genre in scrapertools.find_multiple_matches(data, 'genero/.*?">(.*?)(?=.*?

    )'): - genre += found_genre + ', ' - item.infoLabels["genre"] = genre.strip(', ') - - director = '' - for found_director in scrapertools.find_multiple_matches(data, 'director/.*?">(.*?)(?=.*?

    )'): - director += found_director + ', ' - item.infoLabels["director"] = director.strip(', ') - - item.infoLabels["cast"] = tuple(found_cast for found_cast in scrapertools.find_multiple_matches( - data, 'reparto/.*?">(.*?)(?=.*?

    )')) - -def getContentShow(data, item): - item.thumbnail = scrapertools.find_single_match(data, 'width="120" height="160" src="([^"]+)"') - item.infoLabels['genre'] = scrapertools.find_single_match(data, '-4px;">(.*?)
  • ') - -def findvideos(item): - logger.info() - itemlist = [] - - data = load_data(item.url) - if item.extra: - getContentShow(data, item) - else: - getContentMovie(data, item) - pattern = '' - patron = 'id="(Opt\d+)">.*?src="(?!about:blank)([^"]+)" frameborder.*?' - matches = re.compile(patron, re.DOTALL).findall(data) - - for option, scrapedurl in matches: - scrapedurl = scrapedurl.replace('"','').replace('&','&') - data_video = get_source(scrapedurl) - url = scrapertools.find_single_match(data_video, '
    .*?src="([^"]+)"') - opt_data = scrapertools.find_single_match(data,'"%s">.*?.*?([^<]+)'%option).split('-') - language = opt_data[0].strip() - quality = opt_data[1].strip() - if 'sub' in language.lower(): - language='VOSE' - else: - language = 'VO' - if url != '' and 'youtube' not in url: - itemlist.append(Item(channel=item.channel, title='%s', url=url, language=IDIOMAS[language], quality=quality, - action='play')) - elif 'youtube' in url: - trailer = Item(channel=item.channel, title='Trailer', url=url, action='play', server='youtube') - - itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % '%s [%s] [%s]'%(i.server.capitalize(), - i.language, i.quality)) - try: - itemlist.append(trailer) - except: - pass - - # Requerido para FilterTools - # itemlist = filtertools.get_links(itemlist, item, list_language) - - # Requerido para AutoPlay - - autoplay.start(itemlist, item) - - if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': - itemlist.append( - Item(channel=item.channel, title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', url=item.url, - action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle)) - - - return itemlist - - -def search(item, texto): - logger.info() - texto = texto.replace(" ", "+") - item.url = item.url + texto - - if texto != '': - return list_all(item) - else: - return [] - -def newest(categoria): - logger.info() - itemlist = [] - item = Item() - try: - if categoria in ['peliculas']: - item.url = host+'peliculas/' - - itemlist = list_all(item) - if itemlist[-1].title == 'Siguiente >>': - itemlist.pop() - except: - import sys - for line in sys.exc_info(): - logger.error("{0}".format(line)) - return [] - - return itemlist diff --git a/channels/estrenosdoramas.json b/channels/estrenosdoramas.json deleted file mode 100644 index 82519f8f..00000000 --- a/channels/estrenosdoramas.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "id": "estrenosdoramas", - "name": "Estrenos Doramas", - "active": true, - "adult": false, - "language": ["VOSE","LAT"], - "thumbnail": "https://www.estrenosdoramas.net/wp-content/uploads/2016/08/estrenos-doramasss-net3.png", - "banner": "", - "categories": [ - "tvshow", - "vos" - ], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Incluir en busqueda global", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "filter_languages", - "type": "list", - "label": "Mostrar enlaces en idioma...", - "default": 0, - "enabled": true, - "visible": true, - "lvalues": [ - "No filtrar", - "VOSE", - "VO", - "LAT" - ] - } - ] - } - \ No newline at end of file diff --git a/channels/estrenosdoramas.py b/channels/estrenosdoramas.py deleted file mode 100644 index 253c92ab..00000000 --- a/channels/estrenosdoramas.py +++ /dev/null @@ -1,296 +0,0 @@ -# -*- coding: utf-8 -*- -# -*- Channel Estreno Doramas -*- -# -*- Created for Alfa-addon -*- -# -*- By the BDamian (Based on channels from Alfa Develop Group) -*- - -import re - -from channels import autoplay -from channels import filtertools -from core import httptools -from core import scrapertools -from core import servertools -from core import jsontools -from core import tmdb -from core.item import Item -from platformcode import config, logger -from channelselector import get_thumb -import ast - -host = 'https://www.estrenosdoramas.net/' - -IDIOMAS = {'Latino': 'LAT', 'Vo':'VO', 'Vose': 'VOSE'} -IDIOMA = "no filtrar" -list_language = IDIOMAS.values() -list_quality = [] -list_servers = ['verystream', 'openload', 'streamango', 'netutv', 'okru', 'mp4upload'] - -def get_source(url, referer=None): - logger.info() - if referer is None: - data = httptools.downloadpage(url).data - else: - data = httptools.downloadpage(url, headers={'Referer':referer}).data - data = re.sub(r'\n|\r|\t| |
    |\s{2,}', "", data) - return data - -def mainlist(item): - logger.info() - - autoplay.init(item.channel, list_servers, list_quality) - itemlist = [] - - itemlist.append(Item(channel= item.channel, title="Doramas", action="list_all", - url=host + 'category/doramas-online', - thumbnail=get_thumb('doramas', auto=True), type='dorama')) - - itemlist.append(Item(channel=item.channel, title="Películas", action="list_all", - url=host + 'category/peliculas', - thumbnail=get_thumb('movies', auto=True), type='movie')) - - itemlist.append(Item(channel=item.channel, title="Últimos capítulos", action="list_all", - url=host + 'category/ultimos-capitulos-online', - thumbnail=get_thumb('doramas', auto=True), type='movie')) - - itemlist.append(Item(channel=item.channel, title="Por Genero", action="menu_generos", - url=host, - thumbnail=get_thumb('doramas', auto=True), type='dorama')) - - itemlist.append(Item(channel=item.channel, title="Doblado Latino", action="list_all", - url=host + 'category/latino', - thumbnail=get_thumb('doramas', auto=True), type='dorama')) - - itemlist.append(Item(channel=item.channel, title = 'Buscar', action="search", url= host+'search/', - thumbnail=get_thumb('search', auto=True))) - - autoplay.show_option(item.channel, itemlist) - - return itemlist - - -def menu_generos(item): - logger.info() - - data = get_source(item.url) - data = scrapertools.find_single_match(data, '
    (.*?)
    ') - - itemlist = [] - - patron = '
  • (.*?).*?
  • ' - matches = re.compile(patron, re.DOTALL).findall(data) - - media_type = item.type - for scrapedurl, scrapedtitle in matches: - new_item = Item(channel=item.channel, title=scrapedtitle, url=scrapedurl, - thumbnail=item.thumbnail, type=item.type, action="list_all") - itemlist.append(new_item) - - return itemlist - - -def list_all(item): - logger.info() - itemlist = [] - - data = get_source(item.url) - data = scrapertools.find_single_match(data, '

    Resultados

    .*?