From ab739925d0b20508b8366f1e76c64dac5672d5af Mon Sep 17 00:00:00 2001 From: mac12m99 Date: Fri, 1 Nov 2019 20:22:55 +0100 Subject: [PATCH 01/53] ops :D --- core/support.py | 1 + servers/hdload.py | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/support.py b/core/support.py index feb92e19..fd6c406c 100644 --- a/core/support.py +++ b/core/support.py @@ -910,6 +910,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru continue videoitem.server = findS[2] videoitem.title = findS[0] + videoitem.url = findS[1] item.title = item.contentTitle if config.get_localized_string(30161) in item.title else item.title videoitem.title = item.title + (typo(videoitem.title, '_ color kod []') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "") videoitem.fulltitle = item.fulltitle diff --git a/servers/hdload.py b/servers/hdload.py index 2f5f483f..c9306de4 100644 --- a/servers/hdload.py +++ b/servers/hdload.py @@ -19,8 +19,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= logger.info() itemlist = [] - logger.info(page_url) - page_url = 'https://hdload.space/getHost/' + scrapertoolsV2.find_single_match(page_url, 'https://hdload\.space/public/dist/index\.html\?id=([a-z0-9]+)') logger.info(page_url) data = httptools.downloadpage(page_url, post='').data logger.info(data) From 693e7babca657766f3ef4ffd5f0200d64077469c Mon Sep 17 00:00:00 2001 From: greko17 Date: Sat, 2 Nov 2019 00:50:30 +0100 Subject: [PATCH 02/53] fix: ilgeniodellostreaming.py canale finito, da testare --- channels/ilgeniodellostreaming.json | 11 +- channels/ilgeniodellostreaming.py | 242 ++++++++++++++-------------- 2 files changed, 123 insertions(+), 130 deletions(-) diff --git a/channels/ilgeniodellostreaming.json b/channels/ilgeniodellostreaming.json index ae0dca45..49426164 100644 --- a/channels/ilgeniodellostreaming.json +++ b/channels/ilgeniodellostreaming.json @@ -7,14 +7,5 @@ "thumbnail": "https://i.imgur.com/Nsa81r0.png", "banner": "https://i.imgur.com/Nsa81r0.png", "categories": ["movie", "tvshow", "anime", "vos"], - "settings": [ - { - "id": "include_in_newest_anime", - "type": "bool", - "label": "Includi in Novità - Anime", - "default": false, - "enabled": false, - "visible": false - } - ] + "settings": [] } diff --git a/channels/ilgeniodellostreaming.py b/channels/ilgeniodellostreaming.py index 820328e7..965ce7dc 100644 --- a/channels/ilgeniodellostreaming.py +++ b/channels/ilgeniodellostreaming.py @@ -6,8 +6,7 @@ """ - Problemi noti che non superano il test del canale: - NESSUNO (update 13-9-2019) + Alcuni video non si aprono sul sito... Avvisi per il test: i link per le categorie non sono TUTTI visibili nella pagina del sito: @@ -22,17 +21,20 @@ genere-> televisione film https://ilgeniodellostreaming.se/genere/televisione-film - Non va abilitato per: - Novità -> Anime - La pagina "Aggiornamenti Anime" del sito è vuota (update 13-9-2019) + Novità -> Serietv e Aggiornamenti nel canale: + - le pagine sono di 25 titoli + + + ##### note per i dev ######### + - La pagina "Aggiornamenti Anime" del sito è vuota (update 13-9-2019) + - in url: film o serietv """ import re -from platformcode import logger -from core import scrapertoolsV2, httptools, tmdb, support -from core.support import log, menu, aplay +from core import scrapertoolsV2, httptools, support +from core.support import log from core.item import Item from platformcode import config @@ -49,136 +51,87 @@ def mainlist(item): support.log(item) film = ['/film/', - ('Film Per Categoria',['', 'category', 'genres']), - ('Film Per Anno',['', 'category', 'year']), - ('Film Per Lettera',['/film-a-z/', 'category', 'letter']), + ('Film Per Categoria',['', 'genres', 'genres']), + ('Film Per Anno',['', 'genres', 'year']), + ('Film Per Lettera',['/film-a-z/', 'genres', 'letter']), ('Popolari',['/trending/?get=movies', 'peliculas', 'populared']), ('Più Votati', ['/ratings/?get=movies', 'peliculas', 'populared']) - ] - - tvshow = ['/serie/', - ('Nuovi Episodi', ['/aggiornamenti-serie/', 'newep', 'tvshow']), - ('TV Show', ['/tv-show/', 'peliculas', 'showtv', 'tvshow']) ] - anime = ['/anime/'] + tvshow = ['/serie/', + ('Nuovi Episodi', ['/aggiornamenti-serie/', 'peliculas', 'update']), + ('Popolari',['/trending/?get=tv', 'peliculas', 'populared']), + ('Più Votati', ['/ratings/?get=tv', 'peliculas', 'populared']) + + ] + + anime = ['/anime/' + ] + + Tvshow = [ + ('Show TV', ['/tv-show/', 'peliculas', '', 'tvshow']) + ] search = '' return locals() -@support.scrape -def category(item): - log(item) - - action='peliculas' - if item.args == 'genres': - patronBlock = r'

Genere

(?P.*?)/li>
' - elif item.args == 'year': - patronBlock = r'

Anno di uscita

