diff --git a/channels/0example.json b/channels/0example.json.txt similarity index 100% rename from channels/0example.json rename to channels/0example.json.txt diff --git a/channels/0example.py b/channels/0example.py.txt similarity index 100% rename from channels/0example.py rename to channels/0example.py.txt diff --git a/channels/altadefinizione01.py b/channels/altadefinizione01.py index 506b091d..be01b78f 100644 --- a/channels/altadefinizione01.py +++ b/channels/altadefinizione01.py @@ -27,14 +27,12 @@ def findhost(): host = scrapertoolsV2.find_single_match(data, '
]+>[^>]+ [^>]+[^>]+ [^>]+>(?P[^<]+).*?[^>]+>(?P<year>\d{4})<'\ @@ -106,7 +105,8 @@ def orderalf(item): def search(item, text): support.log(item, text) - + findhost() + itemlist = [] text = text.replace(" ", "+") item.url = host + "/index.php?do=search&story=%s&subaction=search" % (text) @@ -122,6 +122,7 @@ def search(item, text): def newest(categoria): support.log(categoria) + findhost() itemlist = [] item = Item() try: diff --git a/channels/casacinema.json b/channels/casacinema.json index 8f092063..4532df5d 100644 --- a/channels/casacinema.json +++ b/channels/casacinema.json @@ -4,8 +4,8 @@ "language": ["ita", "sub-ita"], "active": true, "adult": false, - "thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/casacinema.png", - "banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/casacinema.png", + "thumbnail": "casacinema.png", + "banner": "casacinema.png", "categories": ["tvshow", "movie","vos"], "settings": [ ] diff --git a/channels/casacinemaInfo.py b/channels/casacinemaInfo.py index 8f48cdef..d94c55a4 100644 --- a/channels/casacinemaInfo.py +++ b/channels/casacinemaInfo.py @@ -32,7 +32,7 @@ def findhost(): headers = [['Referer', host]] if host.endswith('/'): host = host[:-1] -findhost() + list_servers = ['supervideo', 'streamcherry','rapidvideo', 'streamango', 'openload'] list_quality = ['default', 'HD', '3D', '4K', 'DVD', 'SD'] @@ -40,7 +40,7 @@ list_quality = ['default', 'HD', '3D', '4K', 'DVD', 'SD'] @support.menu def mainlist(item): support.log(item) - + findhost() film = ['', ('Al Cinema', ['/category/in-sala/', 'peliculas', '']), ('Novità', ['/category/nuove-uscite/', 'peliculas', '']), @@ -55,7 +55,8 @@ def mainlist(item): def peliculas(item): support.log(item) #support.dbg() # decommentare per attivare web_pdb - + #findhost() + blacklist = [''] if item.args != 'search': patron = r'<div class="col-mt-5 postsh">[^<>]+<div class="poster-media-card">[^<>]+<a href="(?P<url>[^"]+)" title="(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?".*?<img(?:.+?)?src="(?P<thumb>[^"]+)"' @@ -66,6 +67,7 @@ def peliculas(item): patronNext = '<a href="([^"]+)"\s+?><i class="glyphicon glyphicon-chevron-right"' + #support.regexDbg(item, patronBlock, headers) #debug = True return locals() @@ -86,6 +88,7 @@ def genres(item): def search(item, text): support.log('search', item) + findhost() itemlist = [] text = text.replace(' ', '+') item.args = 'search' @@ -101,8 +104,10 @@ def search(item, text): def newest(categoria): support.log('newest ->', categoria) + findhost() itemlist = [] item = Item() + try: if categoria == 'peliculas': item.url = host diff --git a/channels/cinemalibero.json b/channels/cinemalibero.json index acf7781a..820ef7bb 100644 --- a/channels/cinemalibero.json +++ b/channels/cinemalibero.json @@ -4,8 +4,8 @@ "language": ["ita"], "active": true, "adult": false, - "thumbnail": "https://www.cinemalibero.center/wp-content/themes/Cinemalibero%202.0/images/logo02.png", - "banner": "https://www.cinemalibero.center/wp-content/themes/Cinemalibero%202.0/images/logo02.png", + "thumbnail": "cinemalibero.png", + "banner": "cinemalibero.png", "categories": ["movie","tvshow","anime"], "not_active": ["include_in_newest"], "settings": [] diff --git a/channels/cinemalibero.py b/channels/cinemalibero.py index c2c3bee5..0f9c26b4 100644 --- a/channels/cinemalibero.py +++ b/channels/cinemalibero.py @@ -133,7 +133,7 @@ def episodios(item): # Questa def. deve sempre essere nominata episodios url=item.url, show=item.fulltitle, contentType='movie')) - debug = True + #debug = True return locals() @support.scrape @@ -157,7 +157,7 @@ def select(item): return episodios(Item(channel=item.channel, title=item.title, fulltitle=item.fulltitle, - contentSerieName = fulltitle, + contentSerieName = item.fulltitle, url=item.url, extra='serie', contentType='episode')) diff --git a/channels/eurostreaming.py b/channels/eurostreaming.py index e0948c03..7e96865e 100644 --- a/channels/eurostreaming.py +++ b/channels/eurostreaming.py @@ -26,7 +26,7 @@ def findhost(): host = 'https://www.'+permUrl['location'].replace('https://www.google.it/search?q=site:', '') headers = [['Referer', host]] -findhost() + list_servers = ['verystream', 'wstream', 'speedvideo', 'flashx', 'nowvideo', 'streamango', 'deltabit', 'openload'] list_quality = ['default'] @@ -34,13 +34,12 @@ list_quality = ['default'] @support.menu def mainlist(item): support.log() + findhost() tvshow = ['' ] - anime = ['/category/anime-cartoni-animati/' ] - mix = [ (support.typo('Aggiornamenti Serie-Anime', 'bullet bold'), ['/aggiornamento-episodi/', 'peliculas', 'newest']), (support.typo('Archivio Serie-Anime', 'bullet bold'), ['/category/serie-tv-archive/', 'peliculas']) @@ -53,7 +52,7 @@ def mainlist(item): @support.scrape def peliculas(item): support.log() - + #findhost() action = 'episodios' if item.args == 'newest': #patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>.*?).[^–][\s]?<a href="(?P<url>[^"]+)"\s+target="_blank">(?P<episode>\d+x\d+-\d+|\d+x\d+) (?P<title2>.*?)[ ]?(?:|\((?P<lang>SUB ITA)\))?</a>' @@ -62,13 +61,14 @@ def peliculas(item): else: patron = r'<div class="post-thumb">.*?\s<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)\s?(?: Serie Tv)?\s?\(?(?P<year>\d{4})?\)?<\/a><\/h2>' patronNext='a class="next page-numbers" href="?([^>"]+)">Avanti »</a>' - + #debug = True return locals() @support.scrape def episodios(item): support.log("episodios: %s" % item) + #findhost() action = 'findvideos' item.contentType = 'tvshow' @@ -76,7 +76,8 @@ def episodios(item): data1 = pagina(item.url) data1 = re.sub('\n|\t', ' ', data1) data = re.sub(r'>\s+<', '> <', data1) - patronBlock = r'(?P<block>STAGIONE\s\d+ (.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>' + #patronBlock = r'(?P<block>STAGIONE\s\d+ (.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>' + patronBlock = r'</span>(?P<block>[a-zA-Z\s]+\d+(.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>' #patron = r'(?:\s|\Wn)?(?:<strong>|)?(?P<episode>\d+&#\d+;\d+-\d+|\d+&#\d+;\d+)(?:</strong>|)?(?P<title>.+?)(?:–|-.+?-|–.+?–|–|.)?<a (?P<url>.*?)<br />' patron = r'(?:\s|\Wn)?(?:<strong>|)?(?P<episode>\d+&#\d+;\d+-\d+|\d+&#\d+;\d+)(?:</strong>|)?(?P<title>.+?)(?:–|-.+?-|–.+?–|–|.)?(?:<a (?P<url>.*?))?<br />' @@ -91,6 +92,7 @@ def episodios(item): def pagina(url): support.log(url) + #findhost() data = httptools.downloadpage(url, headers=headers).data.replace("'", '"') #support.log("DATA ----###----> ", data) @@ -110,6 +112,7 @@ def pagina(url): # =========== def ricerca ============= def search(item, texto): support.log() + findhost() item.url = "%s/?s=%s" % (host, texto) item.contentType = 'tvshow' @@ -127,6 +130,7 @@ def search(item, texto): def newest(categoria): support.log() + findhost() itemlist = [] item = Item() item.contentType = 'tvshow' diff --git a/channels/ilgeniodellostreaming.json b/channels/ilgeniodellostreaming.json index 49426164..960aaabe 100644 --- a/channels/ilgeniodellostreaming.json +++ b/channels/ilgeniodellostreaming.json @@ -3,9 +3,9 @@ "name": "IlGenioDelloStreaming", "active": true, "adult": false, - "language": ["ita", "vos"], - "thumbnail": "https://i.imgur.com/Nsa81r0.png", - "banner": "https://i.imgur.com/Nsa81r0.png", + "language": ["ita", "sub-ita"], + "thumbnail": "ilgeniodellostreaming.png", + "banner": "ilgeniodellostreaming.png", "categories": ["movie", "tvshow", "anime", "vos"], "settings": [] } diff --git a/channels/mondoserietv.json b/channels/mondoserietv.json index 2f1a428e..3bd6ab63 100644 --- a/channels/mondoserietv.json +++ b/channels/mondoserietv.json @@ -4,8 +4,8 @@ "active": true, "adult": false, "language": ["ita"], - "thumbnail": "https:\/\/mondoserietv.com\/wp-content\/uploads\/2018\/04\/logo.png", - "bannermenu": "https:\/\/mondoserietv.com\/wp-content\/uploads\/2018\/04\/logo.png", + "thumbnail": "mondoserietv.png", + "bannermenu": "mondoserietv.png", "categories": ["movie","anime","tvshow","documentary"], "not_active":["include_in_newest_anime","include_in_newest_documentary"], "settings": [] diff --git a/channels/seriehd.py b/channels/seriehd.py index 030d0c7b..a8853e8a 100644 --- a/channels/seriehd.py +++ b/channels/seriehd.py @@ -7,23 +7,19 @@ from core import scrapertoolsV2, httptools, support from core.item import Item -# impostati dinamicamente da findhost() host = '' headers = '' def findhost(): + global host, headers data= httptools.downloadpage('https://seriehd.nuovo.link/').data global host, headers host = scrapertoolsV2.find_single_match(data, r'<div class="elementor-button-wrapper"> <a href="([^"]+)"') headers = [['Referer', host]] - return host - -findhost() list_servers = ['verystream', 'openload', 'streamango', 'thevideome'] list_quality = ['1080p', '720p', '480p', '360'] - @support.menu def mainlist(item): findhost() @@ -33,33 +29,9 @@ def mainlist(item): return locals() -def search(item, texto): - support.log(texto) - - item.contentType = 'tvshow' - item.url = host + "/?s=" + texto - try: - return peliculas(item) - - # Continua la ricerca in caso di errore . - except: - import sys - for line in sys.exc_info(): - support.logger.error("%s" % line) - return [] - - -@support.scrape -def genre(item): - patronMenu = '<a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a>' - blacklist = ['Serie TV','Serie TV Americane','Serie TV Italiane','altadefinizione'] - patronBlock = '<ul class="sub-menu">(?P<block>.*)</ul>' - action = 'peliculas' - return locals() - - @support.scrape def peliculas(item): + #findhost() patron = r'<h2>(?P<title>.*?)</h2>\s*<img src="(?P<thumb>[^"]+)" alt="[^"]*" />\s*<A HREF="(?P<url>[^"]+)">.*?<span class="year">(?:(?P<year>[0-9]{4}))?.*?<span class="calidad">(?:(?P<quality>[A-Z]+))?.*?</span>' patronNext=r'<span class="current">\d+</span><a rel="nofollow" class="page larger" href="([^"]+)">\d+</a>' action='episodios' @@ -68,6 +40,7 @@ def peliculas(item): @support.scrape def episodios(item): + #findhost() data ='' url = support.match(item, patronBlock=r'<iframe width=".+?" height=".+?" src="([^"]+)" allowfullscreen frameborder="0">')[1] seasons = support.match(item, r'<a href="([^"]+)">(\d+)<', r'<h3>STAGIONE</h3><ul>(.*?)</ul>', headers, url)[0] @@ -82,8 +55,35 @@ def episodios(item): action = 'findvideos' return locals() + +@support.scrape +def genre(item): + #findhost() + patronMenu = '<a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a>' + blacklist = ['Serie TV','Serie TV Americane','Serie TV Italiane','altadefinizione'] + patronBlock = '<ul class="sub-menu">(?P<block>.*)</ul>' + action = 'peliculas' + return locals() + + +def search(item, texto): + support.log(texto) + findhost() + + item.contentType = 'tvshow' + item.url = host + "/?s=" + texto + try: + return peliculas(item) + # Continua la ricerca in caso di errore . + except: + import sys + for line in sys.exc_info(): + support.logger.error("%s" % line) + return [] + def newest(categoria): support.log(categoria) + findhost() itemlist = [] item = support.Item() try: diff --git a/channels/serietvonline.py b/channels/serietvonline.py index 8c090a34..c92fbe3b 100644 --- a/channels/serietvonline.py +++ b/channels/serietvonline.py @@ -28,7 +28,6 @@ def findhost(): data = httptools.downloadpage('https://serietvonline.me/').data host = scrapertoolsV2.find_single_match(data, r'<a class="pure-button pure-button-primary" title=\'serie tv online\' href="([^"]+)">') headers = [['Referer', host]] -findhost() list_servers = ['akvideo', 'wstream', 'backin', 'vidtome', 'nowvideo'] list_quality = ['default'] @@ -37,6 +36,7 @@ list_quality = ['default'] @support.menu def mainlist(item): support.log() + findhost() film = ['/ultimi-film-aggiunti/', ('Lista', ['/lista-film/', 'peliculas', 'lista']) @@ -61,6 +61,7 @@ def mainlist(item): @support.scrape def peliculas(item): support.log() + #findhost() blacklist = ['DMCA', 'Contatti', 'Attenzione NON FARTI OSCURARE', 'Lista Ccartoni Animati e Anime'] patronBlock = r'<h1>.+?</h1>(?P<block>.*?)<div class="footer_c">' @@ -86,6 +87,11 @@ def peliculas(item): ## item.action = 'episodios' ## return item + elif item.contentType == 'episode': + pagination = 35 + action = 'findvideos' + patron = r'<td><a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>[^<]+)(?P<episode>[\d\-x]+)?(?P<title2>[^<]+)?<' + elif item.contentType == 'tvshow': # SEZIONE Serie TV- Anime - Documentari pagination = 35 @@ -94,9 +100,6 @@ def peliculas(item): patron = r'<div class="movie">[^>]+>.+?src="(?P<thumb>[^"]+)" alt="[^"]+".+?href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[ ](?P<rating>\d+.\d+|\d+)<[^>]+>[^>]+><h2>(?P<title>[^"]+)</h2>[ ]?(?:<span class="year">(?P<year>\d+|\-\d+))?<' else: patron = r'(?:<td>)?<a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>[^<]+)(?P<episode>[\d\-x]+)?(?P<title2>[^<]+)?<' - if item.args == 'update': - action = 'findvideos' - patron = r'<td><a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>[^<]+)(?P<episode>[\d\-x]+)?(?P<title2>[^<]+)?<' else: # SEZIONE FILM @@ -129,6 +132,7 @@ def peliculas(item): @support.scrape def episodios(item): support.log() + #findhost() action = 'findvideos' patronBlock = r'<table>(?P<block>.*?)<\/table>' @@ -140,6 +144,7 @@ def episodios(item): def search(item, text): support.log("CERCA :" ,text, item) + findhost() item.url = "%s/?s=%s" % (host, text) try: @@ -154,6 +159,7 @@ def search(item, text): def newest(categoria): support.log(categoria) + findhost() itemlist = [] item = Item() @@ -162,7 +168,7 @@ def newest(categoria): item.url = host + '/ultimi-film-aggiunti/' elif categoria == 'series': item.args = 'update' - item.contentType = 'tvshow' + item.contentType = 'episode' item.url = host +'/ultimi-episodi-aggiunti/' try: item.action = 'peliculas' diff --git a/core/channeltools.py b/core/channeltools.py index e54eb43d..254d2ed9 100644 --- a/core/channeltools.py +++ b/core/channeltools.py @@ -375,8 +375,6 @@ def set_channel_setting(name, value, channel): except EnvironmentError: logger.error("ERROR al leer el archivo: %s" % file_settings) - dict_settings[name] = value - # delete unused Settings def_keys = [] del_keys = [] @@ -388,11 +386,12 @@ def set_channel_setting(name, value, channel): for key in del_keys: del dict_settings[key] + dict_settings[name] = value + # comprobamos si existe dict_file y es un diccionario, sino lo creamos if dict_file is None or not dict_file: dict_file = {} - dict_file['settings'] = dict_settings # Creamos el archivo ../settings/channel_data.json diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 483c9506..282d7029 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -549,7 +549,7 @@ def set_context_commands(item, parent_item): from_action=item.action).tourl()))) # Añadir a Alfavoritos (Mis enlaces) if item.channel not in ["favorites", "videolibrary", "help", ""] and parent_item.channel != "favorites": - context_commands.append(('[COLOR blue]%s[/COLOR]' % config.get_localized_string(70557), "XBMC.RunPlugin(%s?%s)" % + context_commands.append(("[B]%s[/B]" % config.get_localized_string(70557), "XBMC.RunPlugin(%s?%s)" % (sys.argv[0], item.clone(channel="kodfavorites", action="addFavourite", from_channel=item.channel, from_action=item.action).tourl()))) @@ -571,7 +571,7 @@ def set_context_commands(item, parent_item): mediatype = 'tv' else: mediatype = item.contentType - context_commands.append(("[COLOR yellow]%s[/COLOR]" % config.get_localized_string(70561), "XBMC.Container.Update (%s?%s)" % ( + context_commands.append(("[B]%s[/B]" % config.get_localized_string(70561), "XBMC.Container.Update (%s?%s)" % ( sys.argv[0], item.clone(channel='search', action='discover_list', search_type='list', page='1', list_type='%s/%s/similar' % (mediatype,item.infoLabels['tmdb_id'])).tourl()))) diff --git a/specials/news.py b/specials/news.py index 38ecb05c..f1274853 100644 --- a/specials/news.py +++ b/specials/news.py @@ -149,7 +149,7 @@ def get_channels_list(): continue # No incluir si el canal es en un idioma filtrado - if channel_language != "all" and channel_language not in channel_parameters["language"] \ + if channel_language != "all" and channel_language not in str(channel_parameters["language"]) \ and "*" not in channel_parameters["language"]: continue @@ -624,7 +624,7 @@ def setting_channel(item): continue # No incluir si el canal es en un idioma filtrado - if channel_language != "all" and channel_language not in channel_parameters["language"] \ + if channel_language != "all" and channel_language not in str(channel_parameters["language"]) \ and "*" not in channel_parameters["language"]: continue diff --git a/specials/search.py b/specials/search.py index a4f19373..196614f4 100644 --- a/specials/search.py +++ b/specials/search.py @@ -256,7 +256,7 @@ def setting_channel_old(item): continue # No incluir si el canal es en un idioma filtrado - if channel_language != "all" and channel_language not in channel_parameters["language"] \ + if channel_language != "all" and channel_language not in str(channel_parameters["language"]) \ and "*" not in channel_parameters["language"]: continue @@ -524,7 +524,7 @@ def do_search(item, categories=None): continue # No busca si el canal es en un idioma filtrado - if channel_language != "all" and channel_language not in channel_parameters["language"] \ + if channel_language != "all" and channel_language not in str(channel_parameters["language"]) \ and "*" not in channel_parameters["language"]: logger.info("%s -idioma no válido-" % basename_without_extension) continue diff --git a/specials/searchall.py b/specials/searchall.py index de795570..fa3db25f 100644 --- a/specials/searchall.py +++ b/specials/searchall.py @@ -705,7 +705,7 @@ def do_channels_search(item): continue # No busca si el canal es en un idioma filtrado - if channel_language != "all" and channel_parameters["language"] != channel_language: + if channel_language != "all" and channel_language not in str(channel_parameters["language"]): continue # No busca si es un canal excluido de la busqueda global