diff --git a/channels/eurostreaming.json b/channels/eurostreaming.json index d1502022..d972d2b8 100644 --- a/channels/eurostreaming.json +++ b/channels/eurostreaming.json @@ -1,44 +1,82 @@ { "id": "eurostreaming", "name": "Eurostreaming", - "language": ["ita"], - "active": true, + "active": true, "adult": false, - "thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/eurostreaming.png", - "banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/eurostreaming.png", + "language": ["ita"], + "thumbnail": "", + "bannermenu": "", "categories": ["tvshow","anime"], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Includi ricerca globale", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_series", - "type": "bool", - "label": "Includi in Novità - Serie TV", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_anime", - "type": "bool", - "label": "Includi in Novità - Anime", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "include_in_newest_italiano", - "type": "bool", - "label": "Includi in Novità - Italiano", - "default": true, - "enabled": true, - "visible": true - } - ] + "settings": [ + { + "id": "include_in_global_search", + "type": "bool", + "label": "Includi ricerca globale", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "modo_grafico", + "type": "bool", + "label": "Buscar información extra", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_series", + "type": "bool", + "label": "Includi in novità - Serie TV", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "comprueba_enlaces", + "type": "bool", + "label": "Verifica se i link esistono", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "comprueba_enlaces_num", + "type": "list", + "label": "Numero de link da verificare", + "default": 1, + "enabled": true, + "visible": "eq(-1,true)", + "lvalues": [ "5", "10", "15", "20" ] + }, + { + "id": "filter_languages", + "type": "list", + "label": "Mostra link in lingua...", + "default": 0, + "enabled": true, + "visible": true, + "lvalues": [ + "Non filtrare", + "ITA", + "SUB ITA" + ] + }, + { + "id": "perfil", + "type": "list", + "label": "profilo dei colori", + "default": 0, + "enabled": true, + "visible": true, + "lvalues": [ + "Sin color", + "Perfil 5", + "Perfil 4", + "Perfil 3", + "Perfil 2", + "Perfil 1" + ] + } + ] } diff --git a/channels/eurostreaming.py b/channels/eurostreaming.py index 33f83ab0..94fad807 100644 --- a/channels/eurostreaming.py +++ b/channels/eurostreaming.py @@ -1,65 +1,115 @@ # -*- coding: utf-8 -*- -# ------------------------------------------------------------ -# Ringraziamo Icarus crew -# Canale per eurostreaming -# ------------------------------------------------------------ -import re, urlparse +# -*- Created or modificated for Alfa-Addon -*- +# -*- adpted for KOD -*- +# -*- By Greko -*- -from channels import autoplay -from core import scrapertools, httptools, servertools, tmdb, scrapertoolsV2 -from core.item import Item +#import base64 +import re +import urlparse +# gli import sopra sono da includere all'occorrenza +# per url con ad.fly from lib import unshortenit -from platformcode import logger, config -from channelselector import thumb -host = "https://eurostreaming.cafe" +from channelselector import get_thumb +from channels import autoplay +from channels import filtertools +from core import httptools +from core import scrapertoolsV2 +from core import servertools +from core.item import Item +from core import channeltools +from core import tmdb +from platformcode import config, logger + +__channel__ = "eurostreaming" #stesso di id nel file json + +#host = "https://eurostreaming.zone/" +#host = "https://eurostreaming.black/" +host = "https://eurostreaming.cafe/" #aggiornato al 30-04-2019 + +# ======== def per utility INIZIO ============================= +try: + __modo_grafico__ = config.get_setting('modo_grafico', __channel__) + __perfil__ = int(config.get_setting('perfil', __channel__)) +except: + __modo_grafico__ = True + __perfil__ = 0 + +# Fijar perfil de color +perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFFFFD700'], + ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFFFFD700'], + ['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFFFFD700']] + +if __perfil__ < 3: + color1, color2, color3, color4, color5 = perfil[__perfil__] +else: + color1 = color2 = color3 = color4 = color5 = "" + +__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__) +__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__) + +headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'], + ['Referer', host]]#,['Accept-Language','it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3']] + +parameters = channeltools.get_channel_parameters(__channel__) +fanart_host = parameters['fanart'] +thumbnail_host = parameters['thumbnail'] + +IDIOMAS = {'Italiano': 'IT', 'VOSI':'SUB ITA'} +list_language = IDIOMAS.values() +# per l'autoplay list_servers = ['openload', 'speedvideo', 'wstream', 'streamango' 'flashx', 'nowvideo'] -list_quality = ['default'] +list_quality = ['default'] +# =========== home menu =================== def mainlist(item): - logger.info("kod.eurostreaming mainlist") - autoplay.init(item.channel, list_servers, list_quality) - + logger.info("icarus.eurostreaming mainlist") + itemlist = [] + title = '' + itemlist = [ - Item( - channel=item.channel, - title="[B]Serie TV[/B]", - action="serietv", - extra="tvshow", + Item(channel=__channel__, title="Serie TV", + contentTitle = __channel__, action="serietv", + #extra="tvshow", + text_color=color4, url="%s/category/serie-tv-archive/" % host, - thumbnail= - "http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png" - ), - Item( - channel=item.channel, - title="[B]Anime / Cartoni[/B]", + infoLabels={'plot': item.category}, + thumbnail = get_thumb(title, auto = True) + ), + Item(channel=__channel__, title="Ultimi Aggiornamenti", + contentTitle = __channel__, action="elenco_aggiornamenti_serietv", + text_color=color4, url="%saggiornamento-episodi/" % host, + #category = __channel__, + extra="tvshow", + infoLabels={'plot': item.category}, + thumbnail = get_thumb(title, auto = True) + ), + Item(channel=__channel__, + title="Anime / Cartoni", action="serietv", extra="tvshow", + text_color=color4, url="%s/category/anime-cartoni-animati/" % host, - thumbnail= - "http://orig09.deviantart.net/df5a/f/2014/169/2/a/fist_of_the_north_star_folder_icon_by_minacsky_saya-d7mq8c8.png" - ), - Item( - channel=item.channel, - title="[COLOR blue]Cerca...[/COLOR]", + thumbnail= get_thumb(title, auto = True) + ), + Item(channel=__channel__, + title="[COLOR yellow]Cerca...[/COLOR]", action="search", extra="tvshow", - thumbnail= - "http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search") + text_color=color4, + thumbnail= get_thumb(title, auto = True) + ), ] - autoplay.show_option(item.channel, itemlist) - - itemlist = thumb(itemlist) - return itemlist +# ======== def in ordine di menu =========================== def serietv(item): - logger.info("kod.eurostreaming peliculas") + + logger.info("%s serietv log: %s" % (__channel__, item)) itemlist = [] - # Carica la pagina data = httptools.downloadpage(item.url).data @@ -68,29 +118,30 @@ def serietv(item): matches = re.compile(patron, re.DOTALL).findall(data) for scrapedurl, scrapedtitle, scrapedthumbnail in matches: - scrapedplot = "" - scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.replace("Streaming", "")) + #scrapedplot = "" + scrapedtitle = scrapertoolsV2.decodeHtmlentities(scrapedtitle)#.replace("Streaming", "")) if scrapedtitle.startswith("Link to "): scrapedtitle = scrapedtitle[8:] - # num = scrapertools.find_single_match(scrapedurl, '(-\d+/)') - # if num: - # scrapedurl = scrapedurl.replace(num, "-episodi/") + num = scrapertoolsV2.find_single_match(scrapedurl, '(-\d+/)') + if num: + scrapedurl = scrapedurl.replace(num, "-episodi/") itemlist.append( - Item( - channel=item.channel, + Item(channel=item.channel, action="episodios", - contentType="tvshow", + #contentType="tvshow", + contentSerieName = scrapedtitle, title=scrapedtitle, - fulltitle=scrapedtitle, - text_color="azure", + #text_color="azure", url=scrapedurl, thumbnail=scrapedthumbnail, - plot=scrapedplot, - show=scrapedtitle, + #plot=scrapedplot, + show=item.show, extra=item.extra, - folder=True)) + folder=True + )) - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) + # locandine e trama e altro da tmdb se presente l'anno migliora la ricerca + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True, idioma_busqueda='it') # Paginazione patronvideos = 'Avanti »' @@ -102,17 +153,125 @@ def serietv(item): Item( channel=item.channel, action="serietv", - title="[COLOR blue]" + config.get_localized_string(30992) + "[/COLOR]", + title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]", url=scrapedurl, - thumbnail=thumb(), + thumbnail= + "http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png", extra=item.extra, folder=True)) return itemlist +def episodios(item): + #logger.info("%s episodios log: %s" % (__channel__, item)) + itemlist = [] + + if not(item.lang): + lang_season = {'ITA':0, 'SUB ITA' :0} + # Download pagina + data = httptools.downloadpage(item.url).data + #======== + if 'clicca qui per aprire' in data.lower(): + logger.info("%s CLICCA QUI PER APRIRE GLI EPISODI log: %s" % (__channel__, item)) + item.url = scrapertoolsV2.find_single_match(data, '"go_to":"(.*?)"') + item.url = item.url.replace("\\","") + # Carica la pagina + data = httptools.downloadpage(item.url).data + #logger.info("%s FINE CLICCA QUI PER APRIRE GLI EPISODI log: %s" % (__channel__, item)) + elif 'clicca qui' in data.lower(): + logger.info("%s inizio CLICCA QUI log: %s" % (__channel__, item)) + item.url = scrapertoolsV2.find_single_match(data, '