(?P.*?)/li>
' - elif item.args == 'letter': - patronBlock = r'
(?P.*?)
' - patron = r'.*?)"[ ]?>(?P.*?)<\/a>' - -## debug = True - return locals() - -def search(item, texto): - log(texto) - item.url = host + "/?s=" + texto - try: - return peliculas(item) - except: - import sys - for line in sys.exc_info(): - logger.error("%s" % line) - - return [] - @support.scrape def peliculas(item): - log(item) -## import web_pdb; web_pdb.set_trace() + log() + + if item.args == 'search': - if item.action == 'search': patronBlock = r'<div class="search-page">(?P<block>.*?)<footer class="main">' patron = r'<div class="thumbnail animation-2"><a href="(?P<url>[^"]+)">'\ '<img src="(?P<thumb>[^"]+)" alt="[^"]+" \/>[^>]+>(?P<type>[^<]+)'\ '<\/span>.*?<a href.*?>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?'\ '<\/a>[^>]+>(?:<span class="rating">IMDb\s*(?P<rating>[0-9.]+)<\/span>)?'\ '.+?(?:<span class="year">(?P<year>[0-9]+)<\/span>)?[^>]+>[^>]+><p>(?P<plot>.*?)<\/p>' - type_content_dict={'movie': ['film'], 'tvshow': ['tv']} - type_action_dict={'findvideos': ['film'], 'episodios': ['tv']} -## elif item.args == 'newest': -## patronBlock = r'<div class="content"><header><h1>Aggiornamenti Serie</h1>'\ -## '</header>(?P<block>.*?)</li></ul></div></div></div>' -## patron = r'src="(?P<thumb>[^"]+)".*?href="(?P<url>[^"]+)">[^>]+>(?P<episode>[^<]+)'\ -## '<.*?"c">(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?<.+?<span class='\ -## '"quality">(\5SUB-ITA|.+?)</span>' +## type_content_dict={'movie': ['film'], 'tvshow': ['tv']} +## type_action_dict={'findvideos': ['film'], 'episodios': ['tv']} + def itemHook(item): + if 'film' not in item.url: + item.contentType = 'tvshow' + item.action = 'episodios' + return item + else: - elif item.args == 'letter': - patron = r'<td class="mlnh-2"><a href="(?P<url>[^"]+)">(?P<title>.+?)'\ - '[ ]?(?:\[(?P<lang>Sub-ITA)\])?<[^>]+>[^>]+>[^>]+>(?P<year>\d{4})\s+<' - elif item.args == 'populared': - patron = r'<div class="poster"><a href="(?P<url>[^"]+)"><img src='\ - '"(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> '\ - '(?P<rating>[0-9.]+)<[^>]+>[^>]+>'\ - '(?P<quality>[3]?[D]?[H]?[V]?[D]?[/]?[R]?[I]?[P]?)(?:SUB-ITA)?<'\ - '[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)(?:[ ]\[(?P<lang>Sub-ITA)\])?<'\ - '[^>]+>[^>]+>[^>]+>(?P<year>\d{4})?<' + if item.contentType == 'movie': + endBlock = '</article></div>' + else: + endBlock = '<footer class="main">' - elif item.args == 'showtv': - action = 'episodios' - patron = r'<div class="poster"><a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" '\ - 'alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> (?P<rating>[0-9.]+)<[^>]+>[^>]+>[^>]+>'\ - '[^>]+>[^>]+>(?P<title>.+?)<[^>]+>[^>]+>[^>]+>(?P<year>\d{4})?<[^>]+>[^>]+>'\ - '[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>.+?)<' + patronBlock = r'<header><h1>.+?</h1>(?P<block>.*?)'+endBlock - elif item.contentType == 'movie' and item.args != 'genres': - patronBlock = r'<header><h1>Film</h1>(?P<block>.*?)<div class="pagination">' - patron = r'<div class="poster">\s*<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" '\ - 'alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[0-9.]+)<\/div>'\ - '<span class="quality">(?:SUB-ITA|)?(?P<quality>|[^<]+)?'\ - '<\/span>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?'\ - '<\/a>[^>]+>'\ - '[^>]+>(?P<year>[^<]+)<\/span>[^>]+>[^>]+>'\ - '[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<div' + if item.contentType == 'movie': + if item.args == 'letter': + patronBlock = r'<table class="table table-striped">(?P<block>.+?)</table>' + patron = r'<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+><td class="mlnh-2"><a href="(?P<url>[^"]+)">(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?<[^>]+>[^>]+>[^>]+>(?P<year>\d{4})\s+<' + elif item.args == 'populared': + patron = r'<img src="(?P<thumb>[^"]+)" alt="[^"]+">[^>]+>[^>]+>[^>]+>[^>]+>\s+?(?P<rating>\d+.?\d+|\d+)<[^>]+>[^>]+>(?P<quality>[a-zA-Z\-]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>(?P<year>\d+)<' + else: - elif item.contentType == 'tvshow' or item.args == 'genres': - action = 'episodios' - patron = r'<div class="poster">\s*<a href="(?P<url>[^"]+)"><img '\ - 'src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> '\ - '(?P<rating>[0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\ - '(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA|Sub-ita)\])?<[^>]+>[^>]+>'\ - '[^>]+>(?P<year>[^<]+)<.*?<div class="texto">(?P<plot>[^<]+)' - -## else: -## patron = r'<div class="thumbnail animation-2"><a href="(?P<url>[^"]+)">'\ -## '<img src="(?P<thumb>[^"]+)" alt="[^"]+" \/>'\ -## '[^>]+>(?P<type>[^<]+)<\/span>.*?<a href.*?>(?P<title>[^<]+)'\ -## '<\/a>(?P<lang>[^>])+>[^>]+>(?:<span class="rating">IMDb\s*'\ -## '(?P<rating>[0-9.]+)<\/span>)?.*?(?:<span class="year">(?P<year>[0-9]+)'\ -## '<\/span>)?[^>]+>[^>]+><p>(?P<plot>.*?)<\/p>' -#### type_content_dict={'movie': ['film'], 'tvshow': ['tv']} -#### type_action_dict={'findvideos': ['film'], 'episodios': ['tv']} + patron = r'<div class="poster">\s*<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[0-9.]+)<\/div><span class="quality">(?:SUB-ITA|)?(?P<quality>|[^<]+)?<\/span>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?<\/a>[^>]+>[^>]+>(?P<year>[^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<div' + else: + # TVSHOW + action = 'episodios' + if item.args == 'update': + action = 'findvideos' + patron = r'<div class="poster"><img src="(?P<thumb>[^"]+)"[^>]+>[^>]+><a href="(?P<url>[^"]+)">[^>]+>(?P<episode>[\d\-x]+)[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)(?:\[(?P<lang>Sub-ITA|Sub-ita)\])?<[^>]+>[^>]+>[^>]+>[^>]+>(?P<quality>[HD]+)?(?:.+?)?/span><p class="serie"' + pagination = 25 + def itemHook(item): + item.contentType = 'episode' + return item + else: + patron = r'<div class="poster">\s?<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> (?P<rating>[0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA|Sub-ita)\])?<[^>]+>[^>]+>[^>]+>(?P<year>[^<]+)(?:<.*?<div class="texto">(?P<plot>[^<]+))?' patronNext = '<span class="current">[^<]+<[^>]+><a href="([^"]+)"' -## debug = True - return locals() - - -@support.scrape -def newep(item): - - patron = r'<div class="poster"><img src="(?P<thumb>[^"]+)" alt="(?:.+?)[ ]?'\ - '(?:\[(?P<lang>Sub-ITA|Sub-ita)\])?">[^>]+><a href="(?P<url>[^"]+)">'\ - '[^>]+>(?P<episode>[^<]+)<[^>]+>[^>]+>[^>]+><span class="c">'\ - '(?P<title>.+?)[ ]?(?:\[Sub-ITA\]|)<' - pagination = 10 -## debug = True + #support.regexDbg(item, patron, headers) + #debug = True return locals() @@ -195,35 +148,62 @@ def episodios(item): # debug = True return locals() +@support.scrape +def genres(item): + log(item) + + action='peliculas' + if item.args == 'genres': + patronBlock = r'<div class="sidemenu"><h2>Genere</h2>(?P<block>.*?)/li></ul></div>' + elif item.args == 'year': + item.args = 'genres' + patronBlock = r'<div class="sidemenu"><h2>Anno di uscita</h2>(?P<block>.*?)/li></ul></div>' + elif item.args == 'letter': + patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">' + + patron = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>' + +## debug = True + return locals() + +def search(item, text): + log(text) + itemlist = [] + text = text.replace(' ', '+') + item.url = host + "/?s=" + text + try: + item.args = 'search' + return peliculas(item) + except: + import sys + for line in sys.exc_info(): + log("%s" % line) + + return [] def newest(categoria): log(categoria) itemlist = [] item = Item() - action = peliculas - if categoria == 'peliculas': item.contentType = 'movie' item.url = host + '/film/' elif categoria == 'series': - action = newep - #item.args = 'newest' + item.args = 'update' item.contentType = 'tvshow' item.url = host + '/aggiornamenti-serie/' ## elif categoria == 'anime': ## item.contentType = 'tvshow' ## item.url = host + '/anime/' try: - item.action = action - itemlist = action(item) + item.action = 'peliculas' + itemlist = peliculas(item) - if itemlist[-1].action == action: - itemlist.pop() except: import sys for line in sys.exc_info(): - logger.error("{0}".format(line)) + log("{0}".format(line)) return [] return itemlist @@ -232,9 +212,31 @@ def newest(categoria): def findvideos(item): log() itemlist =[] + matches, data = support.match(item, '<iframe class="metaframe rptss" src="([^"]+)"[^>]+>',headers=headers) for url in matches: html = httptools.downloadpage(url, headers=headers).data data += str(scrapertoolsV2.find_multiple_matches(html, '<meta name="og:url" content="([^"]+)">')) + itemlist = support.server(item, data) + + if item.args == 'update': + + data = httptools.downloadpage(item.url).data + patron = r'<div class="item"><a href="'+host+'/serietv/([^"\/]+)\/"><i class="icon-bars">' + series = scrapertoolsV2.find_single_match(data, patron) + titles = support.typo(series.upper().replace('-', ' '), 'bold color kod') + goseries = support.typo("Vai alla Serie:", ' bold color kod') + itemlist.append( + Item(channel=item.channel, + title=goseries + titles, + fulltitle=titles, + show=series, + contentType='tvshow', + contentSerieName=series, + url=host+"/serietv/"+series, + action='episodios', + contentTitle=titles, + plot = "Vai alla Serie " + titles + " con tutte le puntate", + )) return itemlist From 247aff2676f6d7bdba947facb750cee2da51224f Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Sat, 2 Nov 2019 11:20:53 +0100 Subject: [PATCH 03/53] fix: ilgeniodellostreaming fixati problemi --- channels/ilgeniodellostreaming.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/channels/ilgeniodellostreaming.py b/channels/ilgeniodellostreaming.py index 965ce7dc..5f79d839 100644 --- a/channels/ilgeniodellostreaming.py +++ b/channels/ilgeniodellostreaming.py @@ -7,7 +7,7 @@ """ Alcuni video non si aprono sul sito... - + Avvisi per il test: i link per le categorie non sono TUTTI visibili nella pagina del sito: vanno costruiti con i nomi dei generi che vedete nel CANALE. @@ -51,15 +51,15 @@ def mainlist(item): support.log(item) film = ['/film/', - ('Film Per Categoria',['', 'genres', 'genres']), - ('Film Per Anno',['', 'genres', 'year']), - ('Film Per Lettera',['/film-a-z/', 'genres', 'letter']), + ('Generi',['', 'genres', 'genres']), + ('Per Lettera',['/film-a-z/', 'genres', 'letter']), + ('Anni',['', 'genres', 'year']), ('Popolari',['/trending/?get=movies', 'peliculas', 'populared']), ('Più Votati', ['/ratings/?get=movies', 'peliculas', 'populared']) ] tvshow = ['/serie/', - ('Nuovi Episodi', ['/aggiornamenti-serie/', 'peliculas', 'update']), + ('Aggiornamenti', ['/aggiornamenti-serie/', 'peliculas', 'update']), ('Popolari',['/trending/?get=tv', 'peliculas', 'populared']), ('Più Votati', ['/ratings/?get=tv', 'peliculas', 'populared']) @@ -114,7 +114,8 @@ def peliculas(item): patron = r'<img src="(?P<thumb>[^"]+)" alt="[^"]+">[^>]+>[^>]+>[^>]+>[^>]+>\s+?(?P<rating>\d+.?\d+|\d+)<[^>]+>[^>]+>(?P<quality>[a-zA-Z\-]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>(?P<year>\d+)<' else: - patron = r'<div class="poster">\s*<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[0-9.]+)<\/div><span class="quality">(?:SUB-ITA|)?(?P<quality>|[^<]+)?<\/span>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?<\/a>[^>]+>[^>]+>(?P<year>[^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<div' + #patron = r'<div class="poster">\s*<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[0-9.]+)<\/div><span class="quality">(?:SUB-ITA|)?(?P<quality>|[^<]+)?<\/span>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?<\/a>[^>]+>[^>]+>(?P<year>[^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<div' + patron = r'<div class="poster">\s?<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[0-9.]+)<\/div>(?:<span class="quality">(?:SUB-ITA|)?(?P<quality>|[^<]+)?<\/span>)?[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?<\/a>[^>]+>[^>]+>(?P<year>[^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<div' else: # TVSHOW action = 'episodios' @@ -226,7 +227,7 @@ def findvideos(item): patron = r'<div class="item"><a href="'+host+'/serietv/([^"\/]+)\/"><i class="icon-bars">' series = scrapertoolsV2.find_single_match(data, patron) titles = support.typo(series.upper().replace('-', ' '), 'bold color kod') - goseries = support.typo("Vai alla Serie:", ' bold color kod') + goseries = support.typo("Vai alla Serie:", ' bold') itemlist.append( Item(channel=item.channel, title=goseries + titles, @@ -237,6 +238,6 @@ def findvideos(item): url=host+"/serietv/"+series, action='episodios', contentTitle=titles, - plot = "Vai alla Serie " + titles + " con tutte le puntate", + plot = "Vai alla Serie :" + titles + " con tutte le puntate", )) return itemlist From 346467187432e62ac40eb23de79271497d99d2c6 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Sat, 2 Nov 2019 11:32:23 +0100 Subject: [PATCH 04/53] fix: guardaserieclick.py fixata ricerca --- channels/guardaserieclick.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/channels/guardaserieclick.py b/channels/guardaserieclick.py index a9cdbe1c..1e129c45 100644 --- a/channels/guardaserieclick.py +++ b/channels/guardaserieclick.py @@ -47,7 +47,7 @@ def mainlist(item): ## ## action = 'episodios' ## block = r'(?P<block>.*?)<div\s+class="btn btn-lg btn-default btn-load-other-series">' -## +## ## if item.args == 'ined': ## deflang = 'SUB-ITA' ## patronBlock = r'<span\s+class="label label-default label-title-typology">'+block @@ -68,7 +68,7 @@ def mainlist(item): ## elif item.args == 'classic': ## patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-classiche">'+block ## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<' -## pagination = 25 +## pagination = 25 ## else: ## patronBlock = r'<div\s+class="container container-title-serie-new container-scheda" meta-slug="new">'+block ## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<' @@ -84,13 +84,13 @@ def peliculas(item): action = 'episodios' blacklist = ['DMCA'] - + if item.args == 'genres' or item.args == 'search': - patronBlock = r'<h2 style="color: white !important" class="title-typology">(?P<block>.+?)<div class="container-fluid whitebg" style="">' + patronBlock = r'<h2 style="color:\s?white !important;?" class="title-typology">(?P<block>.+?)<div class="container-fluid whitebg" style="">' patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</p>' patronNext = r'rel="next" href="([^"]+)">' item.contentType = 'tvshow' -## elif item.args == 'search': +## elif item.args == 'search': ## patronBlock = r'<h2 style="color:\s?white !important.?" class="title-typology">(?P<block>.*?)<div class="container-fluid whitebg" style="">' ## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</p>' else: @@ -106,21 +106,23 @@ def peliculas(item): patronBlock = r'<div\s+class="container-fluid greybg title-serie-lastep title-last-ep fixed-title-wrapper containerBottomBarTitle">'+end_block patron = r'<a(?: rel="[^"]+")? href="(?P<url>[^"]+)"(?: class="[^"]+")?>[ ]<img class="[^"]+"[ ]title="[^"]+"[ ]alt="[^"]+"[ ](?:|meta-)?src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?:\d+.\d+)[ ]\((?P<lang>[a-zA-Z\-]+)[^<]+<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<' elif item.args == 'nolost': - patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-danonperd">'+end_block + patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-danonperd">'+end_block ## pagination = 25 elif item.args == 'classic': patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-classiche">'+end_block ## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<' ## pagination = 25 ## elif item.args == 'anime': -## +## else: patronBlock = r'<div\s+class="container container-title-serie-new container-scheda" meta-slug="new">'+end_block ## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<' ## pagination = 25 - #support.regexDbg(item, patron, headers) + #support.regexDbg(item, patronBlock, headers) #debug = True return locals() + + @support.scrape def episodios(item): log() @@ -132,7 +134,7 @@ def episodios(item): def itemHook(item): item.title = item.title.replace(item.fulltitle, '').replace('-','',1) return item - + #debug = True return locals() @@ -174,9 +176,6 @@ def newest(categoria): item.action = "peliculas" itemlist = peliculas(item) -## if itemlist[-1].action == "peliculas": -## itemlist.pop() - # Continua la ricerca in caso di errore except: import sys From 1c1004e0ee0b1a06da6d7b81c6f5f823cb27a4eb Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Sat, 2 Nov 2019 15:36:16 +0100 Subject: [PATCH 05/53] fix: italiaserie.py canale terminato, da testare. --- channels/italiaserie.py | 85 ++++++++++++++++++++++++++++++----------- 1 file changed, 63 insertions(+), 22 deletions(-) diff --git a/channels/italiaserie.py b/channels/italiaserie.py index 3a041fea..4a072910 100644 --- a/channels/italiaserie.py +++ b/channels/italiaserie.py @@ -4,15 +4,24 @@ # ------------------------------------------------------------ """ -""" -import re + Problemi noti che non superano il test del canale: -from core import httptools, scrapertools, support + + Avvisi: + + + Ulteriori info: + +""" + +import re +from core import support, httptools, scrapertoolsV2 from core.item import Item from platformcode import config __channel__ = 'italiaserie' host = config.get_channel_url(__channel__) +headers = [['Referer', host]] list_servers = ['speedvideo'] list_quality = [] @@ -23,7 +32,7 @@ def mainlist(item): support.log() tvshow = ['/category/serie-tv/', - ('Aggiornamenti', ['/ultimi-episodi/', 'peliculas', 'latest']), + ('Aggiornamenti', ['/ultimi-episodi/', 'peliculas', 'update']), ('Generi', ['', 'category', 'Serie-Tv per Genere']) ] @@ -38,14 +47,31 @@ def peliculas(item): patron = r'<div class="post-thumb">\s*<a href="(?P<url>[^"]+)" '\ 'title="(?P<title>[^"]+)">\s*<img src="(?P<thumb>[^"]+)"[^>]+>' - if item.args == "latest": + if item.args == 'update': patron += r'.*?aj-eps">(?P<episode>.+?)[ ]?(?P<lang>Sub-Ita|Ita)</span>' + action = 'findvideos' patronNext = r'<a class="next page-numbers" href="(.*?)">' ## debug = True return locals() +@support.scrape +def episodios(item): + support.log() + + patronBlock = r'</i> Stagione (?P<block>(?P<season>\d+)</div> '\ + '<div class="su-spoiler-content".*?)<div class="clearfix">' + patron = r'(?:(?P<season>\d+)?</div> <div class="su-spoiler-content"(:?.+?)?> )?'\ + '<div class="su-link-ep">\s+<a.*?href="(?P<url>[^"]+)".*?strong>[ ]'\ + '(?P<title>.+?)[ ](?P<episode>\d+-\d+|\d+)[ ](?:-\s+(?P<title2>.+?))?'\ + '[ ]?(?:(?P<lang>Sub-ITA))?[ ]?</strong>' + + + #debug = True + return locals() + + @support.scrape def category(item): support.log() @@ -56,24 +82,10 @@ def category(item): return locals() -@support.scrape -def episodios(item): - support.log() - pagination = 24 - - patronBlock = r'</i> Stagione (?P<block>(?P<season>\d+)</div> '\ - '<div class="su-spoiler-content".*?)<div class="clearfix">' - patron = r'(?:(?P<season>\d+)?</div> <div class="su-spoiler-content"(:?.+?)?> )?'\ - '<div class="su-link-ep">\s+<a.*?href="(?P<url>[^"]+)".*?strong>[ ]'\ - '(?P<title>.+?)[ ](?P<episode>\d+-\d+|\d+)[ ](?:-\s+(?P<title2>.+?))?'\ - '[ ]?(?:(?P<lang>Sub-ITA))?[ ]?</strong>' - - return locals() - - def search(item, texto): support.log("s=", texto) item.url = host + "/?s=" + texto + item.contentType = 'tvshow' try: return peliculas(item) # Continua la ricerca in caso di errore @@ -92,7 +104,7 @@ def newest(categoria): if categoria == "series": item.url = host + "/ultimi-episodi/" item.action = "peliculas" - item.args = "latest" + item.args = "update" item.contentType = "episode" itemlist = peliculas(item) @@ -111,4 +123,33 @@ def newest(categoria): def findvideos(item): support.log() - return support.server(item, data=item.url) + + if item.args == 'update': + itemlist = [] + item.infoLabels['mediatype'] = 'episode' + + data = httptools.downloadpage(item.url, headers=headers).data + data = re.sub('\n|\t', ' ', data) + data = re.sub(r'>\s+<', '> <', data) + url_video = scrapertoolsV2.find_single_match(data, r'<a rel="[^"]+" target="[^"]+" act="[^"]+"\s+href="([^"]+)" class="[^"]+-link".+?\d+.+?</strong> </a>', -1) + url_serie = scrapertoolsV2.find_single_match(data, r'<link rel="canonical" href="([^"]+)" />') + goseries = support.typo("Vai alla Serie:", ' bold') + series = support.typo(item.contentSerieName, ' bold color kod') + itemlist = support.server(item, data=url_video) + + itemlist.append( + Item(channel=item.channel, + title=goseries + series, + fulltitle=item.fulltitle, + show=item.show, + contentType='tvshow', + contentSerieName=item.contentSerieName, + url=url_serie, + action='episodios', + contentTitle=item.contentSerieName, + plot = goseries + series + "con tutte le puntate", + )) + + return itemlist + else: + return support.server(item, data=item.url) From 70ee68dc1235c24531aa9fe01f40c510917fc8d7 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Sat, 2 Nov 2019 15:46:55 +0100 Subject: [PATCH 06/53] fix: channels/italiaserie.json channels/.cinemalibero.py da completare --- channels/.cinemalibero.py | 267 ++++++++++++++++++++++++++++++++++++++ channels/italiaserie.json | 3 +- 2 files changed, 269 insertions(+), 1 deletion(-) create mode 100644 channels/.cinemalibero.py diff --git a/channels/.cinemalibero.py b/channels/.cinemalibero.py new file mode 100644 index 00000000..7dea9140 --- /dev/null +++ b/channels/.cinemalibero.py @@ -0,0 +1,267 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Canale per 'cinemalibero' + +""" + Questi sono commenti per i beta-tester. + + Su questo canale, nelle categorie: + -'Ricerca Globale' + - Novità, voce interna al canale + - Nella lista anime + non saranno presenti le voci: + - 'Aggiungi alla Videoteca' + - 'Scarica Film'/'Scarica Serie', + Inoltre nella lista Anime non è presente la voce rinumerazione! + dunque, la loro assenza, nel Test, NON dovrà essere segnalata come ERRORE. + + + Novità ( globale ), presenti solo i film: + - film ( 20 titoli ) della pagina https://www.cinemalibero.best/category/film/ + + Avvisi: + - Eventuali avvisi per i tester + + Ulteriori info: + +""" + +import re + +# per l'uso dei decoratori, per i log, e funzioni per siti particolari +from core import support +# se non si fa uso di findhost() +from platformcode import config + +# in caso di necessità +from core import scrapertoolsV2, httptools#, servertools +from core.item import Item # per newest +#from lib import unshortenit + +# se necessaria la variabile __channel__ +# da cancellare se non utilizzata +__channel__ = "cinemalibero" +# da cancellare se si utilizza findhost() +host = config.get_channel_url('cinemalibero') +headers = [['Referer', host]] + +list_servers = ['akstream', 'wstream', 'openload', 'streamango'] +list_quality = ['default'] + +### fine variabili + +#### Inizio delle def principali ### + +@support.menu +def mainlist(item): + support.log(item) + + film = ['/category/film/', + ('Generi', ['', 'genres', 'genres']), + ] + + # Voce SERIE, puoi solo impostare l'url + tvshow = ['/category/serie-tv/', + ('Novità', ['/aggiornamenti-serie-tv/', 'peliculas', 'update']) + ] + # Voce ANIME, puoi solo impostare l'url + Anime = [('Anime', ['/category/anime-giapponesi/', 'peliculas', 'anime', 'tvshow']), # url per la voce Anime, se possibile la pagina con titoli di anime +## #Voce Menu,['url','action','args',contentType] +## ('Novità', ['', '', '']), +## ('In Corso',['', '', '', '']), +## ('Ultimi Episodi',['', '', '', '']), +## ('Ultime Serie',['', '', '', '']) + ] + + + search = '' + + return locals() + + +@support.scrape +def peliculas(item): + support.log(item) + #support.dbg() # decommentare per attivare web_pdb + + if item.args == 'search': + patron = r'href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">.+?class="titolo">(?P<title>[^<]+)<' + patronBlock = r'style="color: #2C3549 !important;" class="fon my-3"><small>.+?</small></h1>(?P<block>.*?)<div class="bg-dark ">' + action = 'select' + else: + if item.contentType == 'tvshow': + if item.args == 'update': + patron = r'<div class="card-body p-0">\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">\s<div class="titolo">(?P<title>.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>[ ]<div class="genere">(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)' + action = 'select' + + def itemHook(item): + if item.lang2: + if len(item.lang2) <3: + item.lang2 = 'ITA' + item.contentLanguage = item.lang2 + item.title += support.typo(item.lang2, '_ [] color kod') + return item + + elif item.args == 'anime':# or 'anime' in item.url: + patron = r'<div class="card-body p-0"> <a href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">[^>]+>[^>]+>[^>]+>(?:[ ](?P<rating>\d+.\d+))?[^>]+>[^>]+>(?P<title>.+?)(?:\([sSuUbBiItTaA\-]+\))?\s?(?:(?P<year>\d{4}|\(\d{4}\)|)?)?<[^>]+>(?:<div class="genere">.+?(?:\()?(?P<lang>ITA|iTA|Sub)(?:\))?)?' + action = 'select' + else: + patron = r'<div class="card-body p-0">\s?<a href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</div>(?:<div class="genere">(?:[ |\w]+?(?:[\dx\-]+)?[ ](?:\()?(?P<lang>[sSuUbB]+|[iItTaA]+)(?:\))?\s?(?P<quality>[\w]+)?\s?|[\s|S]?[\dx\-]+\s[|]?\s?(?:[\w]+)?\s?\(?(\4[sSuUbB]+)?\)?)?.+?</div>)?' + action = 'episodios' + + elif item.contentType == 'movie': + action = 'findvideos' + patron = r'href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">[^>]+>[^>]+>[^>]+>(?:[ ](?P<rating>\d+.\d+))?[^>]+>[^>]+>(?P<title>.+?)(?:\[(?P<lang>Sub-iTA|Sub-ITA|Sub)\])?[ ]\((?P<year>\d+)\)</div>(?:<div class="genere">(?P<quality>[^<]+)<)?' + + patronBlock = r'<h1(?: style="color: #2C3549 !important; text-transform: uppercase;"| style="text-transform: uppercase; color: #2C3549 !important;"| style="color: #2C3549 !important; text-transform: uppercase;" style="text-shadow: 1px 1px 1px #FF8C00; color:#FF8C00;"| style="text-shadow: 1px 1px 1px #0f0f0f;" class="darkorange"| style="color:#2C3549 !important;")>.+?</h1>(?P<block>.*?)<div class=(?:"container"|"bg-dark ")>' + + patronNext = '<a class="next page-numbers".*?href="([^"]+)">' + +## debug = True # True per testare le regex sul sito + return locals() + +@support.scrape +def episodios(item): + support.log(item) + #support.dbg() + + data = item.data1 + if item.args == 'anime': + item.contentType = 'tvshow' + blacklist = ['Clipwatching', 'Verystream', 'Easybytez'] + patron = r'(?:href="[ ]?(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)<|(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?(?:(\4[^<]+)(\2.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br />|</a></p>))' + #patron = r'<a target=.+?href="(?P<url>[^"]+)"[^>]+>(?P<title>(Epis|).+?(?P<episode>\d+)?)(?:\((?P<lang>Sub ITA)\))?</a>(?:<br />)?' + patronBlock = r'(?:class="txt_dow">Streaming:(?P<block>.*?)at-below-post)' + else: + patron = r'(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?[ ]?(?:(?P<title>[^<]+)(?P<url>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br />|</a></p>)' +## patron = r'<a target=.+?href="(?P<url>[^"]+)"[^>]+>(?P<title>Epis.+?(\d+)?)(?:\((?P<lang>Sub ITA)\))?</a><br />' + patronBlock = r'<p><strong>(?P<block>(?:.+?[Ss]tagione.+?(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?(?:|.+?|</strong>)(/?:</span>)?</p>.*?</p>)' + item.contentType = 'tvshow' + + action = 'findvideos' + + debug = True + return locals() + + +@support.scrape +def genres(item): + support.log(item) + #support.dbg() + + action = 'peliculas' + #blacklist = [''] + patron = r'<a class="dropdown-item" href="(?P<url>[^"]+)" title="(?P<title>[A-z]+)"' + + return locals() + +############## Fine ordine obbligato +## Def ulteriori + +def select(item): + support.log('select --->', item) + #support.dbg() + data = httptools.downloadpage(item.url, headers=headers).data + block = scrapertoolsV2.find_single_match(data, r'<div class="col-md-8 bg-white rounded-left p-5"><div>(.*?)<div style="margin-left: 0.5%; color: #FFF;">') + if re.findall('rel="category tag">serie', data, re.IGNORECASE): + support.log('select = ### è una serie ###') + return episodios(Item(channel=item.channel, + title=item.title, + fulltitle=item.fulltitle, + url=item.url, + args='serie', + contentType='tvshow', + data1 = data + )) + elif re.findall('rel="category tag">anime', data, re.IGNORECASE): + if re.findall('episodio', block, re.IGNORECASE) or re.findall('stagione', data, re.IGNORECASE) or re.findall('numero stagioni', data, re.IGNORECASE): + support.log('select = ### è un anime ###') + return episodios(Item(channel=item.channel, + title=item.title, + fulltitle=item.fulltitle, + url=item.url, + args='anime', + contentType='tvshow', + data1 = data + )) + else: + support.log('select = ### è un film ###') + return findvideos(Item(channel=item.channel, + title=item.title, + fulltitle=item.fulltitle, + url=item.url, + args = '', + contentType='movie', + #data = data + )) + else: + support.log('select = ### è un film ###') + return findvideos(Item(channel=item.channel, + title=item.title, + fulltitle=item.fulltitle, + url=item.url, + contentType='movie', + #data = data + )) + +############## Fondo Pagina +# da adattare al canale +def search(item, text): + support.log('search', item) + itemlist = [] + text = text.replace(' ', '+') + item.url = host + "/?s=" + text + item.contentType = item.contentType + try: + item.args = 'search' + item.contentType = 'episode' # non fa uscire le voci nel context menu + return peliculas(item) + # Se captura la excepcion, para no interrumpir al buscador global si un canal falla + except: + import sys + for line in sys.exc_info(): + support.log('search log:', line) + return [] + + +# da adattare al canale +# inserire newest solo se il sito ha la pagina con le ultime novità/aggiunte +# altrimenti NON inserirlo +def newest(categoria): + support.log('newest ->', categoria) + itemlist = [] + item = Item() + try: + if categoria == 'peliculas': + item.url = host+'/category/film/' + item.contentType = 'movie' +## item.action = 'peliculas' +## itemlist = peliculas(item) + elif categoria == 'series': + item.contentType = 'tvshow' + item.args = 'update' + item.url = host+'/aggiornamenti-serie-tv/' + item.action = 'peliculas' + itemlist = peliculas(item) + + if itemlist[-1].action == 'peliculas': + itemlist.pop() + # Continua la ricerca in caso di errore + except: + import sys + for line in sys.exc_info(): + support.log('newest log: ', {0}.format(line)) + return [] + + return itemlist + + +#support.server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True) +def findvideos(item): + support.log('findvideos ->', item) + #return support.server(item, headers=headers) + support.log(item) + if item.contentType == 'movie': + return support.server(item) + else: + return support.server(item, data= item.url) diff --git a/channels/italiaserie.json b/channels/italiaserie.json index 5d487c0a..d9ce76df 100644 --- a/channels/italiaserie.json +++ b/channels/italiaserie.json @@ -6,6 +6,7 @@ "language": ["ita","sub-ita"], "thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/italiaserie.png", "bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/italiaserie.png", - "categories": ["tvshow"], + "categories": ["tvshow", "vos"], + "not_active": ["include_in_newest_peliculas", "include_in_newest_anime", ], "settings": [] } From 93d476198d999654aeffdcca130f14ed360278d7 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Sat, 2 Nov 2019 16:00:44 +0100 Subject: [PATCH 07/53] fix: support.py fix stagione --- core/support.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/support.py b/core/support.py index fd6c406c..2ab2189a 100644 --- a/core/support.py +++ b/core/support.py @@ -218,6 +218,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t scraped[kk] = val if scraped['season']: + stagione = scraped['season'] episode = scraped['season'] +'x'+ scraped['episode'] elif stagione: episode = stagione +'x'+ scraped['episode'] @@ -236,7 +237,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t # make formatted Title [longtitle] s = ' - ' - title = episode + (s if episode and title else '') + title + title = episode + (s if episode and title else '') + title longtitle = title + (s if title and title2 else '') + title2 longtitle = typo(longtitle, 'bold') longtitle += typo(quality, '_ [] color kod') if quality else '' @@ -400,7 +401,7 @@ def scrape(func): if 'itemlistHook' in args: itemlist = args['itemlistHook'](itemlist) - + if (pagination and len(matches) <= pag * pagination) or not pagination: # next page with pagination if patronNext and inspect.stack()[1][3] != 'newest': nextPage(itemlist, item, data, patronNext, function) From 9426ebdf6f0ef044b3788a259b604a2e76279ac4 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Sat, 2 Nov 2019 17:04:36 +0100 Subject: [PATCH 08/53] fix: italiaserie.json --- channels/italiaserie.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/italiaserie.json b/channels/italiaserie.json index d9ce76df..fe68c5c1 100644 --- a/channels/italiaserie.json +++ b/channels/italiaserie.json @@ -7,6 +7,6 @@ "thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/italiaserie.png", "bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/italiaserie.png", "categories": ["tvshow", "vos"], - "not_active": ["include_in_newest_peliculas", "include_in_newest_anime", ], + "not_active": ["include_in_newest_peliculas", "include_in_newest_anime"], "settings": [] } From 934dd3256861aa4fec3ced1b99121e3d157f8388 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Sat, 2 Nov 2019 23:13:18 +0100 Subject: [PATCH 09/53] fix: serietvonline.py canale finito, da testare. --- channels/serietvonline.json | 30 +---- channels/serietvonline.py | 251 ++++++++++++++++++++++-------------- 2 files changed, 156 insertions(+), 125 deletions(-) diff --git a/channels/serietvonline.json b/channels/serietvonline.json index e974d7aa..833b8edc 100644 --- a/channels/serietvonline.json +++ b/channels/serietvonline.json @@ -6,31 +6,7 @@ "language": ["ita"], "thumbnail": "https:\/\/serietvonline.com\/wp-content\/uploads\/2016\/08\/logo2016-1.png", "bannermenu": "https:\/\/serietvonline.com\/wp-content\/uploads\/2016\/08\/logo2016-1.png", - "categories": ["anime","tvshow","movie", "documentary"], - "settings": [ - { - "id": "include_in_newest_series", - "type": "bool", - "label": "Includi in Novità - Serie TV", - "default": false, - "enabled": false, - "visible": false - }, - { - "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": false, - "enabled": false, - "visible": false - } - ] + "categories": ["anime","tvshow","movie","documentary"], + "not_active": ["include_in_newest_anime"], + "settings": [] } diff --git a/channels/serietvonline.py b/channels/serietvonline.py index cb2548b6..02125027 100644 --- a/channels/serietvonline.py +++ b/channels/serietvonline.py @@ -4,26 +4,31 @@ # ---------------------------------------------------------- """ - Problemi noti che non superano il test del canale: - - il solo film .45, nella lista titoli, ha come titolo nel canale '.' - - la ricerca dei titoli potrebbe non essere uguale ( da sistemare le regex ) - indicate i titoli, con cui avete avuto problemi, e se sono film o serie. + Novità. Indicare in quale/i sezione/i è presente il canale: + - film, serie Avvisi: - - Nelle pagine di liste avrete un elenco di 24 titoli per pagina, - invece della singola del sito - - Il Canale è incluso nella sola ricerca globale. + - Al massimo 25 titoli per le sezioni: Film + - Al massimo 35 titoli per le sezioni: Tutte le altre - Le pagine di liste sono lente a caricarsi in quanto scaricano anche le info... """ - -from core import support -from platformcode import logger, config +import re +from core import support, httptools, scrapertoolsV2 +from platformcode import config +from core.item import Item __channel__ = "serietvonline" -host = config.get_channel_url(__channel__) -headers = [['Referer', host]] + +host = "" +headers = "" + +def findhost(): + global host, headers + 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'] @@ -33,12 +38,16 @@ list_quality = ['default'] def mainlist(item): support.log() - film = ['/lista-film/', - ('Ultimi Aggiunti', ['/ultimi-film-aggiunti/', 'peliculas', 'latest']) + film = ['/ultimi-film-aggiunti/', + ('Lista', ['/lista-film/', 'peliculas', 'lista']) ] tvshow = ['', - ('HD', ['/lista-serie-tv-in-altadefinizione/', 'peliculas', 'hd']) + ('Aggiornamenti', ['/ultimi-episodi-aggiunti/', 'peliculas', 'update']), + ('Tutte', ['/lista-serie-tv/', 'peliculas', 'qualcosa']), + ('Italiane', ['/lista-serie-tv-italiane/', 'peliculas', 'qualcosa']), + ('Anni 50-60-70-80-90', ['/lista-serie-tv-anni-60-70-80/', 'peliculas', 'qualcosa']), + ('HD', ['/lista-serie-tv-in-altadefinizione/', 'peliculas', 'qualcosa']) ] anime = ['/lista-cartoni-animati-e-anime/'] @@ -54,106 +63,152 @@ def peliculas(item): support.log() blacklist = ['DMCA', 'Contatti', 'Attenzione NON FARTI OSCURARE', 'Lista Ccartoni Animati e Anime'] - - if item.action == 'search': - - patronBlock = r'>Lista Serie Tv</a></li></ul></div><div id="box_movies">'\ - '(?P<block>.*?)<div id="paginador">' - patron = r'<div class="movie"><div class="imagen"> <img src="(?P<thumb>[^"]+)" '\ - 'alt="(?:(?P<title>.+?)[ ]?(?:\d+)?)?" /> <a href="(?P<url>[^"]+)">'\ - '.+?<h2>(?:.+?(?P<year>\d+)?)</h2>(?: <span class="year">'\ - '(\d+)(?:–|–|-\d+)?</span>)?</div>' - - def itemHook(item): - support.log("ITEMHOOK PRIMA: ", item) - if 'film' in item.url: - item.action = 'findvideos' - item.contentType = 'movie' - item.infoLabels['mediatype'] = 'movie' - else: - item.action = 'episodios' - item.contentType = 'tvshow' - item.infoLabels['mediatype'] = 'tvshow' - support.log("ITEMHOOK DOPO: ", item) - - return item - - elif item.extra == 'tvshow' or item.contentType == 'tvshow': - # SEZIONE Serie TV- Anime! - action = 'episodios' - - if 'anime' in item.url: - patronBlock = r'<h1>Lista Cartoni Animati e Anime</h1>(?P<block>.*?)<div class="footer_c">' - patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)">.+?</a>' - - else: - if item.args == 'hd': - patronBlock = r'<h1>Lista Serie Tv in AltaDefinizione</h1>(?P<block>.*?)'\ - '<div class="footer_c">' - patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)">.+?</a>' - - elif item.args == 'doc': - patronBlock = r'<h1>Lista Documentari</h1>(?P<block>.*?)<div class="footer_c">' - patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)">.+?</a>' - - else: - patronBlock = r'<div id="box_movies">(?P<block>.*?)<div id="paginador">' - 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: - # SEZIONE FILM - action = 'findvideos' - pagination = 24 - - if not item.args: - patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)[ ]?(?P<year>\d+)?'\ - '(?: Streaming | MD iSTANCE )?<' - patronBlock = r'Lista dei film disponibili in streaming e anche in download\.'\ - '</p>(?P<block>.*?)<div class="footer_c">' - - elif item.args == 'latest': - patronBlock = r'<h1>Ultimi film aggiunti</h1>(?P<block>.*?)<div class="footer_c">' - patron = r'<tr><td><a href="(?P<url>[^"]+)"(?:|.+?)?>(?:  )?[ ]?'\ - '(?P<title>.*?)[ ]?(?:HD)?[ ]?(?P<year>\d+)?'\ - '(?: | HD | Streaming | MD(?: iSTANCE)? )?</a>' - + patronBlock = r'<h1>.+?</h1>(?P<block>.*?)<div class="footer_c">' patronNext = r'<div class="siguiente"><a href="([^"]+)" >' -## debug = True +## if 'film' in item.url: +## contentType = 'movie' +## action = 'findvideos' +## else: +## contentType = 'tvshow' +## action = 'episodios' + + if item.args == 'search': + patronBlock = r'>Lista Serie Tv</a></li></ul></div><div id="box_movies">(?P<block>.*?)<div id="paginador">' + patron = r'<div class="movie">[^>]+[^>]+>\s?<img src="(?P<thumb>[^"]+)" alt="(?P<title>.+?)\s?(?P<year>[\d\-]+)?"[^>]+>\s?<a href="(?P<url>[^"]+)">' + +## def itemHook(item): +## if 'film' in item.url: +## item.action = 'findvideos' +## item.contentType = 'movie' +## else: +## item.contentType = 'tvshow' +## item.action = 'episodios' +## return item + + elif item.contentType == 'tvshow': + # SEZIONE Serie TV- Anime - Documentari + pagination = 35 + + if not item.args and 'anime' not in item.url: + 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 + pagination = 25 + + if item.args == 'lista': + patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)[ ]?(?P<year>\d+)?(?: Streaming | MD iSTANCE )?<' + patronBlock = r'Lista dei film disponibili in streaming e anche in download\.</p>(?P<block>.*?)<div class="footer_c">' + + else: + #patronBlock = r'<h1>Ultimi film aggiunti</h1>(?P<block>.*?)<div class="footer_c">' + patron = r'<tr><td><a href="(?P<url>[^"]+)"(?:|.+?)?>(?:  )?[ ]?(?P<title>.*?)[ ]?(?:HD)?[ ]?(?P<year>\d+)?(?: | HD | Streaming | MD(?: iSTANCE)? )?</a>' + + def itemHook(item): + if 'film' in item.url: + item.action = 'findvideos' + item.contentType = 'movie' + elif item.args == 'update': + pass + else: + item.contentType = 'tvshow' + item.action = 'episodios' + return item + + #support.regexDbg(item, patronBlock, headers) + #debug = True return locals() + @support.scrape def episodios(item): support.log() action = 'findvideos' patronBlock = r'<table>(?P<block>.*?)<\/table>' + patron = r'<tr><td>(?:[^<]+)[ ](?:Parte)?(?P<episode>\d+x\d+)(?:|[ ]?(?P<title2>.+?)?(?:avi)?)<(?P<url>.*?)</td><tr>' - patron = r'<tr><td>(?:[^<]+)[ ](?:Parte)?(?P<episode>\d+x\d+|\d+)(?:|[ ]?'\ - '(?P<title2>.+?)?)<(?P<url>.*?)</td><tr>' - -## debug = True + #debug = True return locals() + +def search(item, text): + support.log("CERCA :" ,text, item) + item.url = "%s/?s=%s" % (host, text) + + try: + item.args = 'search' + return peliculas(item) + # Continua la ricerca in caso di errore + except: + import sys + for line in sys.exc_info(): + support.log("%s" % line) + return [] + +def newest(categoria): + support.log(categoria) + itemlist = [] + item = Item() + + if categoria == 'peliculas': + item.contentType = 'movie' + item.url = host + '/ultimi-film-aggiunti/' + elif categoria == 'series': + item.args = 'update' + item.contentType = 'tvshow' + item.url = host +'/ultimi-episodi-aggiunti/' + try: + item.action = 'peliculas' + itemlist = peliculas(item) + + except: + import sys + for line in sys.exc_info(): + support.log("{0}".format(line)) + return [] + + return itemlist + def findvideos(item): support.log() if item.contentType == 'movie': return support.server(item, headers=headers) else: - return support.server(item, item.url) + if item.args != 'update': + return support.server(item, item.url) + else: + itemlist = [] + item.infoLabels['mediatype'] = 'episode' -def search(item, texto): - support.log("CERCA :" ,texto, item) - item.url = "%s/?s=%s" % (host, texto) + data = httptools.downloadpage(item.url, headers=headers).data + data = re.sub('\n|\t', ' ', data) + data = re.sub(r'>\s+<', '> <', data) + support.log("DATA - HTML:\n", data) + url_video = scrapertoolsV2.find_single_match(data, r'<tr><td>(.+?)</td><tr>', -1) + url_serie = scrapertoolsV2.find_single_match(data, r'<link rel="canonical" href="([^"]+)"\s?/>') + goseries = support.typo("Vai alla Serie:", ' bold') + series = support.typo(item.contentSerieName, ' bold color kod') + itemlist = support.server(item, data=url_video) - try: - return peliculas(item) - # Continua la ricerca in caso di errore - except: - import sys - for line in sys.exc_info(): - logger.error("%s" % line) - return [] + itemlist.append( + Item(channel=item.channel, + title=goseries + series, + fulltitle=item.fulltitle, + show=item.show, + contentType='tvshow', + contentSerieName=item.contentSerieName, + url=url_serie, + action='episodios', + contentTitle=item.contentSerieName, + plot = goseries + series + "con tutte le puntate", + )) + + return itemlist From 3cd606ff24981f38d49d51a23510d80b66bcad46 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Sun, 3 Nov 2019 10:43:31 +0100 Subject: [PATCH 10/53] =?UTF-8?q?fix:=20serietvu.py=20canale=20terminato,?= =?UTF-8?q?=20da=20testare=20fix:=20toonitalia,=20uscivano=20risultati=20i?= =?UTF-8?q?n=20novit=C3=A0=20->=20serie=20fix:=20news,=20commentati=20log,?= =?UTF-8?q?=20traduzione=20voci=20fix:=20serietvonline,=20pulizia=20codice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- channels/serietvonline.py | 4 +- channels/serietvu.json | 66 +------- channels/serietvu.py | 336 ++++++++++---------------------------- channels/toonitalia.json | 8 +- channels/toonitalia.py | 9 +- specials/news.py | 6 +- 6 files changed, 103 insertions(+), 326 deletions(-) diff --git a/channels/serietvonline.py b/channels/serietvonline.py index 02125027..8c090a34 100644 --- a/channels/serietvonline.py +++ b/channels/serietvonline.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------ -# Canale per serietvonline +# Canale per serietvonline.py # ---------------------------------------------------------- """ @@ -191,7 +191,7 @@ def findvideos(item): data = httptools.downloadpage(item.url, headers=headers).data data = re.sub('\n|\t', ' ', data) data = re.sub(r'>\s+<', '> <', data) - support.log("DATA - HTML:\n", data) + #support.log("DATA - HTML:\n", data) url_video = scrapertoolsV2.find_single_match(data, r'<tr><td>(.+?)</td><tr>', -1) url_serie = scrapertoolsV2.find_single_match(data, r'<link rel="canonical" href="([^"]+)"\s?/>') goseries = support.typo("Vai alla Serie:", ' bold') diff --git a/channels/serietvu.json b/channels/serietvu.json index abb5dbd5..929dcc5b 100644 --- a/channels/serietvu.json +++ b/channels/serietvu.json @@ -3,68 +3,10 @@ "name": "SerieTVU", "active": true, "adult": false, - "language": ["ita"], + "language": ["ita", "sub-ita"], "thumbnail": "serietvu.png", "banner": "serietvu.png", - "categories": ["tvshow"], - "settings": [ - { - "id": "channel_host", - "type": "text", - "label": "Host del canale", - "default": "https://www.serietvu.club", - "enabled": true, - "visible": true - }, - { - "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_italiano", - "type": "bool", - "label": "Includi in Novità - Italiano", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "checklinks", - "type": "bool", - "label": "Verifica se i link esistono", - "default": false, - "enabled": true, - "visible": true - }, - { - "id": "checklinks_number", - "type": "list", - "label": "Numero de link da verificare", - "default": 1, - "enabled": true, - "visible": "eq(-1,true)", - "lvalues": [ "1", "3", "5", "10" ] - }, - { - "id": "filter_languages", - "type": "list", - "label": "Mostra link in lingua...", - "default": 0, - "enabled": true, - "visible": true, - "lvalues": ["Non filtrare","IT"] - } - ] + "categories": ["tvshow", "vos"], + "not_active": ["include_in_newest_peliculas", "include_in_newest_anime"], + "settings": [] } diff --git a/channels/serietvu.py b/channels/serietvu.py index 5c8c7b34..4dc8ee17 100644 --- a/channels/serietvu.py +++ b/channels/serietvu.py @@ -1,28 +1,22 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------ -# Canale per SerieTVU -# Thanks to Icarus crew & Alfa addon & 4l3x87 +# Canale per serietvu.py # ---------------------------------------------------------- """ - Trasformate le sole def per support.menu e support.scrape - da non inviare nel test. - Test solo a trasformazione completa - + La pagina novità contiene al max 25 titoli """ import re -from core import tmdb, scrapertools, support +from core import support, httptools, scrapertoolsV2 from core.item import Item from core.support import log -from platformcode import config, logger +from platformcode import config __channel__ = 'serietvu' host = config.get_channel_url(__channel__) headers = [['Referer', host]] -IDIOMAS = {'Italiano': 'IT'} -list_language = IDIOMAS.values() list_servers = ['speedvideo'] list_quality = ['default'] @@ -30,235 +24,74 @@ list_quality = ['default'] @support.menu def mainlist(item): log() + tvshow = ['/category/serie-tv', - ('Novità', ['/ultimi-episodi', 'latestep']), - ('Categorie', ['', 'categorie']) + ('Novità', ['/ultimi-episodi/', 'peliculas', 'update']), + ('Generi', ['', 'genres', 'genres']) ] return locals() -# ---------------------------------------------------------------------------------------------------------------- -def cleantitle(scrapedtitle): - log() - scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip()) - scrapedtitle = scrapedtitle.replace('[HD]', '').replace('’', '\'').replace('– Il Trono di Spade', '').replace( - 'Flash 2014', 'Flash').replace('"', "'") - year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)') - if year: - scrapedtitle = scrapedtitle.replace('(' + year + ')', '') - - return scrapedtitle.strip() - - -# ================================================================================================================ - -# ---------------------------------------------------------------------------------------------------------------- +@support.scrape def peliculas(item): log() - itemlist = [] - patron = r'<div class="item">\s*<a href="([^"]+)" data-original="([^"]+)" class="lazy inner">' - patron += r'[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<' - matches, data = support.match(item, patron, headers=headers) + patronBlock = r'<div class="wrap">\s+<h.>.*?</h.>(?P<block>.*?)<footer>' - for scrapedurl, scrapedimg, scrapedtitle in matches: - infoLabels = {} - year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)') - if year: - infoLabels['year'] = year - scrapedtitle = cleantitle(scrapedtitle) + + if item.args != 'update': + action = 'episodios' + patron = r'<div class="item">\s*<a href="(?P<url>[^"]+)" data-original="(?P<thumb>[^"]+)" class="lazy inner">[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<' + else: + action = 'findvideos' + patron = r'<div class="item">\s+?<a href="(?P<url>[^"]+)"\s+?data-original="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)<[^>]+>\((?P<episode>[\dx\-]+)\s+?(?P<lang>Sub-Ita|[iITtAa]+)\)<' + pagination = 25 - itemlist.append( - Item(channel=item.channel, - action="episodios", - title=scrapedtitle, - fulltitle=scrapedtitle, - url=scrapedurl, - thumbnail=scrapedimg, - show=scrapedtitle, - infoLabels=infoLabels, - contentType='episode', - folder=True)) + patronNext = r'<li><a href="([^"]+)"\s+?>Pagina successiva' - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) + #support.regexDbg(item, patron, headers) + #debug = True + return locals() - # Pagine - support.nextPage(itemlist, item, data, '<li><a href="([^"]+)">Pagina successiva') - - return itemlist - - -# ================================================================================================================ - - -# ---------------------------------------------------------------------------------------------------------------- +@support.scrape def episodios(item): log() - itemlist = [] - patron = r'<option value="(\d+)"[\sselected]*>.*?</option>' - matches, data = support.match(item, patron, headers=headers) - - for value in matches: - patron = r'<div class="list [active]*" data-id="%s">(.*?)</div>\s*</div>' % value - blocco = scrapertools.find_single_match(data, patron) - log(blocco) - patron = r'(<a data-id="\d+[^"]*" data-href="([^"]+)"(?:\sdata-original="([^"]+)")?\sclass="[^"]+">)[^>]+>[^>]+>([^<]+)<' - matches = scrapertools.find_multiple_matches(blocco, patron) - - for scrapedextra, scrapedurl, scrapedimg, scrapedtitle in matches: - contentlanguage = '' - if 'sub-ita' in scrapedtitle.lower(): - contentlanguage = 'Sub-ITA' - scrapedtitle = scrapedtitle.replace(contentlanguage, '') - - number = cleantitle(scrapedtitle.replace("Episodio", "")).strip() - - title = value + "x" + number.zfill(2) - title += " "+support.typo(contentlanguage, '_ [] color kod') if contentlanguage else '' - - infoLabels = {} - infoLabels['episode'] = number.zfill(2) - infoLabels['season'] = value - - itemlist.append( - Item(channel=item.channel, - action="findvideos", - title=title, - fulltitle=scrapedtitle, - contentType="episode", - url=scrapedurl, - thumbnail=scrapedimg, - extra=scrapedextra, - infoLabels=infoLabels, - folder=True)) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - support.videolibrary(itemlist, item, 'bold color kod') - - return itemlist + patronBlock = r'</select><div style="clear:both"></div></h2>(?P<block>.*?)<div id="trailer" class="tab">' + patron = r'(?:<div class="list (?:active)?" data-id="(?P<season>\d+)">[^>]+>)?\s+<a data-id="(?P<episode>\d+)(?:[ ](?P<lang>[SuUbBiItTaA\-]+))?"(?P<url>[^>]+)>[^>]+>[^>]+>(?P<title>.+?)(?:\sSub-ITA)?<' + + #support.regexDbg(item, patronBlock, headers) + #debug = True + return locals() -# ================================================================================================================ - -# ---------------------------------------------------------------------------------------------------------------- -def findvideos(item): - log() - return support.server(item, data=item.url) - - - -# ================================================================================================================ - - -# ---------------------------------------------------------------------------------------------------------------- -def findepisodevideo(item): +@support.scrape +def genres(item): log() - patron_block = r'<div class="list [active]*" data-id="%s">(.*?)</div>\s*</div>' % item.extra[0][0] - patron = r'<a data-id="%s[^"]*" data-href="([^"]+)"(?:\sdata-original="[^"]+")?\sclass="[^"]+">' % item.extra[0][1].lstrip("0") - matches = support.match(item, patron, patron_block, headers)[0] - data = '' - if len(matches) > 0: - data = matches[0] - item.contentType = 'movie' - return support.server(item, data=data) + blacklist = ["Home Page", "Calendario Aggiornamenti"] + action = 'peliculas' + patronBlock = r'<h2>Sfoglia</h2>\s*<ul>(?P<block>.*?)</ul>\s*</section>' + patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a></li>' + #debug = True + + return locals() -# ================================================================================================================ +def search(item, text): + log(text) + item.url = host + "/?s=" + text + try: + item.contentType = 'tvshow' + return peliculas(item) + # Continua la ricerca in caso di errore + except: + import sys + for line in sys.exc_info(): + log("%s" % line) + return [] - -# ---------------------------------------------------------------------------------------------------------------- -def latestep(item): - log() - itemlist = [] - titles = [] - - patron_block = r"Ultimi episodi aggiunti.*?<h2>" - patron = r'<a href="([^"]*)"\sdata-src="([^"]*)"\sclass="owl-lazy.*?".*?class="title">(.*?)<small>\((\d*?)x(\d*?)\s(Sub-Ita|Ita)' - matches = support.match(item, patron, patron_block, headers, host)[0] - - for scrapedurl, scrapedimg, scrapedtitle, scrapedseason, scrapedepisode, scrapedlanguage in matches: - infoLabels = {} - year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)') - if year: - infoLabels['year'] = year - infoLabels['episode'] = scrapedepisode - infoLabels['season'] = scrapedseason - episode = scrapedseason + "x" + scrapedepisode - - scrapedtitle = cleantitle(scrapedtitle) - title = scrapedtitle + " - " + episode - contentlanguage = "" - if scrapedlanguage.strip().lower() != 'ita': - title += " "+support.typo("Sub-ITA", '_ [] color kod') - contentlanguage = 'Sub-ITA' - - titles.append(title) - itemlist.append( - Item(channel=item.channel, - action="findepisodevideo", - title=title, - fulltitle=title, - url=scrapedurl, - extra=[[scrapedseason, scrapedepisode]], - thumbnail=scrapedimg, - contentSerieName=scrapedtitle, - contentLanguage=contentlanguage, - contentType='episode', - infoLabels=infoLabels, - folder=True)) - - patron = r'<div class="item">\s*<a href="([^"]+)" data-original="([^"]+)" class="lazy inner">' - patron += r'[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<small>([^<]+)<' - matches = support.match(item, patron, headers=headers)[0] - - for scrapedurl, scrapedimg, scrapedtitle, scrapedinfo in matches: - infoLabels = {} - year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)') - if year: - infoLabels['year'] = year - scrapedtitle = cleantitle(scrapedtitle) - - infoLabels['tvshowtitle'] = scrapedtitle - - episodio = re.compile(r'(\d+)x(\d+)', re.DOTALL).findall(scrapedinfo) - infoLabels['episode'] = episodio[0][1] - infoLabels['season'] = episodio[0][0] - - episode = infoLabels['season'] + "x" + infoLabels['episode'] - title = "%s - %s" % (scrapedtitle, episode) - title = title.strip() - contentlanguage = "" - if 'sub-ita' in scrapedinfo.lower(): - title += " "+support.typo("Sub-ITA", '_ [] color kod') - contentlanguage = 'Sub-ITA' - - if title in titles: continue - itemlist.append( - Item(channel=item.channel, - action="findepisodevideo", - title=title, - fulltitle=title, - url=scrapedurl, - extra=episodio, - thumbnail=scrapedimg, - contentSerieName=scrapedtitle, - contentLanguage=contentlanguage, - infoLabels=infoLabels, - contentType='episode', - folder=True)) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - return itemlist - - -# ================================================================================================================ - -# ---------------------------------------------------------------------------------------------------------------- def newest(categoria): log(categoria) itemlist = [] @@ -266,51 +99,52 @@ def newest(categoria): try: if categoria == "series": item.url = host + "/ultimi-episodi" - item.action = "latestep" - itemlist = latestep(item) - - if itemlist[-1].action == "latestep": - itemlist.pop() + item.action = "peliculas" + item.contentType = 'tvshow' + item.args = 'update' + itemlist = peliculas(item) # Continua la ricerca in caso di errore except: import sys for line in sys.exc_info(): - logger.error("{0}".format(line)) + log("{0}".format(line)) return [] return itemlist -# ================================================================================================================ - -# ---------------------------------------------------------------------------------------------------------------- -def search(item, texto): - log(texto) - 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(): - logger.error("%s" % line) - return [] - - -# ================================================================================================================ - -# ---------------------------------------------------------------------------------------------------------------- -@support.scrape -def categorie(item): +def findvideos(item): log() + if item.args != 'update': + return support.server(item, data=item.url) + else: + itemlist = [] + item.infoLabels['mediatype'] = 'episode' - blacklist = ["Home Page", "Calendario Aggiornamenti"] - action = 'peliculas' - patronBlock = r'<h2>Sfoglia</h2>\s*<ul>(?P<block>.*?)</ul>\s*</section>' - patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a></li>' - debug = True + data = httptools.downloadpage(item.url, headers=headers).data + data = re.sub('\n|\t', ' ', data) + data = re.sub(r'>\s+<', '> <', data) +## support.log("DATA - HTML:\n", data) + url_video = scrapertoolsV2.find_single_match(data, r'<div class="item"> <a data-id="[^"]+" data-href="([^"]+)" data-original="[^"]+"[^>]+> <div> <div class="title">Episodio \d+', -1) + url_serie = scrapertoolsV2.find_single_match(data, r'<link rel="canonical" href="([^"]+)"\s?/>') + goseries = support.typo("Vai alla Serie:", ' bold') + series = support.typo(item.contentSerieName, ' bold color kod') - return locals() - -# ================================================================================================================ + itemlist = support.server(item, data=url_video) + + itemlist.append( + Item(channel=item.channel, + title=goseries + series, + fulltitle=item.fulltitle, + show=item.show, + contentType='tvshow', + contentSerieName=item.contentSerieName, + url=url_serie, + action='episodios', + contentTitle=item.contentSerieName, + plot = goseries + series + "con tutte le puntate", + )) + + #support.regexDbg(item, patronBlock, headers) + return itemlist diff --git a/channels/toonitalia.json b/channels/toonitalia.json index 651d88c9..b62b658b 100644 --- a/channels/toonitalia.json +++ b/channels/toonitalia.json @@ -6,8 +6,8 @@ "adult": false, "thumbnail": "toonitalia.png", "banner": "toonitalia.png", - "categories": ["tvshow", "movie", "vos", "anime"], - "not_active":["include_in_newest_peliculas"], - "default_off":["include_in_newest"], + "categories": ["anime","vos"], + "not_active":["include_in_newest_peliculas", "include_in_newest_series"], + "default_off":["include_in_newest"], "settings": [] -} \ No newline at end of file +} diff --git a/channels/toonitalia.py b/channels/toonitalia.py index 693861cc..41303113 100644 --- a/channels/toonitalia.py +++ b/channels/toonitalia.py @@ -48,10 +48,11 @@ def newest(categoria): support.log(categoria) item = support.Item() try: - item.contentType = 'tvshow' - item.url= host - item.args= 'new' - return peliculas(item) + if categoria == 'anime': + item.contentType = 'tvshow' + item.url= host + item.args= 'new' + return peliculas(item) # Continua la ricerca in caso di errore except: import sys diff --git a/specials/news.py b/specials/news.py index 10f7b68f..38ecb05c 100644 --- a/specials/news.py +++ b/specials/news.py @@ -392,7 +392,7 @@ def get_newest(channel_id, categoria): def get_title(item): - support.log("ITEM NEWEST ->", item) + #support.log("ITEM NEWEST ->", item) # item.contentSerieName c'è anche se è un film if item.contentSerieName and item.contentType != 'movie': # Si es una serie title = item.contentSerieName @@ -671,7 +671,7 @@ def cb_custom_button(item, dict_values): dict_values[v] = not value if config.set_setting("custom_button_value_news", not value, item.channel) == True: - return {"label": "Ninguno"} + return {"label": config.get_localized_string(59992)} else: - return {"label": "Todos"} + return {"label": config.get_localized_string(59991)} From 35822d615fdf12f139c1b546cb555625b52f3053 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Sun, 3 Nov 2019 12:29:12 +0100 Subject: [PATCH 11/53] revert: toonitalia --- channels/toonitalia.json | 2 +- channels/toonitalia.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/channels/toonitalia.json b/channels/toonitalia.json index b62b658b..15f0a135 100644 --- a/channels/toonitalia.json +++ b/channels/toonitalia.json @@ -6,7 +6,7 @@ "adult": false, "thumbnail": "toonitalia.png", "banner": "toonitalia.png", - "categories": ["anime","vos"], + "categories": ["tvshow", "movie", "vos", "anime"], "not_active":["include_in_newest_peliculas", "include_in_newest_series"], "default_off":["include_in_newest"], "settings": [] diff --git a/channels/toonitalia.py b/channels/toonitalia.py index 41303113..693861cc 100644 --- a/channels/toonitalia.py +++ b/channels/toonitalia.py @@ -48,11 +48,10 @@ def newest(categoria): support.log(categoria) item = support.Item() try: - if categoria == 'anime': - item.contentType = 'tvshow' - item.url= host - item.args= 'new' - return peliculas(item) + item.contentType = 'tvshow' + item.url= host + item.args= 'new' + return peliculas(item) # Continua la ricerca in caso di errore except: import sys From cbc633eaf5485f5fa224257584ebe3226c1dfe7e Mon Sep 17 00:00:00 2001 From: mac12m99 <m.toma99@gmail.com> Date: Sun, 3 Nov 2019 13:37:20 +0100 Subject: [PATCH 12/53] updater per major release --- platformcode/updater.py | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/platformcode/updater.py b/platformcode/updater.py index b4c1f7ce..ff238d66 100644 --- a/platformcode/updater.py +++ b/platformcode/updater.py @@ -80,6 +80,15 @@ def check_addon_init(): logger.info('aggiornando a ' + commitJson['sha']) alreadyApplied = True + # major update + if len(commitJson['files']) > 50: + localCommitFile.close() + c['sha'] = updateFromZip('Aggiornamento in corso...') + localCommitFile = open(addonDir + trackingFile, 'w') # il file di tracking viene eliminato, lo ricreo + changelog += commitJson['commit']['message'] + " | " + nCommitApplied += 3 # il messaggio sarà lungo, probabilmente, il tempo di vis. è maggiorato + break + for file in commitJson['files']: if file["filename"] == trackingFile: # il file di tracking non si modifica continue @@ -215,12 +224,13 @@ def getSha(path): f.seek(0) return githash.blob_hash(f, size).hexdigest() + def getShaStr(str): return githash.blob_hash(StringIO(str), len(str)).hexdigest() -def updateFromZip(): - dp = platformtools.dialog_progress_bg('Kodi on Demand', 'Installazione in corso...') +def updateFromZip(message='Installazione in corso...'): + dp = platformtools.dialog_progress_bg('Kodi on Demand', message) dp.update(0) remotefilename = 'https://github.com/' + user + "/" + repo + "/archive/" + branch + ".zip" @@ -278,12 +288,32 @@ def remove(file): logger.info('File ' + file + ' NON eliminato') +def onerror(func, path, exc_info): + """ + Error handler for ``shutil.rmtree``. + + If the error is due to an access error (read only file) + it attempts to add write permission and then retries. + + If the error is for another reason it re-raises the error. + + Usage : ``shutil.rmtree(path, onerror=onerror)`` + """ + import stat + if not os.access(path, os.W_OK): + # Is the error an access error ? + os.chmod(path, stat.S_IWUSR) + func(path) + else: + raise + def removeTree(dir): if os.path.isdir(dir): try: - shutil.rmtree(dir) - except: + shutil.rmtree(dir, ignore_errors=False, onerror=onerror) + except Exception as e: logger.info('Cartella ' + dir + ' NON eliminata') + logger.error(e) def rename(dir1, dir2): From d751c27253fe776ca896def5791d63de0dfdbb49 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Sun, 3 Nov 2019 15:24:33 +0100 Subject: [PATCH 13/53] fix: cinemalibero --- channels/cinemalibero.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')) From 0b4eadc2635a2b0b3286e376b1f5858bb0fdae76 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Mon, 4 Nov 2019 00:40:48 +0100 Subject: [PATCH 14/53] fix: example estensione .txt per togliere errrore nei log --- channels/0example.json.txt | 116 +++++++++++++++ channels/0example.py.txt | 286 +++++++++++++++++++++++++++++++++++++ 2 files changed, 402 insertions(+) create mode 100644 channels/0example.json.txt create mode 100644 channels/0example.py.txt diff --git a/channels/0example.json.txt b/channels/0example.json.txt new file mode 100644 index 00000000..783193c6 --- /dev/null +++ b/channels/0example.json.txt @@ -0,0 +1,116 @@ +Rev:0.2 +Update: 03-10-2019 +##################### + +Promemoria da cancellare pena la non visibilità del canale in KOD!! + +##################### + + +le voci in settings sono state inserite per l'unico scopo +di velocizzare la scrittura del file +Vanno lasciate solo quelle voci il cui funzionamento sul +canale non vanno attivate. +"not_active": ["include_in_newest"], VA INSERITO nei canali che NON hanno nessuna voce newest. +Ovviamente va mantenuto tutto il codice di quell'id tra le {} +se vanno cancellati tutti deve rimanere la voce: +"settings": [] +##################### Cancellare fino a qui! +{ + "id": "nome del file .json", + "name": "Nome del canale visualizzato in KOD", + "language": ["ita", "sub-ita"], + "active": false, + "adult": false, + "thumbnail": "", + "banner": "", + "categories": ["movie", "tvshow", "anime", "vos", "documentary", "adult"], + "not_active": ["include_in_newest"], + "settings": [ + { + "id": "include_in_global_search", + "type": "bool", + "label": "@70728", + "default": false, + "enabled": false, + "visible": false + }, + { + "id": "include_in_newest_peliculas", + "type": "bool", + "label": "@70727", + "default": false, + "enabled": false, + "visible": false + }, + { + "id": "include_in_newest_series", + "type": "bool", + "label": "@70727", + "default": false, + "enabled": false, + "visible": false + }, + { + "id": "include_in_newest_anime", + "type": "bool", + "label": "@70727", + "default": false, + "enabled": false, + "visible": false + }, + { + "id": "include_in_newest_italiano", + "type": "bool", + "label": "@70727", + "default": false, + "enabled": false, + "visible": false + }, + { + "id": "checklinks", + "type": "bool", + "label": "Verifica se i link esistono", + "default": false, + "enabled": false, + "visible": false + }, + { + "id": "checklinks_number", + "type": "list", + "label": "Numero di link da verificare", + "default": 2, + "enabled": false, + "visible": "eq(-1,false)", + "lvalues": [ "3", "5", "10", "15", "20" ] + }, + { + "id": "filter_languages", + "type": "list", + "label": "@30019", + "default": 0, + "enabled": false, + "visible": false, + "lvalues": ["Non Filtrare"] + } + ], + + "renumber": [ + { + "id": "autorenumber", + "type": "bool", + "label": "@70712", + "default": false, + "enabled": false, + "visible": false + }, + { + "id": "autorenumber_mode", + "type": "bool", + "label": "@70688", + "default": false, + "enabled": false, + "visible": "eq(-1,false)" + } + ] +} diff --git a/channels/0example.py.txt b/channels/0example.py.txt new file mode 100644 index 00000000..f418da4a --- /dev/null +++ b/channels/0example.py.txt @@ -0,0 +1,286 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------ +# Canale per 'idcanale nel json' +# By: pincopallo! +# Eventuali crediti se vuoi aggiungerli +# ------------------------------------------------------------ +# Rev: 0.2 +# Update 12-10-2019 +# fix: +# 1. aggiunto pagination e sistemate alcune voci +# 2. modificato problemi in eccezioni +# 3. aggiunta la def select +# 4. modifica alla legenda e altre aggiunte + +# Questo vuole solo essere uno scheletro per velocizzare la scrittura di un canale. +# La maggior parte dei canali può essere scritta con il decoratore. +# I commenti sono più un promemoria... che una vera e propria spiegazione! +# Niente di più. +# Ulteriori informazioni sono reperibili nel wiki: +# https://github.com/kodiondemand/addon/wiki/decoratori + +""" + Questi sono commenti per i beta-tester. + + Su questo canale, nella categoria 'Ricerca Globale' + non saranno presenti le voci 'Aggiungi alla Videoteca' + e 'Scarica Film'/'Scarica Serie', dunque, + la loro assenza, nel Test, NON dovrà essere segnalata come ERRORE. + + Novità. Indicare in quale/i sezione/i è presente il canale: + - Nessuna, film, serie, anime... + + Avvisi: + - Eventuali avvisi per i tester + + Ulteriori info: + +""" +# CANCELLARE Ciò CHE NON SERVE per il canale, lascia il codice commentato ove occorre, +# ma fare PULIZIA quando si è finito di testarlo + +# Qui gli import +#import re + +# per l'uso dei decoratori, per i log, e funzioni per siti particolari +from core import support +# se non si fa uso di findhost() +from platformcode import config + +# in caso di necessità +#from core import scrapertoolsV2, httptools, servertools, tmdb +from core.item import Item # per newest +#from lib import unshortenit + +##### fine import + +# impostazioni variabili o def findhost() + +# se necessaria la variabile __channel__ +# da cancellare se non utilizzata +__channel__ = "id nel json" +# da cancellare se si utilizza findhost() +host = config.get_channel_url('id nel json' OR __channel__) # <-- ATTENZIONE +headers = [['Referer', host]] + +# Inizio findhost() - da cancellare se usato l'altro metodo +#impostati dinamicamente da findhost() +host = "" +headers = "" + +def findhost(): + global host, headers + # da adattare alla bisogna... + permUrl = httptools.downloadpage('INSERIRE-URL-QUI', follow_redirects=False).headers + host = 'https://www.'+permUrl['location'].replace('https://www.google.it/search?q=site:', '') + # cancellare host non utilizzato + host = scrapertoolsV2.find_single_match(permUrl, r'<div class="elementor-button-wrapper"> <a href="([^"]+)"') + headers = [['Referer', host]] + +findhost() # così le imposta una volta per tutte +### fine findhost + +# server di esempio... +list_servers = ['supervideo', 'streamcherry','rapidvideo', 'streamango', 'openload'] +# quality di esempio +list_quality = ['default', 'HD', '3D', '4K', 'DVD', 'SD'] + +### fine variabili + +#### Inizio delle def principali ### + +@support.menu +def mainlist(item): + support.log(item) + + # Ordine delle voci + # Voce FILM, puoi solo impostare l'url + film = ['', # url per la voce FILM, se possibile la pagina principale con le ultime novità + #Voce Menu,['url','action','args',contentType] + ('Al Cinema', ['', 'peliculas', '']), + ('Generi', ['', 'genres', 'genres']), + ('Per Lettera', ['', 'genres', 'letters']), + ('Anni', ['', 'genres', 'years']), + ('Qualità', ['', 'genres', 'quality']), + ('Mi sento fortunato', ['', 'genres', 'lucky']), + ('Popolari', ['', 'peliculas', '']), + ('Sub-ITA', ['', 'peliculas', '']) + ] + + # Voce SERIE, puoi solo impostare l'url + tvshow = ['', # url per la voce Serie, se possibile la pagina con titoli di serie + #Voce Menu,['url','action','args',contentType] + ('Novità', ['', '', '']), + ('Per Lettera', ['', 'genres', 'letters']), + ('Per Genere', ['', 'genres', 'genres']), + ('Per anno', ['', 'genres', 'years']) + ] + # Voce ANIME, puoi solo impostare l'url + anime = ['', # url per la voce Anime, se possibile la pagina con titoli di anime + #Voce Menu,['url','action','args',contentType] + ('Novità', ['', '', '']), + ('In Corso',['', '', '', '']), + ('Ultimi Episodi',['', '', '', '']), + ('Ultime Serie',['', '', '', '']) + ] + + """ + Eventuali Menu per voci non contemplate! + """ + + # se questa voce non è presente il menu genera una voce + # search per ogni voce del menu. Es. Cerca Film... + search = '' # se alla funzione search non serve altro + + # VOCE CHE APPARIRA' come prima voce nel menu di KOD! + # [Voce Menu,['url','action','args',contentType] + top = [ '' ['', '', '', '']) + + # Se vuoi creare un menu personalizzato o perchè gli altri non + # ti soddisfano + # [Voce Menu,['url','action','args',contentType] + nome = [( '' ['', '', '', '']) + return locals() + + # Legenda known_keys per i groups nei patron + # known_keys = ['url', 'title', 'title2', 'season', 'episode', 'thumb', 'quality', + # 'year', 'plot', 'duration', 'genere', 'rating', 'type', 'lang'] + # url = link relativo o assoluto alla pagina titolo film/serie + # title = titolo Film/Serie/Anime/Altro + # title2 = titolo dell'episodio Serie/Anime/Altro + # season = stagione in formato numerico + # episode = numero episodio, in formato numerico. + # thumb = linkrealtivo o assoluto alla locandina Film/Serie/Anime/Altro + # quality = qualità indicata del video + # year = anno in formato numerico (4 cifre) + # duration = durata del Film/Serie/Anime/Altro + # genere = genere del Film/Serie/Anime/Altro. Es: avventura, commedia + # rating = punteggio/voto in formato numerico + # type = tipo del video. Es. movie per film o tvshow per le serie. Di solito sono discrimanti usati dal sito + # lang = lingua del video. Es: ITA, Sub-ITA, Sub, SUB ITA. + # AVVERTENZE: Se il titolo è trovato nella ricerca TMDB/TVDB/Altro allora le locandine e altre info non saranno quelle recuperate nel sito.!!!! + + +@support.scrape +def peliculas(item): + support.log(item) + #support.dbg() # decommentare per attivare web_pdb + + action = '' + blacklist = [''] + patron = r'' + patronBlock = r'' + patronNext = '' + pagination = '' + + #debug = True # True per testare le regex sul sito + return locals() + +@support.scrape +def episodios(item): + support.log(item) + #support.dbg() + + action = '' + blacklist = [''] + patron = r'' + patronBlock = r'' + patronNext = '' + pagination = '' + + #debug = True + return locals() + +# Questa def è utilizzata per generare i menu del canale +# per genere, per anno, per lettera, per qualità ecc ecc +@support.scrape +def genres(item): + support.log(item) + #support.dbg() + + action = '' + blacklist = [''] + patron = r'' + patronBlock = r'' + patronNext = '' + pagination = '' + + #debug = True + return locals() + +############## Fine ordine obbligato +## Def ulteriori + +# per quei casi dove il sito non differenzia film e/o serie e/o anime +# e la ricerca porta i titoli mischiati senza poterli distinguere tra loro +# andranno modificate anche le def peliculas e episodios ove occorre +def select(item): + support.log('select --->', item) + #support.dbg() + data = httptools.downloadpage(item.url, headers=headers).data + # pulizia di data, in caso commentare le prossime 2 righe + data = re.sub('\n|\t', ' ', data) + data = re.sub(r'>\s+<', '> <', data) + block = scrapertoolsV2.find_single_match(data, r'') + if re.findall('', data, re.IGNORECASE): + support.log('select = ### è una serie ###') + return episodios(Item(channel=item.channel, + title=item.title, + fulltitle=item.fulltitle, + url=item.url, + args='serie', + contentType='tvshow', + #data1 = data decommentando portiamo data nella def senza doverla riscaricare + )) + +############## Fondo Pagina +# da adattare al canale +def search(item, text): + support.log('search', item) + itemlist = [] + text = text.replace(' ', '+') + item.url = host + '/index.php?do=search&story=%s&subaction=search' % (text) + # bisogna inserire item.contentType per la ricerca globale + # se il canale è solo film, si può omettere, altrimenti bisgona aggiungerlo e discriminare. + item.contentType = item.contentType + try: + return peliculas(item) + # Se captura la excepcion, para no interrumpir al buscador global si un canal falla + except: + import sys + for line in sys.exc_info(): + log('search log:', line) + return [] + + +# da adattare al canale +# inserire newest solo se il sito ha la pagina con le ultime novità/aggiunte +# altrimenti NON inserirlo +def newest(categoria): + support.log('newest ->', categoria) + itemlist = [] + item = Item() + try: + if categoria == 'peliculas': + item.url = host + item.action = 'peliculas' + itemlist = peliculas(item) + + if itemlist[-1].action == 'peliculas': + itemlist.pop() + # Continua la ricerca in caso di errore + except: + import sys + for line in sys.exc_info(): + support.log('newest log: ', {0}.format(line)) + return [] + + return itemlist + +# da adattare... +# consultare il wiki sia per support.server che ha vari parametri, +# sia per i siti con hdpass +#support.server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True) +def findvideos(item): + support.log('findvideos ->', item) + return support.server(item, headers=headers) From a240610772bf438b7e06baa322600cf5bc7c0490 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Mon, 4 Nov 2019 00:46:42 +0100 Subject: [PATCH 15/53] fix: canali con findhost() --- channels/altadefinizione01.py | 13 ++++---- channels/casacinemaInfo.py | 11 +++++-- channels/eurostreaming.py | 16 ++++++---- channels/seriehd.py | 60 +++++++++++++++++------------------ channels/serietvonline.py | 16 +++++++--- 5 files changed, 66 insertions(+), 50 deletions(-) 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, '<div class="elementor-button-wrapper"> <a href="([^"]+)"') headers = [['Referer', host]] -findhost() - list_servers = ['verystream','openload','rapidvideo','streamango'] list_quality = ['default'] @support.menu def mainlist(item): - + findhost() film = [ ('Al Cinema', ['/cinema/', 'peliculas', 'pellicola']), ('Ultimi Aggiornati-Aggiunti', ['','peliculas', 'update']), @@ -49,6 +47,7 @@ def mainlist(item): @support.scrape def peliculas(item): support.log('peliculas',item) + findhost() ## deflang = 'ITA' action="findvideos" @@ -73,7 +72,7 @@ def peliculas(item): @support.scrape def genres(item): support.log('genres',item) - + if item.args != 'orderalf': action = "peliculas" else: action = 'orderalf' @@ -94,7 +93,7 @@ def genres(item): @support.scrape def orderalf(item): support.log('orderalf',item) - + action= 'findvideos' patron = r'<td class="mlnh-thumb"><a href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"'\ '.+?[^>]+>[^>]+ [^>]+[^>]+ [^>]+>(?P<title>[^<]+).*?[^>]+>(?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/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/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/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' From 75ab1763bf514677edaa8da857b1b8a44d4e5e6f Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Mon, 4 Nov 2019 00:48:05 +0100 Subject: [PATCH 16/53] delete: 0example --- channels/0example.json | 116 ----------------- channels/0example.py | 286 ----------------------------------------- 2 files changed, 402 deletions(-) delete mode 100644 channels/0example.json delete mode 100644 channels/0example.py diff --git a/channels/0example.json b/channels/0example.json deleted file mode 100644 index 783193c6..00000000 --- a/channels/0example.json +++ /dev/null @@ -1,116 +0,0 @@ -Rev:0.2 -Update: 03-10-2019 -##################### - -Promemoria da cancellare pena la non visibilità del canale in KOD!! - -##################### - - -le voci in settings sono state inserite per l'unico scopo -di velocizzare la scrittura del file -Vanno lasciate solo quelle voci il cui funzionamento sul -canale non vanno attivate. -"not_active": ["include_in_newest"], VA INSERITO nei canali che NON hanno nessuna voce newest. -Ovviamente va mantenuto tutto il codice di quell'id tra le {} -se vanno cancellati tutti deve rimanere la voce: -"settings": [] -##################### Cancellare fino a qui! -{ - "id": "nome del file .json", - "name": "Nome del canale visualizzato in KOD", - "language": ["ita", "sub-ita"], - "active": false, - "adult": false, - "thumbnail": "", - "banner": "", - "categories": ["movie", "tvshow", "anime", "vos", "documentary", "adult"], - "not_active": ["include_in_newest"], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "@70728", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "include_in_newest_peliculas", - "type": "bool", - "label": "@70727", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "include_in_newest_series", - "type": "bool", - "label": "@70727", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "include_in_newest_anime", - "type": "bool", - "label": "@70727", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "include_in_newest_italiano", - "type": "bool", - "label": "@70727", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "checklinks", - "type": "bool", - "label": "Verifica se i link esistono", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "checklinks_number", - "type": "list", - "label": "Numero di link da verificare", - "default": 2, - "enabled": false, - "visible": "eq(-1,false)", - "lvalues": [ "3", "5", "10", "15", "20" ] - }, - { - "id": "filter_languages", - "type": "list", - "label": "@30019", - "default": 0, - "enabled": false, - "visible": false, - "lvalues": ["Non Filtrare"] - } - ], - - "renumber": [ - { - "id": "autorenumber", - "type": "bool", - "label": "@70712", - "default": false, - "enabled": false, - "visible": false - }, - { - "id": "autorenumber_mode", - "type": "bool", - "label": "@70688", - "default": false, - "enabled": false, - "visible": "eq(-1,false)" - } - ] -} diff --git a/channels/0example.py b/channels/0example.py deleted file mode 100644 index f418da4a..00000000 --- a/channels/0example.py +++ /dev/null @@ -1,286 +0,0 @@ -# -*- coding: utf-8 -*- -# ------------------------------------------------------------ -# Canale per 'idcanale nel json' -# By: pincopallo! -# Eventuali crediti se vuoi aggiungerli -# ------------------------------------------------------------ -# Rev: 0.2 -# Update 12-10-2019 -# fix: -# 1. aggiunto pagination e sistemate alcune voci -# 2. modificato problemi in eccezioni -# 3. aggiunta la def select -# 4. modifica alla legenda e altre aggiunte - -# Questo vuole solo essere uno scheletro per velocizzare la scrittura di un canale. -# La maggior parte dei canali può essere scritta con il decoratore. -# I commenti sono più un promemoria... che una vera e propria spiegazione! -# Niente di più. -# Ulteriori informazioni sono reperibili nel wiki: -# https://github.com/kodiondemand/addon/wiki/decoratori - -""" - Questi sono commenti per i beta-tester. - - Su questo canale, nella categoria 'Ricerca Globale' - non saranno presenti le voci 'Aggiungi alla Videoteca' - e 'Scarica Film'/'Scarica Serie', dunque, - la loro assenza, nel Test, NON dovrà essere segnalata come ERRORE. - - Novità. Indicare in quale/i sezione/i è presente il canale: - - Nessuna, film, serie, anime... - - Avvisi: - - Eventuali avvisi per i tester - - Ulteriori info: - -""" -# CANCELLARE Ciò CHE NON SERVE per il canale, lascia il codice commentato ove occorre, -# ma fare PULIZIA quando si è finito di testarlo - -# Qui gli import -#import re - -# per l'uso dei decoratori, per i log, e funzioni per siti particolari -from core import support -# se non si fa uso di findhost() -from platformcode import config - -# in caso di necessità -#from core import scrapertoolsV2, httptools, servertools, tmdb -from core.item import Item # per newest -#from lib import unshortenit - -##### fine import - -# impostazioni variabili o def findhost() - -# se necessaria la variabile __channel__ -# da cancellare se non utilizzata -__channel__ = "id nel json" -# da cancellare se si utilizza findhost() -host = config.get_channel_url('id nel json' OR __channel__) # <-- ATTENZIONE -headers = [['Referer', host]] - -# Inizio findhost() - da cancellare se usato l'altro metodo -#impostati dinamicamente da findhost() -host = "" -headers = "" - -def findhost(): - global host, headers - # da adattare alla bisogna... - permUrl = httptools.downloadpage('INSERIRE-URL-QUI', follow_redirects=False).headers - host = 'https://www.'+permUrl['location'].replace('https://www.google.it/search?q=site:', '') - # cancellare host non utilizzato - host = scrapertoolsV2.find_single_match(permUrl, r'<div class="elementor-button-wrapper"> <a href="([^"]+)"') - headers = [['Referer', host]] - -findhost() # così le imposta una volta per tutte -### fine findhost - -# server di esempio... -list_servers = ['supervideo', 'streamcherry','rapidvideo', 'streamango', 'openload'] -# quality di esempio -list_quality = ['default', 'HD', '3D', '4K', 'DVD', 'SD'] - -### fine variabili - -#### Inizio delle def principali ### - -@support.menu -def mainlist(item): - support.log(item) - - # Ordine delle voci - # Voce FILM, puoi solo impostare l'url - film = ['', # url per la voce FILM, se possibile la pagina principale con le ultime novità - #Voce Menu,['url','action','args',contentType] - ('Al Cinema', ['', 'peliculas', '']), - ('Generi', ['', 'genres', 'genres']), - ('Per Lettera', ['', 'genres', 'letters']), - ('Anni', ['', 'genres', 'years']), - ('Qualità', ['', 'genres', 'quality']), - ('Mi sento fortunato', ['', 'genres', 'lucky']), - ('Popolari', ['', 'peliculas', '']), - ('Sub-ITA', ['', 'peliculas', '']) - ] - - # Voce SERIE, puoi solo impostare l'url - tvshow = ['', # url per la voce Serie, se possibile la pagina con titoli di serie - #Voce Menu,['url','action','args',contentType] - ('Novità', ['', '', '']), - ('Per Lettera', ['', 'genres', 'letters']), - ('Per Genere', ['', 'genres', 'genres']), - ('Per anno', ['', 'genres', 'years']) - ] - # Voce ANIME, puoi solo impostare l'url - anime = ['', # url per la voce Anime, se possibile la pagina con titoli di anime - #Voce Menu,['url','action','args',contentType] - ('Novità', ['', '', '']), - ('In Corso',['', '', '', '']), - ('Ultimi Episodi',['', '', '', '']), - ('Ultime Serie',['', '', '', '']) - ] - - """ - Eventuali Menu per voci non contemplate! - """ - - # se questa voce non è presente il menu genera una voce - # search per ogni voce del menu. Es. Cerca Film... - search = '' # se alla funzione search non serve altro - - # VOCE CHE APPARIRA' come prima voce nel menu di KOD! - # [Voce Menu,['url','action','args',contentType] - top = [ '' ['', '', '', '']) - - # Se vuoi creare un menu personalizzato o perchè gli altri non - # ti soddisfano - # [Voce Menu,['url','action','args',contentType] - nome = [( '' ['', '', '', '']) - return locals() - - # Legenda known_keys per i groups nei patron - # known_keys = ['url', 'title', 'title2', 'season', 'episode', 'thumb', 'quality', - # 'year', 'plot', 'duration', 'genere', 'rating', 'type', 'lang'] - # url = link relativo o assoluto alla pagina titolo film/serie - # title = titolo Film/Serie/Anime/Altro - # title2 = titolo dell'episodio Serie/Anime/Altro - # season = stagione in formato numerico - # episode = numero episodio, in formato numerico. - # thumb = linkrealtivo o assoluto alla locandina Film/Serie/Anime/Altro - # quality = qualità indicata del video - # year = anno in formato numerico (4 cifre) - # duration = durata del Film/Serie/Anime/Altro - # genere = genere del Film/Serie/Anime/Altro. Es: avventura, commedia - # rating = punteggio/voto in formato numerico - # type = tipo del video. Es. movie per film o tvshow per le serie. Di solito sono discrimanti usati dal sito - # lang = lingua del video. Es: ITA, Sub-ITA, Sub, SUB ITA. - # AVVERTENZE: Se il titolo è trovato nella ricerca TMDB/TVDB/Altro allora le locandine e altre info non saranno quelle recuperate nel sito.!!!! - - -@support.scrape -def peliculas(item): - support.log(item) - #support.dbg() # decommentare per attivare web_pdb - - action = '' - blacklist = [''] - patron = r'' - patronBlock = r'' - patronNext = '' - pagination = '' - - #debug = True # True per testare le regex sul sito - return locals() - -@support.scrape -def episodios(item): - support.log(item) - #support.dbg() - - action = '' - blacklist = [''] - patron = r'' - patronBlock = r'' - patronNext = '' - pagination = '' - - #debug = True - return locals() - -# Questa def è utilizzata per generare i menu del canale -# per genere, per anno, per lettera, per qualità ecc ecc -@support.scrape -def genres(item): - support.log(item) - #support.dbg() - - action = '' - blacklist = [''] - patron = r'' - patronBlock = r'' - patronNext = '' - pagination = '' - - #debug = True - return locals() - -############## Fine ordine obbligato -## Def ulteriori - -# per quei casi dove il sito non differenzia film e/o serie e/o anime -# e la ricerca porta i titoli mischiati senza poterli distinguere tra loro -# andranno modificate anche le def peliculas e episodios ove occorre -def select(item): - support.log('select --->', item) - #support.dbg() - data = httptools.downloadpage(item.url, headers=headers).data - # pulizia di data, in caso commentare le prossime 2 righe - data = re.sub('\n|\t', ' ', data) - data = re.sub(r'>\s+<', '> <', data) - block = scrapertoolsV2.find_single_match(data, r'') - if re.findall('', data, re.IGNORECASE): - support.log('select = ### è una serie ###') - return episodios(Item(channel=item.channel, - title=item.title, - fulltitle=item.fulltitle, - url=item.url, - args='serie', - contentType='tvshow', - #data1 = data decommentando portiamo data nella def senza doverla riscaricare - )) - -############## Fondo Pagina -# da adattare al canale -def search(item, text): - support.log('search', item) - itemlist = [] - text = text.replace(' ', '+') - item.url = host + '/index.php?do=search&story=%s&subaction=search' % (text) - # bisogna inserire item.contentType per la ricerca globale - # se il canale è solo film, si può omettere, altrimenti bisgona aggiungerlo e discriminare. - item.contentType = item.contentType - try: - return peliculas(item) - # Se captura la excepcion, para no interrumpir al buscador global si un canal falla - except: - import sys - for line in sys.exc_info(): - log('search log:', line) - return [] - - -# da adattare al canale -# inserire newest solo se il sito ha la pagina con le ultime novità/aggiunte -# altrimenti NON inserirlo -def newest(categoria): - support.log('newest ->', categoria) - itemlist = [] - item = Item() - try: - if categoria == 'peliculas': - item.url = host - item.action = 'peliculas' - itemlist = peliculas(item) - - if itemlist[-1].action == 'peliculas': - itemlist.pop() - # Continua la ricerca in caso di errore - except: - import sys - for line in sys.exc_info(): - support.log('newest log: ', {0}.format(line)) - return [] - - return itemlist - -# da adattare... -# consultare il wiki sia per support.server che ha vari parametri, -# sia per i siti con hdpass -#support.server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True) -def findvideos(item): - support.log('findvideos ->', item) - return support.server(item, headers=headers) From 6f183b83d90f62339fac1e98196e4abfc7d0c117 Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Mon, 4 Nov 2019 12:04:49 +0100 Subject: [PATCH 17/53] Thumb e Banner: Casa Cinema Il Genio dello streaming Cinemalibero Mondo Serie TV --- channels/casacinema.json | 4 ++-- channels/cinemalibero.json | 4 ++-- channels/ilgeniodellostreaming.json | 6 +++--- channels/mondoserietv.json | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) 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/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/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": [] From 7ee9c45326c7d1f11adbab13531f2cbd53f5c3fe Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Mon, 4 Nov 2019 12:13:39 +0100 Subject: [PATCH 18/53] Rimossi colori --- platformcode/platformtools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()))) From c20c73bb968dd034bf160ced0034ca82a8865524 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Mon, 4 Nov 2019 14:44:33 +0100 Subject: [PATCH 19/53] fix: core/channeltools.py ripristinato pulsante tutti/nessuno... --- core/channeltools.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 From b444b07d68c31cbe28f7d177cca28d3b8ea48724 Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Mon, 4 Nov 2019 19:20:08 +0100 Subject: [PATCH 20/53] =?UTF-8?q?Fix=20per=20Ricerca=20e=20Novit=C3=A0=20p?= =?UTF-8?q?er=20Sub-ITA=20con=20selezione=20auto=20o=20ita=20in=20impostaz?= =?UTF-8?q?ioni?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- specials/news.py | 4 ++-- specials/search.py | 4 ++-- specials/searchall.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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 From 413d25791b249f76a91d18b65dbdcfb5d42548da Mon Sep 17 00:00:00 2001 From: mac12m99 <m.toma99@gmail.com> Date: Mon, 4 Nov 2019 20:02:31 +0100 Subject: [PATCH 21/53] ripristino vecchio metodo per identificare la versione --- platformcode/config.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/platformcode/config.py b/platformcode/config.py index 1a752590..26475709 100644 --- a/platformcode/config.py +++ b/platformcode/config.py @@ -20,15 +20,12 @@ def get_addon_core(): def get_addon_version(with_fix=True): ''' - Trova la versione dell'addon, senza usare le funzioni di kodi perchè non si aggiornano fino al riavvio + Devuelve el número de versión del addon, y opcionalmente número de fix si lo hay ''' - info = open(os.path.join(get_runtime_path(), 'addon.xml')).read() - ver = re.search('plugin.video.kod.*?version="([^"]+)"', info).group(1) - if with_fix: - return ver + " " + get_addon_version_fix() + return __settings__.getAddonInfo('version') + get_addon_version_fix() else: - return ver + return __settings__.getAddonInfo('version') def get_addon_version_fix(): From 9df5b4d83f0d85e4ac510c45a3847ccd0ed8db67 Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Mon, 4 Nov 2019 20:34:03 +0100 Subject: [PATCH 22/53] Thumb e Banner per: Popcorn Stream Tanti Film Serie TV Online --- channels/serietvonline.json | 4 +- channels/streamingaltadefinizione.json | 4 +- channels/tantifilm.json | 77 ++------------------------ 3 files changed, 9 insertions(+), 76 deletions(-) diff --git a/channels/serietvonline.json b/channels/serietvonline.json index 833b8edc..700fe885 100644 --- a/channels/serietvonline.json +++ b/channels/serietvonline.json @@ -4,8 +4,8 @@ "active": true, "adult": false, "language": ["ita"], - "thumbnail": "https:\/\/serietvonline.com\/wp-content\/uploads\/2016\/08\/logo2016-1.png", - "bannermenu": "https:\/\/serietvonline.com\/wp-content\/uploads\/2016\/08\/logo2016-1.png", + "thumbnail": "serietvonline.png", + "bannermenu": "serietvonline.png", "categories": ["anime","tvshow","movie","documentary"], "not_active": ["include_in_newest_anime"], "settings": [] diff --git a/channels/streamingaltadefinizione.json b/channels/streamingaltadefinizione.json index 2fbcfdb5..c028f749 100644 --- a/channels/streamingaltadefinizione.json +++ b/channels/streamingaltadefinizione.json @@ -4,8 +4,8 @@ "language": ["ita"], "active": true, "adult": false, - "thumbnail": "https://www.popcornstream.best/wp-content/uploads/2019/09/PopLogo40.png", - "banner": "https://www.popcornstream.info/media/PopcornStream820x428.png", + "thumbnail": "popcornstream.png", + "banner": "popcornstream.png", "categories": ["movie","tvshow","anime"], "settings": [] } diff --git a/channels/tantifilm.json b/channels/tantifilm.json index a869f0de..e50875c3 100644 --- a/channels/tantifilm.json +++ b/channels/tantifilm.json @@ -4,76 +4,9 @@ "language": ["ita"], "active": true, "adult": false, - "thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/tantifilm.png", - "banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/tantifilm.png", - "categories": ["tvshow", "movie", "anime"], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Includi in ricerca globale", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_peliculas", - "type": "bool", - "label": "Includi in Novità - Film", - "default": true, - "enabled": true, - "visible": true - - }, - { - "id": "include_in_newest_italiano", - "type": "bool", - "label": "Includi in Novità - Italiano", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "checklinks", - "type": "bool", - "label": "Verifica se i link esistono", - "default": false, - "enabled": true, - "visible": true - }, - { - "id": "checklinks_number", - "type": "list", - "label": "Numero di 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","IT"] - }, - { - "id": "autorenumber", - "type": "bool", - "label": "@70712", - "default": false, - "enabled": true, - "visible": true - }, - { - "id": "autorenumber_mode", - "type": "bool", - "label": "@70688", - "default": false, - "enabled": true, - "visible": "eq(-1,true)" - } - ] + "thumbnail": "tantifilm.png", + "banner": "tantifilm.png", + "categories": ["tvshow", "movie", "anime"], + "not_active":["include_in_newest_anime"], + "settings": [] } From 8c725bcf7fe7bcac606344941e9d3b49d48ae3c9 Mon Sep 17 00:00:00 2001 From: marco <m.toma99@gmail.com> Date: Mon, 4 Nov 2019 20:42:08 +0100 Subject: [PATCH 23/53] ops --- platformcode/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformcode/config.py b/platformcode/config.py index 26475709..ba6813fc 100644 --- a/platformcode/config.py +++ b/platformcode/config.py @@ -23,7 +23,7 @@ def get_addon_version(with_fix=True): Devuelve el número de versión del addon, y opcionalmente número de fix si lo hay ''' if with_fix: - return __settings__.getAddonInfo('version') + get_addon_version_fix() + return __settings__.getAddonInfo('version') + " " + get_addon_version_fix() else: return __settings__.getAddonInfo('version') From d2af1a86da44e5f9ae3013421fea5da35101d1de Mon Sep 17 00:00:00 2001 From: Alhaziel01 <alhaziel01@gmail.com> Date: Mon, 4 Nov 2019 23:12:01 +0100 Subject: [PATCH 24/53] Fix VVVVID --- channels/vvvvid.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/channels/vvvvid.py b/channels/vvvvid.py index 983fa91d..9269cf2e 100644 --- a/channels/vvvvid.py +++ b/channels/vvvvid.py @@ -137,12 +137,12 @@ def episodios(item): episodes.append(episode['episodes']) for episode in episodes: for key in episode: - if 'stagione' in key['title'].lower(): - match = support.match(key['title'].encode('ascii', 'replace'), r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)')[0][0] + if 'stagione' in key['title'].encode('utf8').lower(): + match = support.match(key['title'].encode('utf8'), r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)')[0][0] title = match[0]+'x'+match[1] + ' - ' + item.fulltitle make_item = True elif int(key['season_id']) == int(season_id): - title = 'Episodio ' + key['number'] + ' - ' + key['title'].encode('ascii', 'replace'), + title = 'Episodio ' + key['number'] + ' - ' + key['title'].encode('utf8'), make_item = True else: make_item = False @@ -193,21 +193,21 @@ def make_itemlist(itemlist, item, data): search = item.search if item.search else '' infoLabels = {} for key in data['data']: - if search.lower() in key['title'].lower(): + if search.lower() in key['title'].encode('utf8').lower(): infoLabels['year'] = key['date_published'] infoLabels['title'] = infoLabels['tvshowtitle'] = key['title'] - support.log(infoLabels) + title = key['title'].encode('utf8') itemlist.append( Item( channel = item.channel, - title = support.typo(key['title'], 'bold'), - fulltitle= key['title'], - show= key['title'], + title = support.typo(title, 'bold'), + fulltitle= title, + show= title, url= host + str(key['show_id']) + '/seasons/', action= 'findvideos' if item.contentType == 'movie' else 'episodios', contentType = item.contentType, contentSerieName= key['title'] if item.contentType != 'movie' else '', - contentTitle= key['title'] if item.contentType == 'movie' else '', + contentTitle= title if item.contentType == 'movie' else '', infoLabels=infoLabels )) return itemlist \ No newline at end of file From 080ae3187d043079ddf584ae9a40c92026109167 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Mon, 4 Nov 2019 23:50:37 +0100 Subject: [PATCH 25/53] fix: servers/decrypters/zcrypt.py problema del caricamento infinito per link che rimandano a openload --- servers/decrypters/zcrypt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/servers/decrypters/zcrypt.py b/servers/decrypters/zcrypt.py index a71e77bb..7a41230a 100644 --- a/servers/decrypters/zcrypt.py +++ b/servers/decrypters/zcrypt.py @@ -12,8 +12,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= encontrados = { 'https://vcrypt.net/images/logo', 'https://vcrypt.net/css/out', 'https://vcrypt.net/images/favicon', 'https://vcrypt.net/css/open', - 'http://linkup.pro/js/jquery', 'https://linkup.pro/js/jquery', - 'http://www.rapidcrypt.net/open' + 'http://linkup.pro/js/jquery', 'https://linkup.pro/js/jquery'#, + #'http://www.rapidcrypt.net/open' } devuelve = [] @@ -84,6 +84,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= for url in matches: if url not in encontrados: + if 'https://rapidcrypt.net/open/' in url: + continue logger.info(" url=" + url) encontrados.add(url) @@ -96,5 +98,3 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= ret = page_url+" "+str(devuelve) if devuelve else page_url logger.info(" RET=" + str(ret)) return ret - - From aaeeb2b32b1d4f84c336ed9e68ec892b9349a65d Mon Sep 17 00:00:00 2001 From: Alhaziel01 <alhaziel01@gmail.com> Date: Tue, 5 Nov 2019 00:04:31 +0100 Subject: [PATCH 26/53] Fix Wstream?? --- servers/wstream.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/servers/wstream.json b/servers/wstream.json index 45e65004..79951474 100644 --- a/servers/wstream.json +++ b/servers/wstream.json @@ -6,12 +6,20 @@ "thumbnail": "http:\/\/media.tvalacarta.info\/servers\/server_wstream.png", "find_videos": { "patterns": [ + { + "pattern":"wstream.video\/(api\/vcmod\/fastredirect\/streaming.php\\?id=624173)", + "url": "http:\/\/wstream.video\/\\1" + }, { "pattern": "wstream\\.video/video\\.php\\?file_code=([a-z0-9A-Z]+)", "url": "http:\/\/wstream.video\/\\1" }, { - "pattern": "wstream\\.video/(?:embed-|videos/|video/|videow/|videoj/)?([a-z0-9A-Z]+)", + "pattern": "wstream\\.video\/(?:embed-|videos/|video/|videow/|videoj/)([a-z0-9A-Z]+)", + "url": "http:\/\/wstream.video\/\\1" + }, + { + "pattern": "wstream\\.video\/(?!api/)([a-z0-9A-Z]+)", "url": "http:\/\/wstream.video\/\\1" } ], From 462676144bbe713c1448131f133f00d2a2bfccbf Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Tue, 5 Nov 2019 00:07:27 +0100 Subject: [PATCH 27/53] fix: servers/decrypters/zcrypt.py per link http://vcrypt.net/myfoldersakstream.php --- servers/decrypters/zcrypt.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/servers/decrypters/zcrypt.py b/servers/decrypters/zcrypt.py index 7a41230a..00416720 100644 --- a/servers/decrypters/zcrypt.py +++ b/servers/decrypters/zcrypt.py @@ -47,13 +47,17 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= data, status = unshortenit.unshorten(url) logger.info("Data - Status zcrypt xshield.net: [%s] [%s] " %(data, status)) elif 'vcrypt.net' in url: - from lib import unshortenit - data, status = unshortenit.unshorten(url) - logger.info("Data - Status zcrypt vcrypt.net: [%s] [%s] " %(data, status)) + if 'myfoldersakstream.php': continue #'very' in url or + else: + from lib import unshortenit + data, status = unshortenit.unshorten(url) + logger.info("Data - Status zcrypt vcrypt.net: [%s] [%s] " %(data, status)) elif 'linkup' in url or 'bit.ly' in url: - idata = httptools.downloadpage(url).data - data = scrapertoolsV2.find_single_match(idata, "<iframe[^<>]*src=\\'([^'>]*)\\'[^<>]*>") - #fix by greko inizio + if '/olink/' in url: continue + else: + idata = httptools.downloadpage(url).data + data = scrapertoolsV2.find_single_match(idata, "<iframe[^<>]*src=\\'([^'>]*)\\'[^<>]*>") + #fix by greko inizio if not data: data = scrapertoolsV2.find_single_match(idata, 'action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">') from lib import unshortenit From e1d3ad0cce30f92ed8f49e4f51231fd5c754959c Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Tue, 5 Nov 2019 00:37:15 +0100 Subject: [PATCH 28/53] fix: servers/decrypters/zcrypt.py corretto!!! OPS! [cit.] --- servers/decrypters/zcrypt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/decrypters/zcrypt.py b/servers/decrypters/zcrypt.py index 00416720..ad520aa8 100644 --- a/servers/decrypters/zcrypt.py +++ b/servers/decrypters/zcrypt.py @@ -47,7 +47,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= data, status = unshortenit.unshorten(url) logger.info("Data - Status zcrypt xshield.net: [%s] [%s] " %(data, status)) elif 'vcrypt.net' in url: - if 'myfoldersakstream.php': continue #'very' in url or + if 'myfoldersakstream.php' in url: + continue #'very' in url or else: from lib import unshortenit data, status = unshortenit.unshorten(url) From f8398158555c7aa9401478160ba0a98e68d6de64 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Tue, 5 Nov 2019 01:18:41 +0100 Subject: [PATCH 29/53] fix: servers/wstream.json update --- servers/wstream.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/wstream.json b/servers/wstream.json index 79951474..359a6bc0 100644 --- a/servers/wstream.json +++ b/servers/wstream.json @@ -7,7 +7,7 @@ "find_videos": { "patterns": [ { - "pattern":"wstream.video\/(api\/vcmod\/fastredirect\/streaming.php\\?id=624173)", + "pattern":"wstream.video\/(api\/vcmod\/fastredirect\/streaming.php\\?id=[0-9a-zA-Z]+)", "url": "http:\/\/wstream.video\/\\1" }, { From a6f5cb20612519d9e587bf11ebe1a79ec747b60a Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Tue, 5 Nov 2019 17:18:25 +0100 Subject: [PATCH 30/53] Fix Community and tmdb --- core/tmdb.py | 8 +++---- specials/community.py | 50 ++++++++++++++++++++++++------------------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/core/tmdb.py b/core/tmdb.py index 59600cb3..60210b3e 100644 --- a/core/tmdb.py +++ b/core/tmdb.py @@ -370,13 +370,13 @@ def set_infoLabels_item(item, seekTmdb=True, idioma_busqueda=def_lang, lock=None if temporada: # Actualizar datos __leer_datos(otmdb_global) - item.infoLabels['title'] = temporada['name'] - if temporada['overview']: + item.infoLabels['title'] = temporada['name'] if temporada.has_key('name') else '' + if temporada.has_key('overview') and temporada['overview']: item.infoLabels['plot'] = temporada['overview'] - if temporada['air_date']: + if temporada.has_key('air_date') and temporada['air_date']: date = temporada['air_date'].split('-') item.infoLabels['aired'] = date[2] + "/" + date[1] + "/" + date[0] - if temporada['poster_path']: + if temporada.has_key('poster_path') and temporada['poster_path']: item.infoLabels['poster_path'] = 'http://image.tmdb.org/t/p/original' + temporada['poster_path'] item.thumbnail = item.infoLabels['poster_path'] diff --git a/specials/community.py b/specials/community.py index 7214a649..ba6bda34 100644 --- a/specials/community.py +++ b/specials/community.py @@ -444,7 +444,7 @@ def get_seasons(item): if inspect.stack()[1][3] in ['add_tvshow', "get_seasons"] or show_seasons == False: it = [] for item in itemlist: - it += episodios(item) + if os.path.isfile(item.url): it += episodios(item) itemlist = it if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest']: @@ -471,6 +471,7 @@ def get_seasons(item): def episodios(item): + # support.dbg() support.log() itm = item @@ -489,8 +490,13 @@ def episodios(item): if pagination and (pag - 1) * pagination > i: continue # pagination if pagination and i >= pag * pagination: break # pagination match = [] - if episode.has_key('number'): match = support.match(episode['number'], r'(?P<season>\d+)x(?P<episode>\d+)')[0][0] - if not match and episode.has_key('title'): match = support.match(episode['title'], r'(?P<season>\d+)x(?P<episode>\d+)')[0][0] + if episode.has_key('number'): + match = support.match(episode['number'], r'(?P<season>\d+)x(?P<episode>\d+)')[0] + if match: + match = match[0] + if not match and episode.has_key('title'): + match = support.match(episode['title'], r'(?P<season>\d+)x(?P<episode>\d+)')[0] + if match: match = match[0] if match: episode_number = match[1] ep = int(match[1]) + 1 @@ -505,27 +511,27 @@ def episodios(item): episode_number = str(ep).zfill(2) ep += 1 - infoLabels['season'] = season_number - infoLabels['episode'] = episode_number + infoLabels['season'] = season_number + infoLabels['episode'] = episode_number - plot = episode['plot'] if episode.has_key('plot') else item.plot - thumbnail = episode['poster'] if episode.has_key('poster') else episode['thumbnail'] if episode.has_key('thumbnail') else item.thumbnail + plot = episode['plot'] if episode.has_key('plot') else item.plot + thumbnail = episode['poster'] if episode.has_key('poster') else episode['thumbnail'] if episode.has_key('thumbnail') else item.thumbnail - title = ' - ' + episode['title'] if episode.has_key('title') else '' - title = '%sx%s%s' % (season_number, episode_number, title) - if season_number == item.filter or not item.filterseason: - itemlist.append(Item(channel= item.channel, - title= format_title(title), - fulltitle = item.fulltitle, - show = item.show, - url= episode, - action= 'findvideos', - plot= plot, - thumbnail= thumbnail, - contentSeason= season_number, - contentEpisode= episode_number, - infoLabels= infoLabels, - contentType= 'episode')) + title = ' - ' + episode['title'] if episode.has_key('title') else '' + title = '%sx%s%s' % (season_number, episode_number, title) + if season_number == item.filter or not item.filterseason: + itemlist.append(Item(channel= item.channel, + title= format_title(title), + fulltitle = item.fulltitle, + show = item.show, + url= episode, + action= 'findvideos', + plot= plot, + thumbnail= thumbnail, + contentSeason= season_number, + contentEpisode= episode_number, + infoLabels= infoLabels, + contentType= 'episode')) if show_seasons == True and inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes'] and not item.filterseason: From 85f72f65922f19d60a48d13471fc50e35320af07 Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Tue, 5 Nov 2019 17:34:01 +0100 Subject: [PATCH 31/53] Mini Aggiornamento Bleach Portal [DEPRECATED] --- channels/bleachportal.json | 23 ++++++++--------------- channels/bleachportal.py | 31 +++++++++++++++++-------------- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/channels/bleachportal.json b/channels/bleachportal.json index e5fcdcf3..59f84ee4 100644 --- a/channels/bleachportal.json +++ b/channels/bleachportal.json @@ -1,22 +1,15 @@ { "id": "bleachportal", "name": "BleachPortal", - "language": ["ita"], + "language": ["sub-ita"], "active": true, - "adult": false, - "fanart": "http://i39.tinypic.com/35ibvcx.jpg", - "thumbnail": "http://www.bleachportal.it/images/index_r1_c1.jpg", - "banner": "http://cgi.di.uoa.gr/~std05181/images/bleach.jpg", + "deprecated": true, + "adult": false, + "fanart": "https://www.thetvdb.com/banners/fanart/original/74796-29.jpg", + "thumbnail": "bleachportal.png", + "banner": "bleachportal.png", "categories": ["anime"], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Incluir en busqueda global", - "default": false, - "enabled": false, - "visible": false - } - ] + "not_active":["include_in_newests", "include_in_global_search"], + "settings": [] } diff --git a/channels/bleachportal.py b/channels/bleachportal.py index 3df421a0..9377fb9d 100644 --- a/channels/bleachportal.py +++ b/channels/bleachportal.py @@ -11,6 +11,7 @@ from core import scrapertools, httptools from core.item import Item from platformcode import logger from platformcode import config +from core import support host = "http://www.bleachportal.it" @@ -19,17 +20,19 @@ def mainlist(item): logger.info("[BleachPortal.py]==> mainlist") itemlist = [Item(channel=item.channel, action="episodi", - title="[COLOR azure] Bleach [/COLOR] - [COLOR deepskyblue]Lista Episodi[/COLOR]", + title= support.typo('Bleach','bold'), url=host + "/streaming/bleach/stream_bleach.htm", - thumbnail="http://i45.tinypic.com/286xp3m.jpg", - fanart="http://i40.tinypic.com/5jsinb.jpg", + thumbnail="https://www.thetvdb.com/banners/posters/74796-14.jpg", + banner="https://www.thetvdb.com/banners/graphical/74796-g6.jpg", + fanart="https://www.thetvdb.com/banners/fanart/original/74796-30.jpg", extra="bleach"), Item(channel=item.channel, action="episodi", - title="[COLOR azure] D.Gray Man [/COLOR] - [COLOR deepskyblue]Lista Episodi[/COLOR]", + title=support.typo('D.Gray Man','bold'), url=host + "/streaming/d.gray-man/stream_dgray-man.htm", - thumbnail="http://i59.tinypic.com/9is3tf.jpg", - fanart="http://wallpapercraft.net/wp-content/uploads/2016/11/Cool-D-Gray-Man-Background.jpg", + thumbnail="https://www.thetvdb.com/banners/posters/79635-1.jpg", + banner="https://www.thetvdb.com/banners/graphical/79635-g4.jpg", + fanart="https://www.thetvdb.com/banners/fanart/original/79635-6.jpg", extra="dgrayman")] return itemlist @@ -40,7 +43,7 @@ def episodi(item): itemlist = [] data = httptools.downloadpage(item.url).data - patron = '<td>?[<span\s|<width="\d+%"\s]+?class="[^"]+">\D+([\d\-]+)\s?<[^<]+<[^<]+<[^<]+<[^<]+<.*?\s+?.*?<span style="[^"]+">([^<]+).*?\s?.*?<a href="\.*(/?[^"]+)">' + patron = r'<td>?[<span\s|<width="\d+%"\s]+?class="[^"]+">\D+([\d\-]+)\s?<[^<]+<[^<]+<[^<]+<[^<]+<.*?\s+?.*?<span style="[^"]+">([^<]+).*?\s?.*?<a href="\.*(/?[^"]+)">' matches = re.compile(patron, re.DOTALL).findall(data) animetitle = "Bleach" if item.extra == "bleach" else "D.Gray Man" @@ -49,19 +52,19 @@ def episodi(item): itemlist.append( Item(channel=item.channel, action="findvideos", - title="[COLOR azure]%s Ep: [COLOR deepskyblue]%s[/COLOR][/COLOR]" % (animetitle, scrapednumber), + title=support.typo("%s Episodio %s" % (animetitle, scrapednumber),'bold'), url=item.url.replace("stream_bleach.htm",scrapedurl) if "stream_bleach.htm" in item.url else item.url.replace("stream_dgray-man.htm", scrapedurl), plot=scrapedtitle, extra=item.extra, thumbnail=item.thumbnail, fanart=item.fanart, - fulltitle="[COLOR red]%s Ep: %s[/COLOR] | [COLOR deepskyblue]%s[/COLOR]" % (animetitle, scrapednumber, scrapedtitle))) + fulltitle="%s Ep: %s | %s" % (animetitle, scrapednumber, scrapedtitle))) if item.extra == "bleach": itemlist.append( Item(channel=item.channel, action="oav", - title="[B][COLOR azure] OAV e Movies [/COLOR][/B]", + title=support.typo("OAV e Movies",'bold color kod'), url=item.url.replace("stream_bleach.htm", "stream_bleach_movie_oav.htm"), extra=item.extra, thumbnail=item.thumbnail, @@ -75,19 +78,19 @@ def oav(item): itemlist = [] data = httptools.downloadpage(item.url).data - patron = '<td>?[<span\s|<width="\d+%"\s]+?class="[^"]+">-\s+(.*?)<[^<]+<[^<]+<[^<]+<[^<]+<.*?\s+?.*?<span style="[^"]+">([^<]+).*?\s?.*?<a href="\.*(/?[^"]+)">' + patron = r'<td>?[<span\s|<width="\d+%"\s]+?class="[^"]+">-\s+(.*?)<[^<]+<[^<]+<[^<]+<[^<]+<.*?\s+?.*?<span style="[^"]+">([^<]+).*?\s?.*?<a href="\.*(/?[^"]+)">' matches = re.compile(patron, re.DOTALL).findall(data) for scrapednumber, scrapedtitle, scrapedurl in matches: itemlist.append( Item(channel=item.channel, action="findvideos", - title="[COLOR deepskyblue] " + scrapednumber + " [/COLOR]", + title=support.typo(scrapednumber, 'bold'), url=item.url.replace("stream_bleach_movie_oav.htm", scrapedurl), plot=scrapedtitle, extra=item.extra, thumbnail=item.thumbnail, - fulltitle="[COLOR red]" + scrapednumber + "[/COLOR] | [COLOR deepskyblue]" + scrapedtitle + "[/COLOR]")) + fulltitle=scrapednumber + " | " + scrapedtitle)) return list(reversed(itemlist)) @@ -109,7 +112,7 @@ def findvideos(item): itemlist.append( Item(channel=item.channel, action="play", - title="[[COLOR orange]Diretto[/COLOR]] [B]%s[/B]" % item.title, + title="Diretto %s" % item.title, url=item.url.replace(item.url.split("/")[-1], "/" + video), thumbnail=item.thumbnail, fulltitle=item.fulltitle)) From 635f1f31dc304d3f98a4f59a675b36d115cf9b84 Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Tue, 5 Nov 2019 17:34:34 +0100 Subject: [PATCH 32/53] Aggiunto parametro deprecated --- core/channeltools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/channeltools.py b/core/channeltools.py index 254d2ed9..56e6fee3 100644 --- a/core/channeltools.py +++ b/core/channeltools.py @@ -36,7 +36,7 @@ def get_channel_parameters(channel_name): # logger.debug(channel_parameters) if channel_parameters: # cambios de nombres y valores por defecto - channel_parameters["title"] = channel_parameters.pop("name") + channel_parameters["title"] = channel_parameters.pop("name") + (' [DEPRECATED]' if channel_parameters.has_key('deprecated') and channel_parameters['deprecated'] else '') channel_parameters["channel"] = channel_parameters.pop("id") # si no existe el key se declaran valor por defecto para que no de fallos en las funciones que lo llaman From 2307a53dad8afe05a16e769ed91e73cd6386c09d Mon Sep 17 00:00:00 2001 From: mac12m99 <m.toma99@gmail.com> Date: Tue, 5 Nov 2019 19:27:10 +0100 Subject: [PATCH 33/53] =?UTF-8?q?rimossi=20canali=20non=20pi=C3=B9=20esist?= =?UTF-8?q?enti?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- channels.json | 99 +++++---- channels/altadefinizionehd.json | 70 ------ channels/altadefinizionehd.py | 264 ----------------------- channels/italiafilmhd.json | 63 ------ channels/italiafilmhd.py | 364 -------------------------------- 5 files changed, 48 insertions(+), 812 deletions(-) delete mode 100644 channels/altadefinizionehd.json delete mode 100644 channels/altadefinizionehd.py delete mode 100644 channels/italiafilmhd.json delete mode 100644 channels/italiafilmhd.py diff --git a/channels.json b/channels.json index cce0f9a9..b193e590 100644 --- a/channels.json +++ b/channels.json @@ -1,55 +1,52 @@ { - "altadefinizione01": "https://www.altadefinizione01.cc", - "altadefinizione01_club": "https://www.altadefinizione01.cc", - "altadefinizione01_link": "http://altadefinizione01.gift", - "altadefinizioneclick": "https://altadefinizione.cloud", - "altadefinizionehd": "https://altadefinizione.wtf", + "altadefinizione01": "https://www.altadefinizione01.cc", + "altadefinizione01_club": "https://www.altadefinizione01.cc", + "altadefinizione01_link": "http://altadefinizione01.gift", + "altadefinizioneclick": "https://altadefinizione.cloud", "animeforce": "https://ww1.animeforce.org", - "animeleggendari": "https://animepertutti.com", - "animespace": "http://www.animespace.tv", - "animestream": "https://www.animeworld.it", - "animesubita": "http://www.animesubita.org", - "animetubeita": "http://www.animetubeita.com", - "animeworld": "https://www.animeworld.tv", - "casacinema": "https://www.casacinema.uno", - "casacinemainfo": "https://www.casacinema.info", - "cb01anime": "https://www.cineblog01.ink", - "cinemalibero": "https://www.cinemalibero.best", - "documentaristreamingda": "https://documentari-streaming-da.com", - "dreamsub": "https://www.dreamsub.stream", - "eurostreaming": "https://eurostreaming.pink", - "fastsubita": "http://fastsubita.com", - "filmgratis": "https://www.filmaltadefinizione.net", - "filmigratis": "https://filmigratis.org", - "filmpertutti": "https://www.filmpertutti.link", - "filmsenzalimiti": "https://filmsenzalimiti.best", - "filmsenzalimiticc": "https://www.filmsenzalimiti.press", - "filmstreaming01": "https://filmstreaming01.com", - "filmstreamingita": "http://filmstreamingita.live", + "animeleggendari": "https://animepertutti.com", + "animespace": "http://www.animespace.tv", + "animestream": "https://www.animeworld.it", + "animesubita": "http://www.animesubita.org", + "animetubeita": "http://www.animetubeita.com", + "animeworld": "https://www.animeworld.tv", + "casacinema": "https://www.casacinema.uno", + "casacinemainfo": "https://www.casacinema.info", + "cb01anime": "https://www.cineblog01.ink", + "cinemalibero": "https://www.cinemalibero.best", + "documentaristreamingda": "https://documentari-streaming-da.com", + "dreamsub": "https://www.dreamsub.stream", + "eurostreaming": "https://eurostreaming.pink", + "fastsubita": "http://fastsubita.com", + "filmgratis": "https://www.filmaltadefinizione.net", + "filmigratis": "https://filmigratis.org", + "filmpertutti": "https://www.filmpertutti.link", + "filmsenzalimiti": "https://filmsenzalimiti.best", + "filmsenzalimiticc": "https://www.filmsenzalimiti.press", + "filmstreaming01": "https://filmstreaming01.com", "guardafilm": "http://www.guardafilm.top", - "guardarefilm": "https://www.guardarefilm.red", - "guardaserie_stream": "https://guardaserie.co", - "guardaseriecc": "https://guardaserie.site", - "guardaserieclick": "https://www.guardaserie.media", - "guardogratis": "https://guardogratis.net", - "ilgeniodellostreaming": "https://igds.red", - "italiafilm": "https://www.italia-film.pw", - "italiafilmhd": "https://italiafilm.info", - "italiaserie": "https://italiaserie.org", - "itastreaming": "https://itastreaming.film", - "mondolunatico": "http://mondolunatico.org", - "mondolunatico2": "https://mondolunatico.org:443/stream", - "mondoserietv": "https://mondoserietv.com", - "piratestreaming": "https://www.piratestreaming.media", - "polpotv": "https://polpo.tv", - "seriehd": "https://www.seriehd.moda", - "serietvonline": "https://serietvonline.best", - "serietvsubita": "http://serietvsubita.xyz", - "serietvu": "https://www.serietvu.club", - "streamingaltadefinizione": "https://www.popcornstream.best", - "streamtime": "https://t.me/s/StreamTime", - "tantifilm": "https://www.tantifilm.eu", - "toonitalia": "https://toonitalia.org", - "vedohd": "https://vedohd.video", + "guardarefilm": "https://www.guardarefilm.red", + "guardaserie_stream": "https://guardaserie.co", + "guardaseriecc": "https://guardaserie.site", + "guardaserieclick": "https://www.guardaserie.media", + "guardogratis": "https://guardogratis.net", + "ilgeniodellostreaming": "https://igds.red", + "italiafilm": "https://www.italia-film.pw", + "italiaserie": "https://italiaserie.org", + "itastreaming": "https://itastreaming.film", + "mondolunatico": "http://mondolunatico.org", + "mondolunatico2": "https://mondolunatico.org:443/stream", + "mondoserietv": "https://mondoserietv.com", + "piratestreaming": "https://www.piratestreaming.media", + "polpotv": "https://polpo.tv", + "seriehd": "https://www.seriehd.moda", + "serietvonline": "https://serietvonline.best", + "serietvsubita": "http://serietvsubita.xyz", + "serietvu": "https://www.serietvu.club", + "streamingaltadefinizione": "https://www.popcornstream.best", + "streamtime": "https://t.me/s/StreamTime", + "tantifilm": "https://www.tantifilm.eu", + "toonitalia": "https://toonitalia.org", + "vedohd": "https://vedohd.video", "vvvvid": "https://www.vvvvid.it" -} +} \ No newline at end of file diff --git a/channels/altadefinizionehd.json b/channels/altadefinizionehd.json deleted file mode 100644 index 3efdad33..00000000 --- a/channels/altadefinizionehd.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "id": "altadefinizionehd", - "name": "AltadefinizioneHD", - "active": false, - "adult": false, - "language": ["ita"], - "thumbnail": "https://altadefinizione.doctor/wp-content/uploads/2019/02/logo.png", - "bannermenu": "https://altadefinizione.doctor/wp-content/uploads/2019/02/logo.png", - "categories": ["tvshow","movie"], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Includi in Ricerca Globale", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_peliculas", - "type": "bool", - "label": "Includi in Novità - Film", - "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_italiano", - "type": "bool", - "label": "Includi in Novità - Italiano", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "checklinks", - "type": "bool", - "label": "Verifica se i link esistono", - "default": false, - "enabled": true, - "visible": true - }, - { - "id": "checklinks_number", - "type": "list", - "label": "Numero de link da verificare", - "default": 1, - "enabled": true, - "visible": "eq(-1,true)", - "lvalues": [ "1", "3", "5", "10" ] - }, - { - "id": "filter_languages", - "type": "list", - "label": "Mostra link in lingua...", - "default": 0, - "enabled": true, - "visible": true, - "lvalues": ["Non filtrare","IT"] - } - ] -} diff --git a/channels/altadefinizionehd.py b/channels/altadefinizionehd.py deleted file mode 100644 index 08757113..00000000 --- a/channels/altadefinizionehd.py +++ /dev/null @@ -1,264 +0,0 @@ -# -*- coding: utf-8 -*- -# ------------------------------------------------------------ -# Canale per Altadefinizione HD -# ---------------------------------------------------------- -import re - -from channelselector import thumb -from core import httptools, scrapertools, servertools, tmdb -from core.item import Item -from platformcode import logger, config -from specials import autoplay - -__channel__ = 'altadefinizionehd' -host = config.get_channel_url(__channel__) - -headers = [['Referer', host]] - -list_servers = ['openload'] -list_quality = ['default'] - -def mainlist(item): - logger.info("[altadefinizionehd.py] mainlist") - - autoplay.init(item.channel, list_servers, list_quality) - - itemlist = [Item(channel=item.channel, - action="video", - title="[B]Film[/B]", - url=host + '/movies/', - thumbnail=NovitaThumbnail, - fanart=FilmFanart), - Item(channel=item.channel, - action="menu", - title="[B] > Film per Genere[/B]", - url=host, - extra='GENERE', - thumbnail=NovitaThumbnail, - fanart=FilmFanart), - Item(channel=item.channel, - action="menu", - title="[B] > Film per Anno[/B]", - url=host, - extra='ANNO', - thumbnail=NovitaThumbnail, - fanart=FilmFanart), - Item(channel=item.channel, - action="video", - title="Film Sub-Ita", - url=host + "/genre/sub-ita/", - thumbnail=NovitaThumbnail, - fanart=FilmFanart), - Item(channel=item.channel, - action="video", - title="Film Rip", - url=host + "/genre/dvdrip-bdrip-brrip/", - thumbnail=NovitaThumbnail, - fanart=FilmFanart), - Item(channel=item.channel, - action="video", - title="Film al Cinema", - url=host + "/genre/cinema/", - thumbnail=NovitaThumbnail, - fanart=FilmFanart), - Item(channel=item.channel, - action="search", - extra="movie", - title="[COLOR blue]Cerca Film...[/COLOR]", - thumbnail=CercaThumbnail, - fanart=FilmFanart)] - - autoplay.show_option(item.channel, itemlist) - - itemlist = thumb(itemlist) - - return itemlist - - -def menu(item): - logger.info("[altadefinizionehd.py] menu") - itemlist = [] - data = httptools.downloadpage(item.url, headers=headers).data - logger.info("[altadefinizionehd.py] DATA"+data) - patron = r'<li id="menu.*?><a href="#">FILM PER ' + item.extra + r'<\/a><ul class="sub-menu">(.*?)<\/ul>' - logger.info("[altadefinizionehd.py] BLOCK"+patron) - block = scrapertools.find_single_match(data, patron) - logger.info("[altadefinizionehd.py] BLOCK"+block) - patron = r'<li id=[^>]+><a href="(.*?)">(.*?)<\/a><\/li>' - matches = re.compile(patron, re.DOTALL).findall(block) - for url, title in matches: - itemlist.append( - Item(channel=item.channel, - action='video', - title=title, - url=url)) - return itemlist - - - -def newest(categoria): - logger.info("[altadefinizionehd.py] newest" + categoria) - itemlist = [] - item = Item() - try: - if categoria == "peliculas": - item.url = host - item.action = "video" - itemlist = video(item) - - if itemlist[-1].action == "video": - itemlist.pop() - - # Continua la ricerca in caso di errore - except: - import sys - for line in sys.exc_info(): - logger.error("{0}".format(line)) - return [] - - return itemlist - - -def video(item): - logger.info("[altadefinizionehd.py] video") - itemlist = [] - - data = httptools.downloadpage(item.url, headers=headers).data - logger.info("[altadefinizionehd.py] Data" +data) - if 'archive-content' in data: - regex = r'<div id="archive-content".*?>(.*?)<div class="pagination' - else: - regex = r'<div class="items".*?>(.*?)<div class="pagination' - block = scrapertools.find_single_match(data, regex) - logger.info("[altadefinizionehd.py] Block" +block) - - patron = r'<article .*?class="item movies">.*?<img src="([^"]+)".*?<span class="quality">(.*?)<\/span>.*?<a href="([^"]+)">.*?<h4>([^<]+)<\/h4>(.*?)<\/article>' - matches = re.compile(patron, re.DOTALL).findall(block) - - for scrapedthumb, scrapedquality, scrapedurl, scrapedtitle, scrapedinfo in matches: - title = scrapedtitle + " [" + scrapedquality + "]" - - patron = r'IMDb: (.*?)<\/span> <span>(.*?)<\/span>.*?"texto">(.*?)<\/div>' - matches = re.compile(patron, re.DOTALL).findall(scrapedinfo) - logger.info("[altadefinizionehd.py] MATCHES" + str(matches)) - for rating, year, plot in matches: - - infoLabels = {} - infoLabels['Year'] = year - infoLabels['Rating'] = rating - infoLabels['Plot'] = plot - itemlist.append( - Item(channel=item.channel, - action="findvideos", - contentType="movie", - title=title, - fulltitle=scrapedtitle, - infoLabels=infoLabels, - url=scrapedurl, - thumbnail=scrapedthumb)) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - patron = '<a class='+ "'arrow_pag'" + ' href="([^"]+)"' - next_page = scrapertools.find_single_match(data, patron) - if next_page != "": - itemlist.append( - Item(channel=item.channel, - action="video", - title="[COLOR blue]" + config.get_localized_string(30992) + "[/COLOR]", - url=next_page, - thumbnail=thumb())) - - return itemlist - - -def search(item, texto): - logger.info("[altadefinizionehd.py] init texto=[" + texto + "]") - item.url = host + "/?s=" + texto - return search_page(item) - -def search_page(item): - itemlist = [] - data = httptools.downloadpage(item.url, headers=headers).data - - patron = r'<img src="([^"]+)".*?.*?<a href="([^"]+)">(.*?)<\/a>' - matches = re.compile(patron, re.DOTALL).findall(data) - - for scrapedthumbnail, scrapedurl, scrapedtitle in matches: - scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle) - itemlist.append( - Item(channel=item.channel, - action="findvideos", - title=scrapedtitle, - fulltitle=scrapedtitle, - url=scrapedurl, - thumbnail=scrapedthumbnail)) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - patron = '<a class='+ "'arrow_pag'" + ' href="([^"]+)"' - next_page = scrapertools.find_single_match(data, patron) - if next_page != "": - itemlist.append( - Item(channel=item.channel, - action="search_page", - title="[COLOR blue]" + config.get_localized_string(30992) + "[/COLOR]", - url=next_page, - thumbnail=thumb())) - - return itemlist - - -def findvideos(item): - data = httptools.downloadpage(item.url).data - patron = r"<li id='player-.*?'.*?class='dooplay_player_option'\sdata-type='(.*?)'\sdata-post='(.*?)'\sdata-nume='(.*?)'>.*?'title'>(.*?)</" - matches = re.compile(patron, re.IGNORECASE).findall(data) - - itemlist = [] - - for scrapedtype, scrapedpost, scrapednume, scrapedtitle in matches: - itemlist.append( - Item(channel=item.channel, - action="play", - fulltitle=item.title + " [" + scrapedtitle + "]", - show=scrapedtitle, - title=item.title + " [COLOR blue][" + scrapedtitle + "][/COLOR]", - url=host + "/wp-admin/admin-ajax.php", - post=scrapedpost, - server=scrapedtitle, - nume=scrapednume, - type=scrapedtype, - extra=item.extra, - folder=True)) - - autoplay.start(itemlist, item) - - return itemlist - -def play(item): - import urllib - payload = urllib.urlencode({'action': 'doo_player_ajax', 'post': item.post, 'nume': item.nume, 'type': item.type}) - data = httptools.downloadpage(item.url, post=payload).data - - patron = r"<iframe.*src='(([^']+))'\s" - matches = re.compile(patron, re.IGNORECASE).findall(data) - - url = matches[0][0] - url = url.strip() - data = httptools.downloadpage(url, headers=headers).data - - itemlist = servertools.find_video_items(data=data) - - return itemlist - - - -NovitaThumbnail = "https://superrepo.org/static/images/icons/original/xplugin.video.moviereleases.png.pagespeed.ic.j4bhi0Vp3d.png" -GenereThumbnail = "https://farm8.staticflickr.com/7562/15516589868_13689936d0_o.png" -FilmFanart = "https://superrepo.org/static/images/fanart/original/script.artwork.downloader.jpg" -CercaThumbnail = "http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search" -CercaFanart = "https://i.ytimg.com/vi/IAlbvyBdYdY/maxresdefault.jpg" -ListTxt = "[COLOR orange]Torna a video principale [/COLOR]" -AvantiTxt = config.get_localized_string(30992) -AvantiImg = "http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png" -thumbnail = "http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png" diff --git a/channels/italiafilmhd.json b/channels/italiafilmhd.json deleted file mode 100644 index f64aa115..00000000 --- a/channels/italiafilmhd.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "id": "italiafilmhd", - "name": "ItaliaFilm HD", - "active": true, - "adult": false, - "language": ["ita"], - "thumbnail": "https://italiafilm.network/wp-content/uploads/2018/06/ITALIAFILM-HD.png", - "bannermenu": "https://italiafilm.network/wp-content/uploads/2018/06/ITALIAFILM-HD.png", - "categories": ["movie"], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Includi in ricerca globale", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "include_in_newest_peliculas", - "type": "bool", - "label": "Includi in Novità - Film", - "default": true, - "enabled": true, - "visible": true - - }, - { - "id": "include_in_newest_italiano", - "type": "bool", - "label": "Includi in Novità - Italiano", - "default": true, - "enabled": true, - "visible": true - }, - { - "id": "checklinks", - "type": "bool", - "label": "Verifica se i link esistono", - "default": false, - "enabled": true, - "visible": true - }, - { - "id": "checklinks_number", - "type": "list", - "label": "Numero di link da verificare", - "default": 1, - "enabled": true, - "visible": "eq(-1,true)", - "lvalues": [ "2", "5", "10", "15" ] - }, - { - "id": "filter_languages", - "type": "list", - "label": "Mostra link in lingua...", - "default": 0, - "enabled": true, - "visible": true, - "lvalues": ["Non filtrare","IT"] - } - ] -} diff --git a/channels/italiafilmhd.py b/channels/italiafilmhd.py deleted file mode 100644 index 67196dc7..00000000 --- a/channels/italiafilmhd.py +++ /dev/null @@ -1,364 +0,0 @@ -# -*- coding: utf-8 -*- -# ------------------------------------------------------------ -# Ringraziamo Icarus crew -# Canale per italiafilmhd -# ---------------------------------------------------------- -import re - -import urlparse - -from core import scrapertools, servertools, httptools, tmdb, support -from core.item import Item -from platformcode import logger, config -from specials import autoplay - -IDIOMAS = {'Italiano': 'IT'} -list_language = IDIOMAS.values() -list_servers = ['verystream', 'openload', 'youtube'] -list_quality = ['default'] - -checklinks = config.get_setting('checklinks', 'italiafilmhd') -checklinks_number = config.get_setting('checklinks_number', 'italiafilmhd') - -__channel__ = 'italiafilmhd' -host = config.get_channel_url(__channel__) -headers = [['Referer', host]] - - -def mainlist(item): - logger.info("kod.italiafilmhd mainlist") - - autoplay.init(item.channel, list_servers, list_quality) - - itemlist = [ - Item(channel=item.channel, - title="[COLOR azure]Novita'[/COLOR]", - action="fichas", - url=host + "/cinema/", - 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="[COLOR azure]Ultimi Film Inseriti[/COLOR]", - action="fichas", - url=host + "/film/", - 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="[COLOR azure]Film per Genere[/COLOR]", - action="genere", - url=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="Serie TV", - text_color="azure", - action="tv_series", - url="%s/serie-tv-hd/" % 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="[COLOR orange]Cerca...[/COLOR]", - action="search", - extra="movie", - thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")] - - autoplay.show_option(item.channel, itemlist) - - return itemlist - - -def newest(categoria): - logger.info("[italiafilmvideohd.py] newest" + categoria) - itemlist = [] - item = Item() - try: - if categoria == "film": - item.url = host + "/cinema/" - item.action = "fichas" - itemlist = fichas(item) - - if itemlist[-1].action == "fichas": - itemlist.pop() - - # Continua la ricerca in caso di errore - except: - import sys - for line in sys.exc_info(): - logger.error("{0}".format(line)) - return [] - - return itemlist - - -def search(item, texto): - logger.info("[italiafilmvideohd.py] " + item.url + " search " + texto) - - item.url = host + "/?s=" + texto - - try: - return fichas(item) - - # Continua la ricerca in caso di errore - except: - import sys - for line in sys.exc_info(): - logger.error("%s" % line) - return [] - - -def genere(item): - logger.info("[italiafilmvideohd.py] genere") - itemlist = [] - - data = httptools.downloadpage(item.url, headers=headers).data - - patron = '<div class="sub_title">Genere</div>(.+?)</div>' - data = scrapertools.find_single_match(data, patron) - - patron = '<li>.*?' - patron += 'href="([^"]+)".*?' - patron += '<i>([^"]+)</i>' - - matches = re.compile(patron, re.DOTALL).findall(data) - scrapertools.printMatches(matches) - - for scrapedurl, scrapedtitle in matches: - scrapedtitle = scrapedtitle.replace('&', '-') - itemlist.append( - Item(channel=item.channel, - action="fichas", - title=scrapedtitle, - url=scrapedurl, - folder=True)) - - return itemlist - - -def fichas(item): - logger.info("[italiafilmvideohd.py] fichas") - - itemlist = [] - - # Carica la pagina - data = httptools.downloadpage(item.url, headers=headers).data - # fix - calidad - - patron = '<li class="item">.*?' - patron += 'href="([^"]+)".*?' - patron += 'title="([^"]+)".*?' - patron += '<img src="([^"]+)".*?' - - matches = re.compile(patron, re.DOTALL).findall(data) - - for scraped_2, scrapedtitle, scrapedthumbnail in matches: - scrapedurl = scraped_2 - - title = scrapertools.decodeHtmlentities(scrapedtitle) - # title += " (" + scrapedcalidad + ") - - # ------------------------------------------------ - scrapedthumbnail = httptools.get_url_headers(scrapedthumbnail) - # ------------------------------------------------ - itemlist.append( - Item(channel=item.channel, - action="findvideos", - contentType="movie", - title=title, - url=scrapedurl, - thumbnail=scrapedthumbnail, - fulltitle=title, - show=scrapedtitle)) - - # Paginación - next_page = scrapertools.find_single_match(data, '<a href="([^"]+)"\s*><span aria-hidden="true">»') - - if next_page != "": - itemlist.append( - Item(channel=item.channel, - action="fichas", - title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]", - url=next_page, - text_color="orange", - thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png")) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - return itemlist - - -def tv_series(item): - logger.info("[italiafilmvideohd.py] tv_series") - itemlist = [] - - data = httptools.downloadpage(item.url, headers=headers).data - blocco = scrapertools.find_single_match(data, r'<ul class="list_mt">(.*?)</ul>') - patron = r'<a class="poster" href="([^"]+)" title="([^"]+)"[^>]*>\s*<img src="([^"]+)"[^>]+>' - matches = re.findall(patron, blocco, re.DOTALL) - - for scrapedurl, scrapedtitle, scrapedthumbnail in matches: - scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).strip() - - itemlist.append( - Item(channel=item.channel, - action="seasons", - contentType="tv", - title=scrapedtitle, - text_color="azure", - url=scrapedurl, - thumbnail=scrapedthumbnail, - fulltitle=scrapedtitle, - show=scrapedtitle)) - - # Pagine - next_page = scrapertools.find_single_match(data, '<a href="([^"]+)"\s*><span aria-hidden="true">»') - - if next_page != "": - itemlist.append( - Item(channel=item.channel, - action="fichas", - title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]", - text_color="orange", - url=next_page, - thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png")) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - return itemlist - - -def seasons(item): - logger.info("[italiafilmvideohd.py] seasons") - itemlist = [] - - data = httptools.downloadpage(item.url, headers=headers).data - url = scrapertools.find_single_match(data, - r'<div class="playerhdpass" id="playerhdpass">\s*[^>]+>\s*<iframe[^s]+src="([^"]+)"[^>]*></iframe>') - data = httptools.downloadpage(url, headers=headers).data - blocco = scrapertools.find_single_match(data, r'<h3>STAGIONE</h3>\s*<ul>(.*?)</ul>') - seasons = re.findall(r'<li[^>]*><a href="([^"]+)">([^<]+)</a></li>', blocco, re.DOTALL) - - for scrapedurl, season in seasons: - itemlist.append( - Item(channel=item.channel, - action="episodes", - contentType=item.contentType, - title="Stagione: %s" % season, - text_color="azure", - url="https://hdpass.net/%s" % scrapedurl, - thumbnail=item.thumbnail, - fulltitle=item.fulltitle, - show=item.show)) - - return itemlist - - -def episodes(item): - logger.info("[italiafilmvideohd.py] episodes") - itemlist = [] - - data = httptools.downloadpage(item.url, headers=headers).data - blocco = scrapertools.find_single_match(data, r'<section id="seasons">(.*?)</section>') - episodes = re.findall(r'<li[^>]*><a href="([^"]+)">([^<]+)</a></li>', blocco, re.DOTALL) - - for scrapedurl, episode in episodes: - itemlist.append( - Item(channel=item.channel, - action="findvid_series", - contentType=item.contentType, - title="Episodio: %s" % episode, - text_color="azure", - url="https://hdpass.net/%s" % scrapedurl, - thumbnail=item.thumbnail, - fulltitle=item.fulltitle, - show=item.show)) - - return itemlist - - -def findvideos(item): - logger.info("[italiafilmvideohd.py] findvideos") - - itemlist = [] - - # Carica la pagina - data = httptools.downloadpage(item.url, headers=headers).data - - patron = r'<div class="playerhdpass" id="playerhdpass"><iframe width=".+?" height=".+?" src="([^"]+)"' - url = scrapertools.find_single_match(data, patron) - - if url: - data += httptools.downloadpage(url, headers=headers).data - - itemlist = servertools.find_video_items(data=data) - for videoitem in itemlist: - videoitem.title = item.title + videoitem.title - videoitem.fulltitle = item.fulltitle - videoitem.thumbnail = item.thumbnail - videoitem.show = item.show - videoitem.plot = item.plot - videoitem.channel = item.channel - videoitem.contentType = item.contentType - videoitem.language = IDIOMAS['Italiano'] - - # Requerido para Filtrar enlaces - - if checklinks: - itemlist = servertools.check_list_links(itemlist, checklinks_number) - - # Requerido para FilterTools - - # itemlist = filtertools.get_links(itemlist, item, list_language) - - # Requerido para AutoPlay - - autoplay.start(itemlist, item) - - if item.contentType != 'episode': - if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos': - itemlist.append( - Item(channel=item.channel, title='[COLOR yellow][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url, - action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle)) - - return itemlist - - -def findvid_series(item): - logger.info("[italiafilmvideohd.py] findvideos") - - itemlist = [] - - # Carica la pagina - data = httptools.downloadpage(item.url, headers=headers).data.replace('\n', '') - patron = r'<iframe id="[^"]+" width="[^"]+" height="[^"]+" src="([^"]+)"[^>]+><\/iframe>' - url = scrapertools.find_single_match(data, patron).replace("?alta", "") - url = "https:" + url.replace("&download=1", "") - - data = httptools.downloadpage(url, headers=headers).data - - start = data.find('<div class="row mobileRes">') - end = data.find('<div id="playerFront">', start) - data = data[start:end] - - patron_res = '<div class="row mobileRes">(.*?)</div>' - patron_mir = '<div class="row mobileMirrs">(.*?)</div>' - patron_media = r'<input type="hidden" name="urlEmbed" data-mirror="([^"]+)" id="urlEmbed" value="([^"]+)"\s*/>' - - res = scrapertools.find_single_match(data, patron_res) - - urls = [] - for res_url, res_video in scrapertools.find_multiple_matches(res, '<option.*?value="([^"]+?)">([^<]+?)</option>'): - - data = httptools.downloadpage(urlparse.urljoin(url, res_url), headers=headers).data.replace('\n', '') - mir = scrapertools.find_single_match(data, patron_mir) - for mir_url in scrapertools.find_multiple_matches(mir, '<option.*?value="([^"]+?)">[^<]+?</value>'): - data = httptools.downloadpage(urlparse.urljoin(url, mir_url), headers=headers).data.replace('\n', '') - - for media_label, media_url in re.compile(patron_media).findall(data): - urls.append(support.url_decode(media_url)) - - itemlist = servertools.find_video_items(data='\n'.join(urls)) - for videoitem in itemlist: - server = re.sub(r'[-\[\]\s]+', '', videoitem.title) - videoitem.text_color = "azure" - videoitem.title = "".join(["[%s] " % ("[COLOR orange]%s[/COLOR]" % server.capitalize()), item.title]) - videoitem.fulltitle = item.fulltitle - videoitem.show = item.show - videoitem.thumbnail = item.thumbnail - videoitem.channel = item.channel - - return itemlist - From 09631d585fc358c3ccc2c9c90cf86842fffdec6f Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Tue, 5 Nov 2019 23:24:26 +0100 Subject: [PATCH 34/53] fix: servers/decrypters/zcrypt.py per i link vcript verso verystream --- servers/decrypters/zcrypt.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/servers/decrypters/zcrypt.py b/servers/decrypters/zcrypt.py index ad520aa8..a1f0e408 100644 --- a/servers/decrypters/zcrypt.py +++ b/servers/decrypters/zcrypt.py @@ -47,8 +47,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= data, status = unshortenit.unshorten(url) logger.info("Data - Status zcrypt xshield.net: [%s] [%s] " %(data, status)) elif 'vcrypt.net' in url: - if 'myfoldersakstream.php' in url: - continue #'very' in url or + if 'myfoldersakstream.php' in url or '/verys/' in url: continue else: from lib import unshortenit data, status = unshortenit.unshorten(url) From e5b6c0a7903e05a7d27ccc28b9351bee1a5bc875 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Tue, 5 Nov 2019 23:34:36 +0100 Subject: [PATCH 35/53] fix: servers/decrypters/zcrypt.py per i link rapidcript verso verystream --- servers/decrypters/zcrypt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/servers/decrypters/zcrypt.py b/servers/decrypters/zcrypt.py index a1f0e408..5372ea4a 100644 --- a/servers/decrypters/zcrypt.py +++ b/servers/decrypters/zcrypt.py @@ -47,7 +47,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= data, status = unshortenit.unshorten(url) logger.info("Data - Status zcrypt xshield.net: [%s] [%s] " %(data, status)) elif 'vcrypt.net' in url: - if 'myfoldersakstream.php' in url or '/verys/' in url: continue + if 'myfoldersakstream.php' in url or '/verys/' in url: + continue else: from lib import unshortenit data, status = unshortenit.unshorten(url) @@ -88,7 +89,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= for url in matches: if url not in encontrados: - if 'https://rapidcrypt.net/open/' in url: + if 'https://rapidcrypt.net/open/' in url or 'https://rapidcrypt.net/verys/' in url: continue logger.info(" url=" + url) encontrados.add(url) From 03eb2a0e9f0c1d4b8fa590d580b61e7f497679c6 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Wed, 6 Nov 2019 10:36:46 +0100 Subject: [PATCH 36/53] fix: channels/serietvonline.py --- channels/serietvonline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/channels/serietvonline.py b/channels/serietvonline.py index c92fbe3b..293f57c4 100644 --- a/channels/serietvonline.py +++ b/channels/serietvonline.py @@ -46,7 +46,7 @@ def mainlist(item): ('Aggiornamenti', ['/ultimi-episodi-aggiunti/', 'peliculas', 'update']), ('Tutte', ['/lista-serie-tv/', 'peliculas', 'qualcosa']), ('Italiane', ['/lista-serie-tv-italiane/', 'peliculas', 'qualcosa']), - ('Anni 50-60-70-80-90', ['/lista-serie-tv-anni-60-70-80/', 'peliculas', 'qualcosa']), + ('Anni 50-60-70-80', ['/lista-serie-tv-anni-60-70-80/', 'peliculas', 'qualcosa']), ('HD', ['/lista-serie-tv-in-altadefinizione/', 'peliculas', 'qualcosa']) ] @@ -63,7 +63,7 @@ def peliculas(item): support.log() #findhost() - blacklist = ['DMCA', 'Contatti', 'Attenzione NON FARTI OSCURARE', 'Lista Ccartoni Animati e Anime'] + blacklist = ['DMCA', 'Contatti', 'Attenzione NON FARTI OSCURARE', 'Lista Cartoni Animati e Anime'] patronBlock = r'<h1>.+?</h1>(?P<block>.*?)<div class="footer_c">' patronNext = r'<div class="siguiente"><a href="([^"]+)" >' @@ -111,7 +111,7 @@ def peliculas(item): else: #patronBlock = r'<h1>Ultimi film aggiunti</h1>(?P<block>.*?)<div class="footer_c">' - patron = r'<tr><td><a href="(?P<url>[^"]+)"(?:|.+?)?>(?:  )?[ ]?(?P<title>.*?)[ ]?(?:HD)?[ ]?(?P<year>\d+)?(?: | HD | Streaming | MD(?: iSTANCE)? )?</a>' + patron = r'<tr><td><a href="(?P<url>[^"]+)"(?:|.+?)?>(?:  )?[ ]?(?P<title>.*?)[ ]?(?P<quality>HD)?[ ]?(?P<year>\d+)?(?: | HD | Streaming | MD(?: iSTANCE)? )?</a>' def itemHook(item): if 'film' in item.url: From d8d2bb7111dd41d440192c03dfd85ecea58420b1 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Wed, 6 Nov 2019 15:25:42 +0100 Subject: [PATCH 37/53] fix /servers/wstream.py toppa...fino a domani! --- servers/wstream.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/servers/wstream.py b/servers/wstream.py index 3b808c8d..68ba13ad 100644 --- a/servers/wstream.py +++ b/servers/wstream.py @@ -51,8 +51,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= return video_urls else: - page_urls = scrapertools.find_multiple_matches(data, '''<a href=(?:"|')([^"']+)(?:"|')''') + page_urls = scrapertools.find_multiple_matches(data, '''<input type='hidden' id='videox' name='videox' value='([^']+)'>''') for page_url in page_urls: + page_url = 'https://wstream.video/video5rqlew27k/'+page_url if '404 Not Found' not in httptools.downloadpage(page_url, headers=headers).data.replace('https', 'http'): return get_video_url(page_url) @@ -77,4 +78,4 @@ def find_videos(data): else: logger.info(" url duplicada=" + url) - return devuelve \ No newline at end of file + return devuelve From 2835da67e5700e5bd04df26d4d5391228e3c286b Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Wed, 6 Nov 2019 16:35:33 +0100 Subject: [PATCH 38/53] fix: serietvonline.py --- channels/serietvonline.py | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/channels/serietvonline.py b/channels/serietvonline.py index 293f57c4..647b804a 100644 --- a/channels/serietvonline.py +++ b/channels/serietvonline.py @@ -3,15 +3,17 @@ # Canale per serietvonline.py # ---------------------------------------------------------- """ - Novità. Indicare in quale/i sezione/i è presente il canale: - film, serie Avvisi: - Al massimo 25 titoli per le sezioni: Film - Al massimo 35 titoli per le sezioni: Tutte le altre - - + Per aggiungere in videoteca le Anime: + Se hanno la forma 1x01: + -si posso aggiungere direttamente dalla pagina della serie, sulla voce in fondo "aggiungi in videoteca". + Altrimenti: + - Prima fare la 'Rinumerazione' dal menu contestuale dal titolo della serie """ import re from core import support, httptools, scrapertoolsV2 @@ -67,31 +69,14 @@ def peliculas(item): patronBlock = r'<h1>.+?</h1>(?P<block>.*?)<div class="footer_c">' patronNext = r'<div class="siguiente"><a href="([^"]+)" >' -## if 'film' in item.url: -## contentType = 'movie' -## action = 'findvideos' -## else: -## contentType = 'tvshow' -## action = 'episodios' - if item.args == 'search': patronBlock = r'>Lista Serie Tv</a></li></ul></div><div id="box_movies">(?P<block>.*?)<div id="paginador">' patron = r'<div class="movie">[^>]+[^>]+>\s?<img src="(?P<thumb>[^"]+)" alt="(?P<title>.+?)\s?(?P<year>[\d\-]+)?"[^>]+>\s?<a href="(?P<url>[^"]+)">' - -## def itemHook(item): -## if 'film' in item.url: -## item.action = 'findvideos' -## item.contentType = 'movie' -## else: -## item.contentType = 'tvshow' -## 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 @@ -99,8 +84,8 @@ def peliculas(item): if not item.args and 'anime' not in item.url: 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: + anime = True patron = r'(?:<td>)?<a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>[^<]+)(?P<episode>[\d\-x]+)?(?P<title2>[^<]+)?<' - else: # SEZIONE FILM pagination = 25 @@ -108,7 +93,6 @@ def peliculas(item): if item.args == 'lista': patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)[ ]?(?P<year>\d+)?(?: Streaming | MD iSTANCE )?<' patronBlock = r'Lista dei film disponibili in streaming e anche in download\.</p>(?P<block>.*?)<div class="footer_c">' - else: #patronBlock = r'<h1>Ultimi film aggiunti</h1>(?P<block>.*?)<div class="footer_c">' patron = r'<tr><td><a href="(?P<url>[^"]+)"(?:|.+?)?>(?:  )?[ ]?(?P<title>.*?)[ ]?(?P<quality>HD)?[ ]?(?P<year>\d+)?(?: | HD | Streaming | MD(?: iSTANCE)? )?</a>' @@ -136,7 +120,7 @@ def episodios(item): action = 'findvideos' patronBlock = r'<table>(?P<block>.*?)<\/table>' - patron = r'<tr><td>(?:[^<]+)[ ](?:Parte)?(?P<episode>\d+x\d+)(?:|[ ]?(?P<title2>.+?)?(?:avi)?)<(?P<url>.*?)</td><tr>' + patron = r'<tr><td>(?:[^<]+)[ ](?:Parte)?(?P<episode>\d+x\d+|\d+)(?:|[ ]?(?P<title2>.+?)?(?:avi)?)<(?P<url>.*?)</td><tr>' #debug = True return locals() From 1ba419de437e5c0c8e5041af38d69675c9e078ba Mon Sep 17 00:00:00 2001 From: mac12m99 <m.toma99@gmail.com> Date: Wed, 6 Nov 2019 18:32:05 +0100 Subject: [PATCH 39/53] aggiunto server supervideo e disabilitato streamtime --- channels/streamtime.json | 2 +- servers/supervideo.json | 46 ++++++++++++++++++++++++++++++++++++++++ servers/supervideo.py | 34 +++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 servers/supervideo.json create mode 100644 servers/supervideo.py diff --git a/channels/streamtime.json b/channels/streamtime.json index bc3f7a12..c0a8b2e6 100644 --- a/channels/streamtime.json +++ b/channels/streamtime.json @@ -2,7 +2,7 @@ "id": "streamtime", "name": "StreamTime", "language": ["ita"], - "active": true, + "active": false, "adult": false, "thumbnail": "", "banner": "streamtime.png", diff --git a/servers/supervideo.json b/servers/supervideo.json new file mode 100644 index 00000000..8b2a5304 --- /dev/null +++ b/servers/supervideo.json @@ -0,0 +1,46 @@ +{ + "active": true, + "find_videos": { + "ignore_urls": [], + "patterns": [ + { + "pattern": "supervideo.tv/embed-([a-z0-9]{12}).html", + "url": "https://supervideo.tv/embed-\\1.html" + }, + { + "pattern": "supervideo.tv/([a-z0-9]{12})", + "url": "https://supervideo.tv/embed-\\1.html" + } + ] + }, + "free": true, + "id": "supervideo", + "name": "SuperVideo", + "settings": [ + { + "default": false, + "enabled": true, + "id": "black_list", + "label": "@60654", + "type": "bool", + "visible": true + }, + { + "default": 0, + "enabled": true, + "id": "favorites_servers_list", + "label": "@60655", + "lvalues": [ + "No", + "1", + "2", + "3", + "4", + "5" + ], + "type": "list", + "visible": false + } + ], + "thumbnail": "https://supervideo.tv/images/logo-player.png" +} diff --git a/servers/supervideo.py b/servers/supervideo.py new file mode 100644 index 00000000..48eea092 --- /dev/null +++ b/servers/supervideo.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +from core import httptools +from core import scrapertoolsV2 +from lib import jsunpack +from platformcode import config, logger +import ast + + +def test_video_exists(page_url): + logger.info("(page_url='%s')" % page_url) + + data = httptools.downloadpage(page_url, cookies=False).data + if 'File Not Found' in data: + return False, config.get_localized_string(70449) % "SuperVideo" + + return True, "" + + +def get_video_url(page_url, premium=False, user="", password="", video_password=""): + logger.info("url=" + page_url) + video_urls = [] + data = httptools.downloadpage(page_url).data + code = jsunpack.unpack(scrapertoolsV2.find_single_match(data, "<script type='text/javascript'>(eval.*)")) + match = scrapertoolsV2.find_single_match(code, 'sources:(\[[^]]+\])') + lSrc = ast.literal_eval(match) + + lQuality = ['360p', '720p', '1080p', '4k'][:len(lSrc)-1] + lQuality.reverse() + + for n, source in enumerate(lSrc): + quality = 'auto' if n==0 else lQuality[n-1] + video_urls.append(['.' + source.split('.')[-1] + '(' + quality + ') [SuperVideo]', source]) + return video_urls From d108142470c1440dc2910d5645a97c0fb1761fb2 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Wed, 6 Nov 2019 19:39:15 +0100 Subject: [PATCH 40/53] fix: lib/unshortenit.py per link vcrypt --- lib/unshortenit.py | 80 ++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/lib/unshortenit.py b/lib/unshortenit.py index 8928247e..854ea15b 100644 --- a/lib/unshortenit.py +++ b/lib/unshortenit.py @@ -469,47 +469,51 @@ class UnshortenIt(object): def _unshorten_vcrypt(self, uri): - r = None - import base64, pyaes + try: + r = None + import base64, pyaes - def decrypt(str): - str = str.replace("_ppl_", "+").replace("_eqq_", "=").replace("_sll_", "/") - iv = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - key = "naphajU2usWUswec" - decoded = base64.b64decode(str) - decoded = decoded + '\0' * (len(decoded) % 16) - crypt_object = pyaes.AESModeOfOperationCBC(key, iv) - decrypted = '' - for p in range(0, len(decoded), 16): - decrypted += crypt_object.decrypt(decoded[p:p + 16]).replace('\0', '') - return decrypted - if 'shield' in uri.split('/')[-2]: - uri = decrypt(uri.split('/')[-1]) - else: - import datetime, hashlib - ip = urllib.urlopen('http://ip.42.pl/raw').read() - day = datetime.date.today().strftime('%Y%m%d') - headers = { - "Cookie": hashlib.md5(ip+day).hexdigest() + "=1" - } - uri = uri.replace('sb/', 'sb1/') - uri = uri.replace('akv/', 'akv1/') - uri = uri.replace('wss/', 'wss1/') - uri = uri.replace('wsd/', 'wsd1/') - r = httptools.downloadpage(uri, timeout=self._timeout, headers=headers, follow_redirects=False) - if 'Wait 1 hour' in r.data: - uri = '' - logger.info('IP bannato da vcrypt, aspetta un ora') - else: - uri = r.headers['location'] - - if "4snip" in uri: - if 'out_generator' in uri: - uri = re.findall('url=(.*)$', uri)[0] - elif '/decode/' in uri: + def decrypt(str): + str = str.replace("_ppl_", "+").replace("_eqq_", "=").replace("_sll_", "/") + iv = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + key = "naphajU2usWUswec" + decoded = base64.b64decode(str) + decoded = decoded + '\0' * (len(decoded) % 16) + crypt_object = pyaes.AESModeOfOperationCBC(key, iv) + decrypted = '' + for p in range(0, len(decoded), 16): + decrypted += crypt_object.decrypt(decoded[p:p + 16]).replace('\0', '') + return decrypted + if 'shield' in uri.split('/')[-2]: uri = decrypt(uri.split('/')[-1]) + else: + import datetime, hashlib + ip = urllib.urlopen('http://ip.42.pl/raw').read() + day = datetime.date.today().strftime('%Y%m%d') + headers = { + "Cookie": hashlib.md5(ip+day).hexdigest() + "=1" + } + uri = uri.replace('sb/', 'sb1/') + uri = uri.replace('akv/', 'akv1/') + uri = uri.replace('wss/', 'wss1/') + uri = uri.replace('wsd/', 'wsd1/') + r = httptools.downloadpage(uri, timeout=self._timeout, headers=headers, follow_redirects=False) + if 'Wait 1 hour' in r.data: + uri = '' + logger.info('IP bannato da vcrypt, aspetta un ora') + else: + uri = r.headers['location'] - return uri, r.code if r else 200 + if "4snip" in uri: + if 'out_generator' in uri: + uri = re.findall('url=(.*)$', uri)[0] + elif '/decode/' in uri: + uri = decrypt(uri.split('/')[-1]) + + return uri, r.code if r else 200 + except Exception as e: + return uri, str(e) + def unwrap_30x_only(uri, timeout=10): unshortener = UnshortenIt() From 081c77c5e8282212fa1f9fb52ca0567187a05deb Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Wed, 6 Nov 2019 20:03:12 +0100 Subject: [PATCH 41/53] Nuove Definizioni per Generi --- channelselector.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/channelselector.py b/channelselector.py index 0da1ce9a..4734867f 100644 --- a/channelselector.py +++ b/channelselector.py @@ -361,11 +361,11 @@ def thumb(itemlist=[], genre=False): 'channels_adventure': ['avventura', 'adventure'], 'channels_biographical':['biografico'], 'channels_comedy':['comico','commedia', 'demenziale', 'comedy'], - 'channels_adult':['erotico', 'hentai'], + 'channels_adult':['erotico', 'hentai', 'harem', 'ecchi'], 'channels_drama':['drammatico', 'drama'], 'channels_syfy':['fantascienza', 'science fiction'], - 'channels_fantasy':['fantasy'], - 'channels_crime':['gangster','poliziesco', 'crime'], + 'channels_fantasy':['fantasy', 'magia'], + 'channels_crime':['gangster','poliziesco', 'crime', 'crimine'], 'channels_grotesque':['grottesco'], 'channels_war':['guerra', 'war'], 'channels_children':['bambini', 'kids'], From 24e75e73b2fbae33ff3f9df028a63a7ede671c74 Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Wed, 6 Nov 2019 20:03:31 +0100 Subject: [PATCH 42/53] Riscritto AnimeTubeITA --- channels/animetubeita.json | 37 +-- channels/animetubeita.py | 446 +++++++++---------------------------- 2 files changed, 116 insertions(+), 367 deletions(-) diff --git a/channels/animetubeita.json b/channels/animetubeita.json index a4374457..afb108c2 100644 --- a/channels/animetubeita.json +++ b/channels/animetubeita.json @@ -1,36 +1,11 @@ { "id": "animetubeita", - "name": "Animetubeita", + "name": "AnimeTubeITA", "active": true, "adult": false, - "language": ["ita"], - "thumbnail": "http:\/\/i.imgur.com\/rQPx1iQ.png", - "bannermenu": "http:\/\/i.imgur.com\/rQPx1iQ.png", - "categories": ["anime"], - "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "Includi ricerca globale", - "default": false, - "enabled": false, - "visible": false - }, - { - "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 - } - ] + "language": ["sub-ita"], + "thumbnail": "animetubeita.png", + "bannermenu": "animetubeita.png", + "categories": ["anime","vos"], + "settings": [] } diff --git a/channels/animetubeita.py b/channels/animetubeita.py index d261c048..4f100a76 100644 --- a/channels/animetubeita.py +++ b/channels/animetubeita.py @@ -1,364 +1,138 @@ # -*- coding: utf-8 -*- -# ------------------------------------------------------------ -# Ringraziamo Icarus crew +# ---------------------------------------------------------- # Canale per animetubeita # ---------------------------------------------------------- import re import urllib - -from core import httptools, scrapertools, tmdb -from core.item import Item -from platformcode import logger, config +from core import support __channel__ = "animetubeita" -host = config.get_channel_url(__channel__) -hostlista = host + "/lista-anime/" -hostgeneri = host + "/generi/" -hostcorso = host + "/category/serie-in-corso/" +host = support.config.get_channel_url(__channel__) - -def mainlist(item): - log("animetubeita", "mainlist", item.channel) - itemlist = [Item(channel=item.channel, - action="lista_home", - title="[COLOR azure]Home[/COLOR]", - url=host, - thumbnail=AnimeThumbnail, - fanart=AnimeFanart), - # Item(channel=item.channel, - # action="lista_anime", - # title="[COLOR azure]A-Z[/COLOR]", - # url=hostlista, - # thumbnail=AnimeThumbnail, - # fanart=AnimeFanart), - Item(channel=item.channel, - action="lista_genere", - title="[COLOR azure]Genere[/COLOR]", - url=hostgeneri, - thumbnail=CategoriaThumbnail, - fanart=CategoriaFanart), - Item(channel=item.channel, - action="lista_in_corso", - title="[COLOR azure]Serie in Corso[/COLOR]", - url=hostcorso, - thumbnail=CategoriaThumbnail, - fanart=CategoriaFanart), - Item(channel=item.channel, - action="search", - title="[COLOR lime]Cerca...[/COLOR]", - url=host + "/?s=", - thumbnail=CercaThumbnail, - fanart=CercaFanart)] - return itemlist - - - -def lista_home(item): - log("animetubeita", "lista_home", item.channel) - - itemlist = [] - - patron = '<h2 class="title"><a href="(.*?)" rel="bookmark" title=".*?">.*?<img.*?src="(.*?)".*?<strong>Titolo</strong></td>.*?<td>(.*?)</td>.*?<td><strong>Trama</strong></td>.*?<td>(.*?)</' - for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedplot in scrapedAll(item.url, patron): - title = scrapertools.decodeHtmlentities(scrapedtitle) - title = title.split("Sub")[0] - fulltitle = re.sub(r'[Ee]pisodio? \d+', '', title) - scrapedplot = scrapertools.decodeHtmlentities(scrapedplot) - itemlist.append( - Item(channel=item.channel, - action="dl_s", - contentType="tvshow", - title="[COLOR azure]" + title + "[/COLOR]", - fulltitle=fulltitle, - url=scrapedurl, - thumbnail=scrapedthumbnail, - fanart=scrapedthumbnail, - show=fulltitle, - plot=scrapedplot)) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - # Paginazione - # =========================================================== - data = httptools.downloadpage(item.url).data - patron = '<link rel="next" href="(.*?)"' - next_page = scrapertools.find_single_match(data, patron) - if next_page != "": - itemlist.append( - Item(channel=item.channel, - action="lista_home", - title=AvantiTxt, - url=next_page, - thumbnail=AvantiImg, - folder=True)) - # =========================================================== - return itemlist - - - -# def lista_anime(item): -# log("animetubeita", "lista_anime", item.channel) - -# itemlist = [] - -# patron = '<li.*?class="page_.*?href="(.*?)">(.*?)</a></li>' -# for scrapedurl, scrapedtitle in scrapedAll(item.url, patron): -# title = scrapertools.decodeHtmlentities(scrapedtitle) -# title = title.split("Sub")[0] -# log("url:[" + scrapedurl + "] scrapedtitle:[" + title + "]") -# itemlist.append( -# Item(channel=item.channel, -# action="dettaglio", -# contentType="tvshow", -# title="[COLOR azure]" + title + "[/COLOR]", -# url=scrapedurl, -# show=title, -# thumbnail="", -# fanart="")) - -# tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - -# return itemlist - - - -def lista_genere(item): - log("lista_anime_genere", "lista_genere", item.channel) - itemlist = [] - - data = httptools.downloadpage(item.url).data - - bloque = scrapertools.find_single_match(data, - '<div class="hentry page post-1 odd author-admin clear-block">(.*?)<div id="disqus_thread">') - - patron = '<li class="cat-item cat-item.*?"><a href="(.*?)" >(.*?)</a>' - matches = re.compile(patron, re.DOTALL).findall(bloque) - scrapertools.printMatches(matches) - - for scrapedurl, scrapedtitle in matches: - itemlist.append( - Item(channel=item.channel, - action="lista_generi", - title='[COLOR lightsalmon][B]' + scrapedtitle + '[/B][/COLOR]', - url=scrapedurl, - fulltitle=scrapedtitle, - show=scrapedtitle, - thumbnail=item.thumbnail)) - - return itemlist - - - -def lista_generi(item): - log("animetubeita", "lista_generi", item.channel) - - itemlist = [] - patron = '<h2 class="title"><a href="(.*?)" rel="bookmark" title=".*?">.*?<img.*?src="(.*?)".*?<strong>Titolo</strong></td>.*?<td>(.*?)</td>.*?<td><strong>Trama</strong></td>.*?<td>(.*?)</' - for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedplot in scrapedAll(item.url, patron): - title = scrapertools.decodeHtmlentities(scrapedtitle) - title = title.split("Sub")[0] - fulltitle = re.sub(r'[Ee]pisodio? \d+', '', title) - scrapedplot = scrapertools.decodeHtmlentities(scrapedplot) - itemlist.append( - Item(channel=item.channel, - action="dettaglio", - title="[COLOR azure]" + title + "[/COLOR]", - contentType="tvshow", - fulltitle=fulltitle, - url=scrapedurl, - thumbnail=scrapedthumbnail, - show=fulltitle, - fanart=scrapedthumbnail, - plot=scrapedplot)) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - # Paginazione - # =========================================================== - data = httptools.downloadpage(item.url).data - patron = '<link rel="next" href="(.*?)"' - next_page = scrapertools.find_single_match(data, patron) - if next_page != "": - itemlist.append( - Item(channel=item.channel, - action="lista_generi", - title=AvantiTxt, - url=next_page, - thumbnail=AvantiImg, - folder=True)) - # =========================================================== - - - return itemlist - - - -def lista_in_corso(item): - log("animetubeita", "lista_home", item.channel) - - itemlist = [] - - patron = '<h2 class="title"><a href="(.*?)" rel="bookmark" title="Link.*?>(.*?)</a></h2>.*?<img.*?src="(.*?)".*?<td><strong>Trama</strong></td>.*?<td>(.*?)</td>' - for scrapedurl, scrapedtitle, scrapedthumbnail, scrapedplot in scrapedAll(item.url, patron): - title = scrapertools.decodeHtmlentities(scrapedtitle) - title = title.split("Sub")[0] - fulltitle = re.sub(r'[Ee]pisodio? \d+', '', title) - scrapedplot = scrapertools.decodeHtmlentities(scrapedplot) - itemlist.append( - Item(channel=item.channel, - action="dettaglio", - title="[COLOR azure]" + title + "[/COLOR]", - contentType="tvshow", - fulltitle=fulltitle, - url=scrapedurl, - thumbnail=scrapedthumbnail, - show=fulltitle, - fanart=scrapedthumbnail, - plot=scrapedplot)) - - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - - # Paginazione - # =========================================================== - data = httptools.downloadpage(item.url).data - patron = '<link rel="next" href="(.*?)"' - next_page = scrapertools.find_single_match(data, patron) - if next_page != "": - itemlist.append( - Item(channel=item.channel, - action="lista_in_corso", - title=AvantiTxt, - url=next_page, - thumbnail=AvantiImg, - folder=True)) - # =========================================================== - return itemlist - - - -def dl_s(item): - log("animetubeita", "dl_s", item.channel) - - itemlist = [] - encontrados = set() - - # 1 - patron = '<p><center><a.*?href="(.*?)"' - for scrapedurl in scrapedAll(item.url, patron): - if scrapedurl in encontrados: continue - encontrados.add(scrapedurl) - title = "DOWNLOAD & STREAMING" - itemlist.append(Item(channel=item.channel, - action="dettaglio", - title="[COLOR azure]" + title + "[/COLOR]", - url=scrapedurl, - thumbnail=item.thumbnail, - fanart=item.thumbnail, - plot=item.plot, - folder=True)) - # 2 - patron = '<p><center>.*?<a.*?href="(.*?)"' - for scrapedurl in scrapedAll(item.url, patron): - if scrapedurl in encontrados: continue - encontrados.add(scrapedurl) - title = "DOWNLOAD & STREAMING" - itemlist.append(Item(channel=item.channel, - action="dettaglio", - title="[COLOR azure]" + title + "[/COLOR]", - url=scrapedurl, - thumbnail=item.thumbnail, - fanart=item.thumbnail, - plot=item.plot, - folder=True)) - - return itemlist - - - -def dettaglio(item): - log("animetubeita", "dettaglio", item.channel) - - itemlist = [] - headers = {'Upgrade-Insecure-Requests': '1', +headers = {'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0'} - episodio = 1 - patron = r'<a href="http:\/\/link[^a]+animetubeita[^c]+com\/[^\/]+\/[^s]+((?:stream|strm))[^p]+php(\?.*?)"' - for phpfile, scrapedurl in scrapedAll(item.url, patron): - title = "Episodio " + str(episodio) - episodio += 1 - url = "%s/%s.php%s" % (host, phpfile, scrapedurl) - headers['Referer'] = url - data = httptools.downloadpage(url, headers=headers).data - # ------------------------------------------------ - cookies = "" - matches = re.compile('(.animetubeita.com.*?)\n', re.DOTALL).findall(config.get_cookie_data()) - for cookie in matches: - name = cookie.split('\t')[5] - value = cookie.split('\t')[6] - cookies += name + "=" + value + ";" - headers['Cookie'] = cookies[:-1] - # ------------------------------------------------ - url = scrapertools.find_single_match(data, """<source src="([^"]+)" type='video/mp4'>""") - url += '|' + urllib.urlencode(headers) - itemlist.append(Item(channel=item.channel, - action="play", - title="[COLOR azure]" + title + "[/COLOR]", - url=url, - thumbnail=item.thumbnail, - fanart=item.thumbnail, - plot=item.plot)) +list_servers = ['directo'] +list_quality = ['default'] - return itemlist +@support.menu +def mainlist(item): + anime = [('Generi',['/generi', 'genres', 'genres']), + ('Ordine Alfabetico',['/lista-anime', 'peliculas', 'list']), + ('In Corso',['/category/serie-in-corso/', 'peliculas', 'in_progress']) + ] + return locals() + +@support.scrape +def genres(item): + blacklist = ['Ultimi Episodi', 'Serie in Corso'] + patronMenu = r'<li[^>]+><a href="(?P<url>[^"]+)" >(?P<title>[^<]+)</a>' + action = 'peliculas' + return locals() - -def search(item, texto): - log("animetubeita", "search", item.channel) - item.url = item.url + texto - +def search(item, text): + support.log(text) + item.url = host + '/lista-anime' + item.args = 'list' + item.search = text try: - return lista_home(item) + return peliculas(item) except: import sys for line in sys.exc_info(): - logger.error("%s" % line) + support.logger.error("%s" % line) return [] - -def scrapedAll(url="", patron=""): - matches = [] - data = httptools.downloadpage(url).data - MyPatron = patron - matches = re.compile(MyPatron, re.DOTALL).findall(data) - scrapertools.printMatches(matches) - - return matches +def newest(categoria): + support.log(categoria) + item = support.Item() + try: + if categoria == "anime": + item.contentType='tvshow' + item.url = host + item.args = "last" + return peliculas(item) + # Continua la ricerca in caso di errore + except: + import sys + for line in sys.exc_info(): + support.logger.error("{0}".format(line)) + return [] +@support.scrape +def peliculas(item): + anime = True + if not item.search: pagination = '' + action = 'episodios' -def scrapedSingle(url="", single="", patron=""): - matches = [] - data = httptools.downloadpage(url).data - elemento = scrapertools.find_single_match(data, single) - matches = re.compile(patron, re.DOTALL).findall(elemento) - scrapertools.printMatches(matches) - - return matches + if item.args == 'list': + search = item.search + patronBlock = r'<ul class="page-list ">(?P<block>.*?)<div class="wprc-container' + patron = r'<li.*?class="page_.*?href="(?P<url>[^"]+)">(?P<title>.*?) Sub Ita' + elif item.args == 'last': + action = 'findvideos' + item.contentType='episode' + patronBlock = r'<div class="blocks">(?P<block>.*?)<div id="sidebar' + patron = r'<h2 class="title"><a href="(?P<url>[^"]+)" [^>]+>.*?<img.*?src="(?P<thumb>[^"]+)".*?<strong>Titolo</strong></td>.*?<td>(?P<title>.*?)\s*Episodio\s*(?P<episode>\d+)[^<]+</td>.*?<td><strong>Trama</strong></td>\s*<td>(?P<plot>[^<]+)<' + elif item.args in ['in_progress','genres']: + patronBlock = r'<div class="blocks">(?P<block>.*?)<div id="sidebar' + patron = r'<h2 class="title"><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)\s* Sub Ita[^<]+</a></h2>.*?<img.*?src="(?P<thumb>.*?)".*?<td><strong>Trama</strong></td>.*?<td>(?P<plot>[^<]+)<' + patronNext = r'href="([^"]+)" >»' + else: + patronBlock = r'<div class="blocks">(?P<block>.*?)<div id="sidebar' + patron = r'<img.*?src="(?P<thumb>[^"]+)".*?<strong>Titolo</strong></td>.*?<td>\s*(?P<title>.*?)\s*Episodio[^<]+</td>.*?<td><strong>Trama</strong></td>\s*<td>(?P<plot>[^<]+)<.*?<a.*?href="(?P<url>[^"]+)"' + patronNext = r'href="([^"]+)" >»' + return locals() - -def log(funzione="", stringa="", canale=""): - logger.debug("[" + canale + "].[" + funzione + "] " + stringa) +@support.scrape +def episodios(item): + patronBlock = r'<h6>Episodio</h6>(?P<block>.*?)(?:<!--|</table>)' + patron = r'<strong>(?P<title>[^<]+)</strong>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="http://link\.animetubeita\.com/2361078/(?P<url>[^"]+)"' + action = 'findvideos' + return locals() +def findvideos(item): + itemlist=[] + if item.args == 'last': + match = support.match(item, r'href="(?P<url>[^"]+)"[^>]+><strong>DOWNLOAD & STREAMING</strong>', url=item.url)[0] + if match: + patronBlock = r'<h6>Episodio</h6>(?P<block>.*?)(?:<!--|</table>)' + patron = r'<a href="http://link\.animetubeita\.com/2361078/(?P<url>[^"]+)"' + match = support.match(item, patron, patronBlock, headers, match[0])[0] + else: return itemlist -AnimeThumbnail = "http://img15.deviantart.net/f81c/i/2011/173/7/6/cursed_candies_anime_poster_by_careko-d3jnzg9.jpg" -AnimeFanart = "http://www.animetubeita.com/wp-content/uploads/21407_anime_scenery.jpg" -CategoriaThumbnail = "http://static.europosters.cz/image/750/poster/street-fighter-anime-i4817.jpg" -CategoriaFanart = "http://www.animetubeita.com/wp-content/uploads/21407_anime_scenery.jpg" -CercaThumbnail = "http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search" -CercaFanart = "https://i.ytimg.com/vi/IAlbvyBdYdY/maxresdefault.jpg" -AvantiTxt = config.get_localized_string(30992) -AvantiImg = "http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png" + if match: item.url = match[-1] + else: return itemlist + data = support.httptools.downloadpage(item.url, headers=headers).data + cookies = "" + matches = re.compile('(.animetubeita.com.*?)\n', re.DOTALL).findall(support.config.get_cookie_data()) + for cookie in matches: + name = cookie.split('\t')[5] + value = cookie.split('\t')[6] + cookies += name + "=" + value + ";" + + headers['Referer'] = item.url + headers['Cookie'] = cookies[:-1] + + url = support.scrapertoolsV2.find_single_match(data, """<source src="([^"]+)" type='video/mp4'>""") + if not url: url = support.scrapertoolsV2.find_single_match(data, 'file: "([^"]+)"') + if url: + url += '|' + urllib.urlencode(headers) + itemlist.append( + support.Item(channel=item.channel, + action="play", + title='diretto', + server='directo', + quality='', + url=url, + thumbnail=item.thumbnail, + fulltitle=item.fulltitle, + show=item.show, + contentType=item.contentType, + folder=False)) + return support.server(item, itemlist=itemlist) \ No newline at end of file From aa4b2d2f6ba06afaf35cbaaba5c39be073261a68 Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Wed, 6 Nov 2019 20:21:46 +0100 Subject: [PATCH 43/53] Fix Link Disattivati --- channels/cineblog01.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/cineblog01.py b/channels/cineblog01.py index bb10c29a..2b9a2c8b 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -200,7 +200,7 @@ def findvideos(item): def findvid_serie(item): def load_vid_series(html, item, itemlist, blktxt): logger.info('HTML' + html) - patron = '<a href="([^"]+)"[^=]+="_blank"[^>]+>(.*?)</a>' + patron = r'<a href="([^"]+)"[^=]+="_blank"[^>]+>(?!<!--)(.*?)</a>' # Estrae i contenuti matches = re.compile(patron, re.DOTALL).finditer(html) for match in matches: From c3bf4eac2d0b7e0b9cc6f2232ccccfb6519f31c8 Mon Sep 17 00:00:00 2001 From: mac12m99 <m.toma99@gmail.com> Date: Wed, 6 Nov 2019 20:58:15 +0100 Subject: [PATCH 44/53] fix wstream --- servers/wstream.json | 8 +++--- servers/wstream.py | 60 +++++++++++++------------------------------- 2 files changed, 21 insertions(+), 47 deletions(-) diff --git a/servers/wstream.json b/servers/wstream.json index 359a6bc0..2b934bbc 100644 --- a/servers/wstream.json +++ b/servers/wstream.json @@ -8,19 +8,19 @@ "patterns": [ { "pattern":"wstream.video\/(api\/vcmod\/fastredirect\/streaming.php\\?id=[0-9a-zA-Z]+)", - "url": "http:\/\/wstream.video\/\\1" + "url": "https://wstream.video/video.php?file_code=\\1" }, { "pattern": "wstream\\.video/video\\.php\\?file_code=([a-z0-9A-Z]+)", - "url": "http:\/\/wstream.video\/\\1" + "url": "https://wstream.video/video.php?file_code=\\1" }, { "pattern": "wstream\\.video\/(?:embed-|videos/|video/|videow/|videoj/)([a-z0-9A-Z]+)", - "url": "http:\/\/wstream.video\/\\1" + "url": "https://wstream.video/video.php?file_code=\\1" }, { "pattern": "wstream\\.video\/(?!api/)([a-z0-9A-Z]+)", - "url": "http:\/\/wstream.video\/\\1" + "url": "https://wstream.video/video.php?file_code=\\1" } ], "ignore_urls": [ ] diff --git a/servers/wstream.py b/servers/wstream.py index 68ba13ad..53a2dc26 100644 --- a/servers/wstream.py +++ b/servers/wstream.py @@ -17,13 +17,17 @@ def test_video_exists(page_url): return False, "[wstream.py] Il File Non esiste" return True, "" + # Returns an array of possible video url's from the page_url def get_video_url(page_url, premium=False, user="", password="", video_password=""): - # import web_pdb; web_pdb.set_trace() logger.info("[wstream.py] url=" + page_url) video_urls = [] + code = page_url.split('=')[-1] + post = urllib.urlencode({ + 'videox': code + }) - data = httptools.downloadpage(page_url, headers=headers, follow_redirects=True).data.replace('https','http') + data = httptools.downloadpage(page_url, headers=headers, post=post, follow_redirects=True).data.replace('https','http') logger.info("[wstream.py] data=" + data) vid = scrapertools.find_multiple_matches(data, 'download_video.*?>.*?<.*?<td>([^\,,\s]+)') headers.append(['Referer', page_url]) @@ -33,49 +37,19 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= data = jsunpack.unpack(post_data) logger.info("[wstream.py] data=" + data) block = scrapertools.find_single_match(data, 'sources:\s*\[[^\]]+\]') - if block: - data = block + data = block - media_urls = scrapertools.find_multiple_matches(data, '(http.*?\.mp4)') - _headers = urllib.urlencode(dict(headers)) - i = 0 + media_urls = scrapertools.find_multiple_matches(data, '(http.*?\.mp4)') + _headers = urllib.urlencode(dict(headers)) + i = 0 - for media_url in media_urls: - video_urls.append([vid[i] if vid else 'video' + " mp4 [wstream] ", media_url + '|' + _headers]) - i = i + 1 + for media_url in media_urls: + video_urls.append([vid[i] if vid else 'video' + " mp4 [wstream] ", media_url + '|' + _headers]) + i = i + 1 - for video_url in video_urls: - logger.info("[wstream.py] %s - %s" % (video_url[0], video_url[1])) + for video_url in video_urls: + logger.info("[wstream.py] %s - %s" % (video_url[0], video_url[1])) - logger.info(video_urls) + logger.info(video_urls) - return video_urls - else: - page_urls = scrapertools.find_multiple_matches(data, '''<input type='hidden' id='videox' name='videox' value='([^']+)'>''') - for page_url in page_urls: - page_url = 'https://wstream.video/video5rqlew27k/'+page_url - if '404 Not Found' not in httptools.downloadpage(page_url, headers=headers).data.replace('https', 'http'): - return get_video_url(page_url) - - - -def find_videos(data): - encontrados = set() - devuelve = [] - - patronvideos = r"wstream.video/(?:embed-|videos/|video/)?([a-z0-9A-Z]+)" - logger.info("[wstream.py] find_videos #" + patronvideos + "#") - matches = re.compile(patronvideos, re.DOTALL).findall(data) - - for match in matches: - titulo = "[wstream]" - url = 'http://wstream.video/%s' % match - - if url not in encontrados: - logger.info(" url=" + url) - devuelve.append([titulo, url, 'wstream']) - encontrados.add(url) - else: - logger.info(" url duplicada=" + url) - - return devuelve + return video_urls From d91df6837c936ecd8ef778118d89df19bdaeb33b Mon Sep 17 00:00:00 2001 From: mac12m99 <m.toma99@gmail.com> Date: Wed, 6 Nov 2019 21:42:20 +0100 Subject: [PATCH 45/53] =?UTF-8?q?fix=20doppia=20qualit=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/support.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/support.py b/core/support.py index 2ab2189a..d2474d19 100644 --- a/core/support.py +++ b/core/support.py @@ -912,7 +912,8 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru videoitem.server = findS[2] videoitem.title = findS[0] videoitem.url = findS[1] - item.title = item.contentTitle if config.get_localized_string(30161) in item.title else item.title + item.title = item.contentTitle if item.contentType == 'movie' or ( + config.get_localized_string(30161) in item.title) else item.title videoitem.title = item.title + (typo(videoitem.title, '_ color kod []') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "") videoitem.fulltitle = item.fulltitle videoitem.show = item.show From b6d98dc02da643f0f1d685ec165cd3a0cabfe013 Mon Sep 17 00:00:00 2001 From: Alhaziel01 <alhaziel01@gmail.com> Date: Wed, 6 Nov 2019 22:00:26 +0100 Subject: [PATCH 46/53] Correzione doppio spazio --- core/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/support.py b/core/support.py index d2474d19..d3dff488 100644 --- a/core/support.py +++ b/core/support.py @@ -912,7 +912,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru videoitem.server = findS[2] videoitem.title = findS[0] videoitem.url = findS[1] - item.title = item.contentTitle if item.contentType == 'movie' or ( + item.title = item.contentTitle.strip() if item.contentType == 'movie' or ( config.get_localized_string(30161) in item.title) else item.title videoitem.title = item.title + (typo(videoitem.title, '_ color kod []') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "") videoitem.fulltitle = item.fulltitle From dfb1572ffefe4895b44a742b6add5ba89585e879 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Thu, 7 Nov 2019 13:12:48 +0100 Subject: [PATCH 47/53] add: aggiunti template issue: segnalazione problemi canale e server --- .../ISSUE_TEMPLATE/canale-non-funzionante.md | 26 +++++++++++++++++++ .../ISSUE_TEMPLATE/server-non-funzionante.md | 19 ++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/canale-non-funzionante.md create mode 100644 .github/ISSUE_TEMPLATE/server-non-funzionante.md diff --git a/.github/ISSUE_TEMPLATE/canale-non-funzionante.md b/.github/ISSUE_TEMPLATE/canale-non-funzionante.md new file mode 100644 index 00000000..02a61257 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/canale-non-funzionante.md @@ -0,0 +1,26 @@ +--- +name: Segnala Problemi ad un Canale +about: Invio segnalazione per un canale non funzionante +title: 'Inserisci il nome del canale' +labels: Problema Canale +assignees: '' + +--- + +**Per poter scrivere o allegare file nella pagina devi:** + - cliccare sui [ ... ] in alto a destra della scheda + - Edit. Da questo momento puoi scrivere e/o inviare file. + + +Inserisci il nome del canale + + +- Il tipo di problema riscontrato, sii il più esauriente possibile. Che azione ha portato all'errore + +Es. non riesco ad aggiungere film nella videoteca, ne dal menu contestuale, ne dalla voce in fondo alla lista dei server. + +Se faccio ricerca globale, non riesco ad aggiungere film/serie/anime nella videoteca o a scaricare il video. + + +- Allega il file di log nella sua completezza. Non cancellarne delle parti. + diff --git a/.github/ISSUE_TEMPLATE/server-non-funzionante.md b/.github/ISSUE_TEMPLATE/server-non-funzionante.md new file mode 100644 index 00000000..7493aff5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/server-non-funzionante.md @@ -0,0 +1,19 @@ +--- +name: Segnala Problemi ad un Server +about: Invio segnalazione per un server non funzionante +title: 'Inserisci il nome del server' +labels: Problema Server +assignees: '' + +--- + +**Per poter scrivere o allegare file nella pagina devi:** + - cliccare sui [ ... ] in alto a destra della scheda + - Edit. Da questo momento puoi scrivere e/o inviare file. + + +Inserisci il nome del server che indica problemi e se il problema è circoscritto ad un solo canale, indicalo + + +- Allega il file di log nella sua completezza. Non cancellarne delle parti. + From 23955e65c07b46e97cfe75f1a8dc1a5e5a0763da Mon Sep 17 00:00:00 2001 From: marco <m.toma99@gmail.com> Date: Thu, 7 Nov 2019 19:03:59 +0100 Subject: [PATCH 48/53] KoD 0.5 --- addon.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addon.xml b/addon.xml index aaa612f4..07722380 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="0.4.2" provider-name="KOD Team"> +<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="0.5" provider-name="KOD Team"> <requires> <import addon="xbmc.python" version="2.1.0"/> <import addon="script.module.libtorrent" optional="true"/> @@ -20,7 +20,12 @@ <screenshot>resources/media/themes/ss/2.png</screenshot> <screenshot>resources/media/themes/ss/3.png</screenshot> </assets> - <news>Benvenuto su KOD!</news> + <news>-Ridefinito il modo in cui vengono scritti i canali, per assicurare migliore stabilità, debuggabilità e coerenza + -Riscritti di conseguenza molti canali, corregendo di fatto moltissimi problemi che avete segnalato + -Quando aggiungi in videoteca da fonti in più lingue (ita/sub ita) o più qualità, ti viene chiesto quale tipo di fonte vuoi. + -Per gli amanti degli anime, aggiunto VVVVID (senza bisogno di account!) + -Aggiunti i server supervideo e hdload, fixato wstream + -migliorie varie</news> <description lang="it">Naviga velocemente sul web e guarda i contenuti presenti</description> <disclaimer>[COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR] [COLOR yellow]Kodi © is a registered trademark of the XBMC Foundation. We are not connected to or in any other way affiliated with Kodi, Team Kodi, or the XBMC Foundation. Furthermore, any software, addons, or products offered by us will receive no support in official Kodi channels, including the Kodi forums and various social networks.[/COLOR]</disclaimer> From a4797c5bc85ebc996968f950ea8e9fb48c4a0727 Mon Sep 17 00:00:00 2001 From: marco <m.toma99@gmail.com> Date: Thu, 7 Nov 2019 19:09:38 +0100 Subject: [PATCH 49/53] Revert "KoD 0.5" This reverts commit 23955e65 --- addon.xml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/addon.xml b/addon.xml index 07722380..aaa612f4 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="0.5" provider-name="KOD Team"> +<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="0.4.2" provider-name="KOD Team"> <requires> <import addon="xbmc.python" version="2.1.0"/> <import addon="script.module.libtorrent" optional="true"/> @@ -20,12 +20,7 @@ <screenshot>resources/media/themes/ss/2.png</screenshot> <screenshot>resources/media/themes/ss/3.png</screenshot> </assets> - <news>-Ridefinito il modo in cui vengono scritti i canali, per assicurare migliore stabilità, debuggabilità e coerenza - -Riscritti di conseguenza molti canali, corregendo di fatto moltissimi problemi che avete segnalato - -Quando aggiungi in videoteca da fonti in più lingue (ita/sub ita) o più qualità, ti viene chiesto quale tipo di fonte vuoi. - -Per gli amanti degli anime, aggiunto VVVVID (senza bisogno di account!) - -Aggiunti i server supervideo e hdload, fixato wstream - -migliorie varie</news> + <news>Benvenuto su KOD!</news> <description lang="it">Naviga velocemente sul web e guarda i contenuti presenti</description> <disclaimer>[COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR] [COLOR yellow]Kodi © is a registered trademark of the XBMC Foundation. We are not connected to or in any other way affiliated with Kodi, Team Kodi, or the XBMC Foundation. Furthermore, any software, addons, or products offered by us will receive no support in official Kodi channels, including the Kodi forums and various social networks.[/COLOR]</disclaimer> From e641856118da845b991e90e4a4114da61ba4e492 Mon Sep 17 00:00:00 2001 From: marco <m.toma99@gmail.com> Date: Thu, 7 Nov 2019 19:10:47 +0100 Subject: [PATCH 50/53] KoD 0.5 --- addon.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addon.xml b/addon.xml index aaa612f4..07722380 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="0.4.2" provider-name="KOD Team"> +<addon id="plugin.video.kod" name="Kodi on Demand BETA" version="0.5" provider-name="KOD Team"> <requires> <import addon="xbmc.python" version="2.1.0"/> <import addon="script.module.libtorrent" optional="true"/> @@ -20,7 +20,12 @@ <screenshot>resources/media/themes/ss/2.png</screenshot> <screenshot>resources/media/themes/ss/3.png</screenshot> </assets> - <news>Benvenuto su KOD!</news> + <news>-Ridefinito il modo in cui vengono scritti i canali, per assicurare migliore stabilità, debuggabilità e coerenza + -Riscritti di conseguenza molti canali, corregendo di fatto moltissimi problemi che avete segnalato + -Quando aggiungi in videoteca da fonti in più lingue (ita/sub ita) o più qualità, ti viene chiesto quale tipo di fonte vuoi. + -Per gli amanti degli anime, aggiunto VVVVID (senza bisogno di account!) + -Aggiunti i server supervideo e hdload, fixato wstream + -migliorie varie</news> <description lang="it">Naviga velocemente sul web e guarda i contenuti presenti</description> <disclaimer>[COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR] [COLOR yellow]Kodi © is a registered trademark of the XBMC Foundation. We are not connected to or in any other way affiliated with Kodi, Team Kodi, or the XBMC Foundation. Furthermore, any software, addons, or products offered by us will receive no support in official Kodi channels, including the Kodi forums and various social networks.[/COLOR]</disclaimer> From fda847f7f85fea2f14d5e722eaa85a782b3904e1 Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Thu, 7 Nov 2019 20:37:27 +0100 Subject: [PATCH 51/53] Fix VVVVID --- channels/vvvvid.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/channels/vvvvid.py b/channels/vvvvid.py index 9269cf2e..9394023f 100644 --- a/channels/vvvvid.py +++ b/channels/vvvvid.py @@ -142,7 +142,10 @@ def episodios(item): title = match[0]+'x'+match[1] + ' - ' + item.fulltitle make_item = True elif int(key['season_id']) == int(season_id): - title = 'Episodio ' + key['number'] + ' - ' + key['title'].encode('utf8'), + try: + title = 'Episodio ' + key['number'] + ' - ' + key['title'].encode('utf8') + except: + title = 'Episodio ' + key['number'] + ' - ' + key['title'] make_item = True else: make_item = False From 4e78da1b6dfb887c910fca7f11488fdf114a2f6d Mon Sep 17 00:00:00 2001 From: mac12m99 <m.toma99@gmail.com> Date: Thu, 7 Nov 2019 20:54:16 +0100 Subject: [PATCH 52/53] ennesimo fix wstream per cambio di struttura --- servers/wstream.json | 10 +++++++--- servers/wstream.py | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/servers/wstream.json b/servers/wstream.json index 2b934bbc..7b331fd7 100644 --- a/servers/wstream.json +++ b/servers/wstream.json @@ -6,10 +6,14 @@ "thumbnail": "http:\/\/media.tvalacarta.info\/servers\/server_wstream.png", "find_videos": { "patterns": [ - { - "pattern":"wstream.video\/(api\/vcmod\/fastredirect\/streaming.php\\?id=[0-9a-zA-Z]+)", + { + "pattern": "https://wstream.video/stream/switch_embed.php\\?file_code=([a-z0-9A-Z]+)", "url": "https://wstream.video/video.php?file_code=\\1" }, + { + "pattern":"wstream.video\/api\/vcmod\/fastredirect\/streaming.php\\?id=([0-9a-zA-Z]+)", + "url": "https://wstream.video/api/vcmod/fastredirect/streaming.php?id=\\1" + }, { "pattern": "wstream\\.video/video\\.php\\?file_code=([a-z0-9A-Z]+)", "url": "https://wstream.video/video.php?file_code=\\1" @@ -19,7 +23,7 @@ "url": "https://wstream.video/video.php?file_code=\\1" }, { - "pattern": "wstream\\.video\/(?!api/)([a-z0-9A-Z]+)", + "pattern": "wstream\\.video/(?!api/|stream/)([a-z0-9A-Z]+)", "url": "https://wstream.video/video.php?file_code=\\1" } ], diff --git a/servers/wstream.py b/servers/wstream.py index 53a2dc26..1a80faf5 100644 --- a/servers/wstream.py +++ b/servers/wstream.py @@ -22,6 +22,11 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("[wstream.py] url=" + page_url) video_urls = [] + + if '/streaming.php' in page_url: + code = httptools.downloadpage(page_url, headers=headers, follow_redirects=False).headers['location'].split('/')[-1] + page_url = 'https://wstream.video/video.php?file_code=' + code + code = page_url.split('=')[-1] post = urllib.urlencode({ 'videox': code From ee3b45b38eccc4e7d07553a587f6eafcbf05fc16 Mon Sep 17 00:00:00 2001 From: Alhaziel <alhaziel01@gmail.com> Date: Thu, 7 Nov 2019 20:58:18 +0100 Subject: [PATCH 53/53] Fix Filtro per Genere --- core/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/support.py b/core/support.py index d3dff488..6c5401d6 100644 --- a/core/support.py +++ b/core/support.py @@ -683,7 +683,7 @@ def typo(string, typography=''): kod_color = '0xFF65B3DA' #'0xFF0081C2' - string = str(string) + string = str(string.encode('utf8')) # Check if the typographic attributes are in the string or outside if typography: string = string + ' ' + typography