diff --git a/plugin.video.alfa/channels/yaske.json b/plugin.video.alfa/channels/yaske.json deleted file mode 100755 index 4f460979..00000000 --- a/plugin.video.alfa/channels/yaske.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "id": "yaske", - "name": "Yaske", - "active": true, - "adult": false, - "language": "es", - "banner": "yaske.png", - "fanart": "https://github.com/master-1970/resources/raw/master/images/fanart/yaske.png", - "thumbnail": "yaske.png", - "version": 1, - "changes": [ - { - "date": "27/06/17", - "description": "Desactivar por falta de contenidos" - }, - { - "date": "04/06/17", - "description": "Desactivar por falta de contenidos" - }, - { - "date": "15/03/2017", - "description": "limpieza código" - }, - { - "date": "01/02/17", - "description": "Añadir imagenes, sinopsis, etc..." - }, - { - "date": "18/01/17", - "description": "Uso de httptools" - }, - { - "date": "12/12/16", - "description": "Cambios en la web" - }, - { - "date": "01/07/16", - "description": "Eliminado código innecesario." - }, - { - "date": "29/04/16", - "description": "Adaptar a Novedades Peliculas e Infantiles" - } - ], - "categories": [ - "latino", - "movie" - ], - "settings": [ - { - "id": "include_in_newest_peliculas", - "type": "bool", - "label": "Incluir en Novedades - Peliculas", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_infantiles", - "type": "bool", - "label": "Incluir en Novedades - Infantiles", - "default": false, - "enabled": true, - "visible": true - } - ] -} \ No newline at end of file diff --git a/plugin.video.alfa/channels/yaske.py b/plugin.video.alfa/channels/yaske.py deleted file mode 100644 index 19c85e83..00000000 --- a/plugin.video.alfa/channels/yaske.py +++ /dev/null @@ -1,263 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import base64 - -from core import channeltools -from core import config -from core import httptools -from core import logger -from core import scrapertoolsV2 -from core import servertools -from core import tmdb -from core.item import Item - - -HOST = 'http://www.yaske.ro' -parameters = channeltools.get_channel_parameters('yaske') -fanart_host = parameters['fanart'] -thumbnail_host = parameters['thumbnail'] -color1, color2, color3 = ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E'] - - -def mainlist(item): - logger.info() - itemlist = [] - item.url = HOST - item.text_color = color2 - item.fanart = fanart_host - thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/verdes/%s.png" - - itemlist.append(item.clone(title="Novedades", action="peliculas", text_bold=True, viewcontent='movies', - url=HOST + "/ultimas-y-actualizadas", - thumbnail=thumbnail % 'novedades', viewmode="movie_with_plot")) - itemlist.append(item.clone(title="Estrenos", action="peliculas", text_bold=True, - url=HOST + "/genre/premieres", thumbnail=thumbnail % 'estrenos')) - itemlist.append(item.clone(title="", folder=False)) - - itemlist.append(Item(channel=item.channel, title="Filtrar por:", fanart=fanart_host, folder=False, - text_color=color3, text_bold=True, thumbnail=thumbnail_host)) - itemlist.append(item.clone(title=" Género", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="genre", thumbnail=thumbnail % 'generos', viewmode="thumbnails")) - itemlist.append(item.clone(title=" Idioma", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="audio", thumbnail=thumbnail % 'idiomas')) - itemlist.append(item.clone(title=" Calidad", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="quality", thumbnail=thumbnail % 'calidad')) - itemlist.append(item.clone(title=" Año", action="menu_buscar_contenido", text_color=color1, text_italic=True, - extra="year", thumbnail=thumbnail % 'year')) - - itemlist.append(item.clone(title="", folder=False)) - itemlist.append(item.clone(title="Buscar por título", action="search", thumbnail=thumbnail % 'buscar')) - - return itemlist - - -def search(item, texto): - logger.info() - itemlist = [] - - try: - # http://www.yaske.ro/search/?q=los+pitufos - item.url = HOST + "/search/?q=" + texto.replace(' ', '+') - item.extra = "" - itemlist.extend(peliculas(item)) - if itemlist[-1].title == ">> Página siguiente": - item_pag = itemlist[-1] - itemlist = sorted(itemlist[:-1], key=lambda Item: Item.contentTitle) - itemlist.append(item_pag) - else: - itemlist = sorted(itemlist, key=lambda Item: Item.contentTitle) - - return itemlist - - except: - import sys - for line in sys.exc_info(): - logger.error("%s" % line) - return [] - - -def newest(categoria): - logger.info() - item = Item() - try: - if categoria == 'peliculas': - item.url = HOST + "/ultimas-y-actualizadas" - elif categoria == 'infantiles': - item.url = HOST + "/search/?q=&genre%5B%5D=animation" - else: - return [] - - itemlist = peliculas(item) - if itemlist[-1].title == ">> Página siguiente": - itemlist.pop() - - # Se captura la excepción, para no interrumpir al canal novedades si un canal falla - except: - import sys - for line in sys.exc_info(): - logger.error("{0}".format(line)) - return [] - - return itemlist - - -def peliculas(item): - logger.info() - itemlist = [] - url_next_page = "" - - data = httptools.downloadpage(item.url).data - data = re.sub(r"\n|\r|\t|\s{2}| ", "", data) - - patron = '
30: - url_next_page = item.url - matches = matches[:30] - next_page = 'b' - else: - matches = matches[30:] - next_page = 'a' - patron_next_page = 'Anteriores 0: - url_next_page = matches_next_page[0] - - for scrapedurl, scrapedthumbnail, idiomas, year, scrapedtitle in matches: - patronidiomas = "' - data = scrapertoolsV2.get_match(data, patron) - - # Extrae las entradas - patron = "" - matches = re.compile(patron, re.DOTALL).findall(data) - - itemlist = [] - for scrapedvalue, scrapedtitle in matches: - thumbnail = "" - - if item.extra == 'genre': - if scrapedtitle.strip() in ['Documental', 'Short', 'News']: - continue - - url = HOST + "/search/?q=&genre%5B%5D=" + scrapedvalue - filename = scrapedtitle.lower().replace(' ', '%20') - if filename == "ciencia%20ficción": - filename = "ciencia%20ficcion" - thumbnail = "https://raw.githubusercontent.com/master-1970/resources/master/images/genres/4/verdes/%s.png" \ - % filename - - elif item.extra == 'year': - url = HOST + "/search/?q=&year=" + scrapedvalue - thumbnail = item.thumbnail - else: - # http://www.yaske.ro/search/?q=&quality%5B%5D=c9 - # http://www.yaske.ro/search/?q=&audio%5B%5D=es - url = HOST + "/search/?q=&" + item.extra + "%5B%5D=" + scrapedvalue - thumbnail = item.thumbnail - - itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=url, text_color=color1, - thumbnail=thumbnail, contentType='movie', folder=True, viewmode="movie_with_plot")) - - if item.extra in ['genre', 'audio', 'year']: - return sorted(itemlist, key=lambda i: i.title.lower(), reverse=item.extra == 'year') - else: - return itemlist - - -def findvideos(item): - logger.info() - itemlist = list() - sublist = list() - - # Descarga la página - data = httptools.downloadpage(item.url).data - - if not item.plot: - item.plot = scrapertoolsV2.find_single_match(data, '>Sinopsis
([^<]+)
') - item.plot = scrapertoolsV2.decodeHtmlentities(item.plot) - - patron = '